[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: [PATCH 3/3] modprobe-small: define and use DEPMOD_OPT_n (option mask)
From:       Denys Vlasenko <vda.linux () googlemail ! com>
Date:       2017-02-12 20:42:02
Message-ID: CAK1hOcPUj1t0RkmC8Xak_56uMj7oa=8QaubHnBwkaCQ6n+ZE4Q () mail ! gmail ! com
[Download RAW message or body]

Applied, thanks

On Thu, Feb 9, 2017 at 3:48 PM, Kang-Che Sung <explorer09@gmail.com> wrote:
> Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
> ---
>  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 */
>         OPT_q = (1 << 0), /* be quiet */
>         OPT_r = (1 << 1), /* module removal instead of loading */
>  };
> @@ -477,7 +478,7 @@ static int start_dep_bb_writeout(void)
>         int fd;
>
>         /* depmod -n: write result to stdout */
> -       if (applet_name[0] == 'd' && (option_mask32 & 1))
> +       if (is_depmod && (option_mask32 & DEPMOD_OPT_n))
>                 return STDOUT_FILENO;
>
>         fd = open(DEPFILE_BB".new", O_WRONLY | O_CREAT | O_TRUNC | O_EXCL, 0644);
> --
> 2.11.0
>
> _______________________________________________
> busybox mailing list
> busybox@busybox.net
> http://lists.busybox.net/mailman/listinfo/busybox
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic