Skip to contentSkip to conversation

blkid: use xalloc.h when possible

PATCH Applied Sami Kerola 2 participants 4 messages Mar 21, 2013 – Mar 26, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 blkid: use xalloc.h when possible

---
 misc-utils/blkid.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
misc-utils/blkid.c +5 -4
index 78e0a93..fd27da7 100644
@@ -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;
Signature · 1 line
1.8.2
#1 lore raw

PATCH 2/2 docs: arch is gone, use delpart as usage() function example

The arch.c was removed in commit 27abd809.

---
 Documentation/howto-usage-function.txt | 2 +-
 include/c.h                            | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Documentation/howto-usage-function.txt +1 -1
index 371ff32..4daa736 100644
@@ -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.
include/c.h +1 -1
index ec1020e..d2d68c3 100644
@@ -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")
Signature · 1 line
1.8.2
maintainer Applied
#2 lore raw

Re: [PATCH 2/2] docs: arch is gone, use delpart as usage() function example

Quoted 3 lines · Sami Kerola
 Documentation/howto-usage-function.txt | 2 +-
 include/c.h                            | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Applied, thanks.

Signature · 2 lines
 Karel Zak  <[email protected]>
 http://karelzak.blogspot.com
maintainer Applied
#3 lore raw
In reply to Sami Kerola
Quoted 2 lines · Sami Kerola
 misc-utils/blkid.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

Applied, thanks.

Signature · 2 lines
 Karel Zak  <[email protected]>
 http://karelzak.blogspot.com