public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] blkid: use xalloc.h when possible
@ 2013-03-21 21:47 Sami Kerola
  2013-03-21 21:47 ` [PATCH 2/2] docs: arch is gone, use delpart as usage() function example Sami Kerola
  2013-03-26  9:54 ` [PATCH 1/2] blkid: use xalloc.h when possible Karel Zak
  0 siblings, 2 replies; 4+ messages in thread
From: Sami Kerola @ 2013-03-21 21:47 UTC (permalink / raw)
  To: util-linux; +Cc: kerolasa

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
---
 misc-utils/blkid.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/misc-utils/blkid.c b/misc-utils/blkid.c
index 78e0a93..fd27da7 100644
--- a/misc-utils/blkid.c
+++ b/misc-utils/blkid.c
@@ -49,6 +49,7 @@ extern int optind;
 
 #include "closestream.h"
 #include "ttyutils.h"
+#include "xalloc.h"
 
 const char *progname = "blkid";
 
@@ -703,8 +704,8 @@ int main(int argc, char **argv)
 			break;
 		case 'L':
 			eval++;
-			search_value = strdup(optarg);
-			search_type = strdup("LABEL");
+			search_value = xstrdup(optarg);
+			search_type = xstrdup("LABEL");
 			break;
 		case 'n':
 			fltr_type = list_to_types(optarg, &fltr_flag);
@@ -714,8 +715,8 @@ int main(int argc, char **argv)
 			break;
 		case 'U':
 			eval++;
-			search_value = strdup(optarg);
-			search_type = strdup("UUID");
+			search_value = xstrdup(optarg);
+			search_type = xstrdup("UUID");
 			break;
 		case 'i':
 			lowprobe |= LOWPROBE_TOPOLOGY;
-- 
1.8.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] docs: arch is gone, use delpart as usage() function example
  2013-03-21 21:47 [PATCH 1/2] blkid: use xalloc.h when possible Sami Kerola
@ 2013-03-21 21:47 ` Sami Kerola
  2013-03-26  9:55   ` Karel Zak
  2013-03-26  9:54 ` [PATCH 1/2] blkid: use xalloc.h when possible Karel Zak
  1 sibling, 1 reply; 4+ messages in thread
From: Sami Kerola @ 2013-03-21 21:47 UTC (permalink / raw)
  To: util-linux; +Cc: kerolasa

The arch.c was removed in commit 27abd809.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
---
 Documentation/howto-usage-function.txt | 2 +-
 include/c.h                            | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/howto-usage-function.txt b/Documentation/howto-usage-function.txt
index 371ff32..4daa736 100644
--- a/Documentation/howto-usage-function.txt
+++ b/Documentation/howto-usage-function.txt
@@ -153,5 +153,5 @@ are meant this.
 Example
 -------
 
-Command sys-utils/arch.c is a minimal example how to do write usage
+Command disk-utils/delpart.c is a minimal example how to do write usage
 function, setup option parsing, version printing and so on.
diff --git a/include/c.h b/include/c.h
index ec1020e..d2d68c3 100644
--- a/include/c.h
+++ b/include/c.h
@@ -262,7 +262,7 @@ static inline int usleep(useconds_t usec)
 
 /*
  * Constant strings for usage() functions. For more info see
- * Documentation/howto-usage-function.txt and sys-utils/arch.c
+ * Documentation/howto-usage-function.txt and disk-utils/delpart.c
  */
 #define USAGE_HEADER     _("\nUsage:\n")
 #define USAGE_OPTIONS    _("\nOptions:\n")
-- 
1.8.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] blkid: use xalloc.h when possible
  2013-03-21 21:47 [PATCH 1/2] blkid: use xalloc.h when possible Sami Kerola
  2013-03-21 21:47 ` [PATCH 2/2] docs: arch is gone, use delpart as usage() function example Sami Kerola
@ 2013-03-26  9:54 ` Karel Zak
  1 sibling, 0 replies; 4+ messages in thread
From: Karel Zak @ 2013-03-26  9:54 UTC (permalink / raw)
  To: Sami Kerola; +Cc: util-linux

On Thu, Mar 21, 2013 at 09:47:14PM +0000, Sami Kerola wrote:
>  misc-utils/blkid.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)

 Applied, thanks.

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] docs: arch is gone, use delpart as usage() function example
  2013-03-21 21:47 ` [PATCH 2/2] docs: arch is gone, use delpart as usage() function example Sami Kerola
@ 2013-03-26  9:55   ` Karel Zak
  0 siblings, 0 replies; 4+ messages in thread
From: Karel Zak @ 2013-03-26  9:55 UTC (permalink / raw)
  To: Sami Kerola; +Cc: util-linux

On Thu, Mar 21, 2013 at 09:47:15PM +0000, Sami Kerola wrote:
>  Documentation/howto-usage-function.txt | 2 +-
>  include/c.h                            | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)

 Applied, thanks.

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-03-26  9:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-21 21:47 [PATCH 1/2] blkid: use xalloc.h when possible Sami Kerola
2013-03-21 21:47 ` [PATCH 2/2] docs: arch is gone, use delpart as usage() function example Sami Kerola
2013-03-26  9:55   ` Karel Zak
2013-03-26  9:54 ` [PATCH 1/2] blkid: use xalloc.h when possible Karel Zak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox