diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2006-09-22 08:39:49 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2006-09-22 08:39:49 +0000 |
commit | cad36681d2a1f502824c19d85ebf59dc90c40524 (patch) | |
tree | 53fd45d2431f5e1838888c48b3967efd482ed732 /util-linux/readprofile.c | |
parent | 7869c018b50b515d5cd21763a3676339f6960d00 (diff) | |
download | busybox-w32-cad36681d2a1f502824c19d85ebf59dc90c40524.tar.gz busybox-w32-cad36681d2a1f502824c19d85ebf59dc90c40524.tar.bz2 busybox-w32-cad36681d2a1f502824c19d85ebf59dc90c40524.zip |
readprofile: getopt_ulflags'isation
Diffstat (limited to 'util-linux/readprofile.c')
-rw-r--r-- | util-linux/readprofile.c | 44 |
1 files changed, 6 insertions, 38 deletions
diff --git a/util-linux/readprofile.c b/util-linux/readprofile.c index fb658c87f..29e9f3e42 100644 --- a/util-linux/readprofile.c +++ b/util-linux/readprofile.c | |||
@@ -50,10 +50,9 @@ int readprofile_main(int argc, char **argv) | |||
50 | uint64_t add0=0; | 50 | uint64_t add0=0; |
51 | unsigned int step; | 51 | unsigned int step; |
52 | unsigned int *buf, total, fn_len; | 52 | unsigned int *buf, total, fn_len; |
53 | unsigned long long fn_add, next_add; /* current and next address */ | 53 | unsigned long long fn_add, next_add; /* current and next address */ |
54 | char fn_name[S_LEN], next_name[S_LEN]; /* current and next name */ | 54 | char fn_name[S_LEN], next_name[S_LEN]; /* current and next name */ |
55 | char mode[8]; | 55 | char mode[8]; |
56 | int c; | ||
57 | int optAll=0, optInfo=0, optReset=0, optVerbose=0, optNative=0; | 56 | int optAll=0, optInfo=0, optReset=0, optVerbose=0, optNative=0; |
58 | int optBins=0, optSub=0; | 57 | int optBins=0, optSub=0; |
59 | char mapline[S_LEN]; | 58 | char mapline[S_LEN]; |
@@ -65,42 +64,11 @@ int readprofile_main(int argc, char **argv) | |||
65 | proFile = defaultpro; | 64 | proFile = defaultpro; |
66 | mapFile = defaultmap; | 65 | mapFile = defaultmap; |
67 | 66 | ||
68 | while ((c = getopt(argc, argv, "M:m:np:itvarVbs")) != -1) { | 67 | bb_opt_complementally = "nn:aa:bb:ss:ii:rr:vv"; |
69 | switch(c) { | 68 | bb_getopt_ulflags(argc, argv, "M:m:p:nabsirv", |
70 | case 'm': | 69 | &mult, &mapFile, &proFile, |
71 | mapFile = optarg; | 70 | &optNative, &optAll, &optBins, &optSub, |
72 | break; | 71 | &optInfo, &optReset, &optVerbose); |
73 | case 'n': | ||
74 | optNative++; | ||
75 | break; | ||
76 | case 'p': | ||
77 | proFile = optarg; | ||
78 | break; | ||
79 | case 'a': | ||
80 | optAll++; | ||
81 | break; | ||
82 | case 'b': | ||
83 | optBins++; | ||
84 | break; | ||
85 | case 's': | ||
86 | optSub++; | ||
87 | break; | ||
88 | case 'i': | ||
89 | optInfo++; | ||
90 | break; | ||
91 | case 'M': | ||
92 | mult = optarg; | ||
93 | break; | ||
94 | case 'r': | ||
95 | optReset++; | ||
96 | break; | ||
97 | case 'v': | ||
98 | optVerbose++; | ||
99 | break; | ||
100 | default: | ||
101 | bb_show_usage(); | ||
102 | } | ||
103 | } | ||
104 | 72 | ||
105 | if (optReset || mult) { | 73 | if (optReset || mult) { |
106 | int multiplier, fd, to_write; | 74 | int multiplier, fd, to_write; |