blockdev: -2 bytes
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
This commit is contained in:
parent
b4e6b41934
commit
264bdadb2c
@ -109,12 +109,15 @@ static const struct bdc bdcommands[] = {
|
|||||||
|
|
||||||
static const struct bdc *find_cmd(const char *s)
|
static const struct bdc *find_cmd(const char *s)
|
||||||
{
|
{
|
||||||
int j;
|
const struct bdc *bdcmd = bdcommands;
|
||||||
if (*s++ == '-')
|
if (s[0] == '-' && s[1] == '-') {
|
||||||
if (*s++ == '-')
|
s += 2;
|
||||||
for (j = 0; j < ARRAY_SIZE(bdcommands); j++)
|
do {
|
||||||
if (strcmp(s, bdcommands[j].name) == 0)
|
if (strcmp(s, bdcmd->name) == 0)
|
||||||
return &bdcommands[j];
|
return bdcmd;
|
||||||
|
bdcmd++;
|
||||||
|
} while (bdcmd != bdcommands + ARRAY_SIZE(bdcommands));
|
||||||
|
}
|
||||||
bb_show_usage();
|
bb_show_usage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user