blockdev applet proposal
sknaumov at gmail.com
Mon Sep 6 14:19:27 UTC 2010
> Please review attached version.
All works fine except I can pass additional (3-rd) parameter at the
end of commands which do not require an argument,
for example ./busybox blockdev --rereadpt /dev/sda a.
It could save some size, but original utility accepts blockdev
--rereadpt /dev/sda /dev/sdb, so, from my point of view, we should
inform user when he tries to provide such an input.
So, I think, we should add
if (bdcmd->flags & FL_USRARG)
llu = xatoi_positive(*++argv);
+ if (argc > 3) bb_show_usage();
Very educational code, thanks =)
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3844 bytes
Desc: not available
More information about the busybox