diff options
Diffstat (limited to 'sfdisk.c')
-rw-r--r-- | sfdisk.c | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -54,10 +54,14 @@ | |||
54 | #include <linux/hdreg.h> /* HDIO_GETGEO */ | 54 | #include <linux/hdreg.h> /* HDIO_GETGEO */ |
55 | #include <linux/fs.h> /* BLKGETSIZE */ | 55 | #include <linux/fs.h> /* BLKGETSIZE */ |
56 | 56 | ||
57 | #define BB_DECLARE_EXTERN | ||
58 | #define bb_need_memory_exhausted | ||
59 | #include "messages.c" | ||
57 | 60 | ||
58 | static const char sfdisk_usage[] = | 61 | static const char sfdisk_usage[] = |
59 | "sfdisk [options] device ...\n" | 62 | "sfdisk [options] device ...\n" |
60 | "device: something like /dev/hda or /dev/sda\n" | 63 | #ifndef BB_FEATURE_TRIVIAL_HELP |
64 | "\ndevice: something like /dev/hda or /dev/sda\n" | ||
61 | "useful options:\n" | 65 | "useful options:\n" |
62 | " -s [or --show-size]: list size of a partition\n" | 66 | " -s [or --show-size]: list size of a partition\n" |
63 | " -c [or --id]: print or change partition Id\n" | 67 | " -c [or --id]: print or change partition Id\n" |
@@ -86,7 +90,9 @@ static const char sfdisk_usage[] = | |||
86 | " -S# [or --sectors #]: set the number of sectors to use\n" | 90 | " -S# [or --sectors #]: set the number of sectors to use\n" |
87 | 91 | ||
88 | "You can disable all consistency checking with:\n" | 92 | "You can disable all consistency checking with:\n" |
89 | " -f [or --force]: do what I say, even if it is stupid\n"; | 93 | " -f [or --force]: do what I say, even if it is stupid\n" |
94 | #endif | ||
95 | ; | ||
90 | 96 | ||
91 | 97 | ||
92 | 98 | ||
@@ -421,7 +427,7 @@ static int restore_sectors(char *dev) | |||
421 | return 0; | 427 | return 0; |
422 | } | 428 | } |
423 | if (!(ss = (char *) malloc(statbuf.st_size))) { | 429 | if (!(ss = (char *) malloc(statbuf.st_size))) { |
424 | errorMsg("out of memory?\n"); | 430 | errorMsg(memory_exhausted, "sfdisk"); |
425 | return 0; | 431 | return 0; |
426 | } | 432 | } |
427 | fdin = open(restore_sector_file, O_RDONLY); | 433 | fdin = open(restore_sector_file, O_RDONLY); |