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/chsh.c
static void process_flags(int argc, char** argv)
{
    int c;
    static struct option long_options[] = {
        {"help", no_argument, NULL, 'h'},
        {"root", required_argument, NULL, 'R'},
        {"shell", required_argument, NULL, 's'},
        {NULL, 0, NULL, '\0'}};

    while ((c = getopt_long(argc, argv, "hR:s:", long_options, NULL)) != -1)
    {
        switch (c)
        {
            case 'h':
                usage(E_SUCCESS);
                /*@notreached@*/ break;
            case 'R': /* no-op, handled in process_root_flag () */
                break;
            case 's':
                sflg = true;
                STRFCPY(loginsh, optarg);
                break;
            default:
                usage(E_USAGE);
        }
    }

    /*
     * There should be only one remaining argument at most and it should
     * be the user's name.
     */
    if (argc > (optind + 1))
    {
        usage(E_USAGE);
    }
}
/*
 * process_flags - parse the command line options
 *
 *	It will not return if an error is encountered.
 */
parse the command line options
It will not return if an error is encountered.
parse the command line options It will not return if an error is encountered .
static void process_flags(int argc, char** argv)
{
    int c;
    static struct option long_options[] = {
        {"help", no_argument, NULL, 'h'},
        {"root", required_argument, NULL, 'R'},
        {"shell", required_argument, NULL, 's'},
        {NULL, 0, NULL, '\0'}};
    while ((c = getopt_long(argc, argv, "hR:s:", long_options, NULL)) != -1)
    {
        switch (c)
        {
            case 'h':
                usage(E_SUCCESS);
                 break;
            case 'R': 
                break;
            case 's':
                sflg = true;
                STRFCPY(loginsh, optarg);
                break;
            default:
                usage(E_USAGE);
        }
    }
    if (argc > (optind + 1))
    {
        usage(E_USAGE);
    }
}
static void process_flags ( int argc , char * * argv ) { int c ; static struct option long_options [ ] = { { " " , no_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 ' ' : usage ( E_SUCCESS ) ; break ; case ' ' : break ; case ' ' : sflg = true ; STRFCPY ( loginsh , optarg ) ; break ; default : usage ( E_USAGE ) ; } } if ( argc > ( optind + 1 ) ) { usage ( E_USAGE ) ; } }
process_flags - parse the command line options
      It will not return if an error is encountered.
process_flags - parse the command line options It will not return if an error is encountered .
/*@notreached@*/ /* no-op, handled in process_root_flag () */ /*
     * There should be only one remaining argument at most and it should
     * be the user's name.
     */