diff options
-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; |