source: trunk/package/busybox/patches/910-insmod-q-flag.patch @ 26738

Last change on this file since 26738 was 26738, checked in by nbd, 6 years ago

busybox: refresh patches

File size: 876 bytes
  • modutils/insmod.c

    a b int insmod_main(int argc, char **argv) M 
    133133int insmod_main(int argc UNUSED_PARAM, char **argv) 
    134134{ 
    135135        char *filename; 
    136         int rc; 
     136        int rc, opt; 
    137137 
    138138        /* Compat note: 
    139139         * 2.6 style insmod has no options and required filename 
    int insmod_main(int argc UNUSED_PARAM, c 
    143143         * or in $MODPATH. 
    144144         */ 
    145145 
    146         IF_FEATURE_2_4_MODULES( 
    147                 getopt32(argv, INSMOD_OPTS INSMOD_ARGS); 
    148                 argv += optind - 1; 
    149         ); 
     146        opt = getopt32(argv, INSMOD_OPTS, NULL, NULL); 
     147        argv += optind - 1; 
    150148 
    151149        filename = *++argv; 
    152150        if (!filename) 
    int insmod_main(int argc UNUSED_PARAM, c 
    157155                        goto done; 
    158156 
    159157        rc = bb_init_module(g_filename, parse_cmdline_module_options(argv)); 
    160         if (rc) 
     158        if (rc && !(opt & INSMOD_OPT_SILENT)) 
    161159                bb_error_msg("can't insert '%s': %s", filename, moderror(rc)); 
    162160        free (g_filename); 
    163161 
Note: See TracBrowser for help on using the repository browser.