blkid: use xalloc.h when possible
Subsystems (2)
PATCH 1/2 blkid: use xalloc.h when possible
Signed-off-by Sami Kerola <[email protected]>
--- misc-utils/blkid.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
misc-utils/blkid.c +5 -4
@@ -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
PATCH 2/2 docs: arch is gone, use delpart as usage() function example
The arch.c was removed in commit 27abd809.
Signed-off-by Sami Kerola <[email protected]>
--- Documentation/howto-usage-function.txt | 2 +- include/c.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Documentation/howto-usage-function.txt +1 -1
@@ -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
@@ -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
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
Re: [PATCH 2/2] docs: arch is gone, use delpart as usage() function example
In reply to Sami KerolaQuoted 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