On Fri, Feb 10, 2017 at 9:09 PM, Xabier Oneca -- xOneca <[email protected]> wrote: > Hello, > > 2017-02-09 15:48 GMT+01:00 Kang-Che Sung <[email protected]>: >> Signed-off-by: Kang-Che Sung <[email protected]> >> --- >> modutils/modprobe-small.c | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/modutils/modprobe-small.c b/modutils/modprobe-small.c >> index 52765bc99..43625490b 100644 >> --- a/modutils/modprobe-small.c >> +++ b/modutils/modprobe-small.c >> @@ -79,6 +79,7 @@ int lsmod_main(int argc UNUSED_PARAM, char **argv >> UNUSED_PARAM) >> #define is_rmmod (ENABLE_RMMOD && (ONLY_APPLET || applet_name[0] == >> 'r')) >> >> enum { >> + DEPMOD_OPT_n = (1 << 0), /* dry-run, print to stdout */ > > Why not call it OPT_n? Is it used somewere else? >
I have considered using OPT_n before, but I also think about the '-n' option being implemented for modprobe/insmod/rmmod in the future, and that way the option bits will conflict. (At least I tried to hack the code to implement '-n'. It's --dry-run, so implement it won't be difficult, although the code won't be neat.) depmod doesn't use the same getopt32 call as modprobe/insmod/ rmmod's call. So it's better for the OPT constants be separate as well. _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
