openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/shadow/4.6-r0/shadow-4.6/src/groupmod.c
static void process_flags(int argc, char** argv)
{
    int c;
    static struct option long_options[] = {
        {"gid", required_argument, NULL, 'g'},
        {"help", no_argument, NULL, 'h'},
        {"new-name", required_argument, NULL, 'n'},
        {"non-unique", no_argument, NULL, 'o'},
        {"password", required_argument, NULL, 'p'},
        {"root", required_argument, NULL, 'R'},
        {"prefix", required_argument, NULL, 'P'},
        {NULL, 0, NULL, '\0'}};
    while ((c = getopt_long(argc, argv, "g:hn:op:R:P:", long_options, NULL)) !=
           -1)
    {
        switch (c)
        {
            case 'g':
                gflg = true;
                if ((get_gid(optarg, &group_newid) == 0) ||
                    (group_newid == (gid_t)-1))
                {
                    fprintf(stderr, _("%s: invalid group ID '%s'\n"), Prog,
                            optarg);
                    exit(E_BAD_ARG);
                }
                break;
            case 'h':
                usage(E_SUCCESS);
                break;
            case 'n':
                nflg = true;
                group_newname = optarg;
                break;
            case 'o':
                oflg = true;
                break;
            case 'p':
                group_passwd = optarg;
                pflg = true;
                break;
            case 'R': /* no-op, handled in process_root_flag () */
                break;
            case 'P': /* no-op, handled in process_prefix_flag () */
                break;
            default:
                usage(E_USAGE);
        }
    }

    if (oflg && !gflg)
    {
        usage(E_USAGE);
    }

    if (optind != (argc - 1))
    {
        usage(E_USAGE);
    }

    group_name = argv[argc - 1];
}
/*
 * process_flags - perform command line argument setting
 *
 *	process_flags() interprets the command line arguments and sets the
 *	values that the user will be created with accordingly. The values
 *	are checked for sanity.
 */
perform command line argument setting
process_flags() interprets the command line arguments and sets the
values that the user will be created with accordingly. The values
are checked for sanity.
perform command line argument setting process_flags () interprets the command line arguments and sets the values that the user will be created with accordingly . The values are checked for sanity .
static void process_flags(int argc, char** argv)
{
    int c;
    static struct option long_options[] = {
        {"gid", required_argument, NULL, 'g'},
        {"help", no_argument, NULL, 'h'},
        {"new-name", required_argument, NULL, 'n'},
        {"non-unique", no_argument, NULL, 'o'},
        {"password", required_argument, NULL, 'p'},
        {"root", required_argument, NULL, 'R'},
        {"prefix", required_argument, NULL, 'P'},
        {NULL, 0, NULL, '\0'}};
    while ((c = getopt_long(argc, argv, "g:hn:op:R:P:", long_options, NULL)) !=
           -1)
    {
        switch (c)
        {
            case 'g':
                gflg = true;
                if ((get_gid(optarg, &group_newid) == 0) ||
                    (group_newid == (gid_t)-1))
                {
                    fprintf(stderr, _("%s: invalid group ID '%s'\n"), Prog,
                            optarg);
                    exit(E_BAD_ARG);
                }
                break;
            case 'h':
                usage(E_SUCCESS);
                break;
            case 'n':
                nflg = true;
                group_newname = optarg;
                break;
            case 'o':
                oflg = true;
                break;
            case 'p':
                group_passwd = optarg;
                pflg = true;
                break;
            case 'R': 
                break;
            case 'P': 
                break;
            default:
                usage(E_USAGE);
        }
    }
    if (oflg && !gflg)
    {
        usage(E_USAGE);
    }
    if (optind != (argc - 1))
    {
        usage(E_USAGE);
    }
    group_name = argv[argc - 1];
}
static void process_flags ( int argc , char * * argv ) { int c ; static struct option long_options [ ] = { { " " , required_argument , NULL , ' ' } , { " " , no_argument , NULL , ' ' } , { " " , required_argument , NULL , ' ' } , { " " , no_argument , NULL , ' ' } , { " " , required_argument , NULL , ' ' } , { " " , required_argument , NULL , ' ' } , { " " , required_argument , NULL , ' ' } , { NULL , 0 , NULL , ' \0 ' } } ; while ( ( c = getopt_long ( argc , argv , " " , long_options , NULL ) ) != -1 ) { switch ( c ) { case ' ' : gflg = true ; if ( ( get_gid ( optarg , & group_newid ) == 0 ) || ( group_newid == ( gid_t ) - 1 ) ) { fprintf ( stderr , _ ( " \n " ) , Prog , optarg ) ; exit ( E_BAD_ARG ) ; } break ; case ' ' : usage ( E_SUCCESS ) ; break ; case ' ' : nflg = true ; group_newname = optarg ; break ; case ' ' : oflg = true ; break ; case ' ' : group_passwd = optarg ; pflg = true ; break ; case ' ' : break ; case ' ' : break ; default : usage ( E_USAGE ) ; } } if ( oflg && ! gflg ) { usage ( E_USAGE ) ; } if ( optind != ( argc - 1 ) ) { usage ( E_USAGE ) ; } group_name = argv [ argc - 1 ] ; }
process_flags - perform command line argument setting
      process_flags() interprets the command line arguments and sets the
      values that the user will be created with accordingly.
process_flags - perform command line argument setting process_flags () interprets the command line arguments and sets the values that the user will be created with accordingly .
/* no-op, handled in process_root_flag () */ /* no-op, handled in process_prefix_flag () */