Changeset 4955:5a13f6cdde6e in roaraudio for roard/roard.c


Ignore:
Timestamp:
05/13/11 17:51:25 (13 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

patch to add support to list drivers in diffrent formats

File:
1 edited

Legend:

Unmodified
Added
Removed
  • roard/roard.c

    r4934 r4955  
    13321332 int i; 
    13331333 char * k; 
     1334 enum output_format print_format = FORMAT_NATIVE; 
    13341335#endif 
    13351336#if defined(ROAR_SUPPORT_LISTEN) && defined(ROAR_HAVE_GETUID) 
     
    15901591   ROAR_ERR("--daemon not supported"); 
    15911592#endif 
    1592   } else if ( strcmp(k, "--verbose") == 0 ) { 
     1593  } else if ( strcmp(k, "--print-format") == 0 ) { 
    15931594   g_verbose++; 
     1595   k = argv[++i]; 
     1596   if ( !strcasecmp(k, "native") ) { 
     1597    print_format = FORMAT_NATIVE; 
     1598   } else if ( !strcasecmp(k, "wiki") ) { 
     1599    print_format = FORMAT_WIKI; 
     1600   } else if ( !strcasecmp(k, "csv") ) { 
     1601    print_format = FORMAT_CSV; 
     1602   } else { 
     1603    ROAR_WARN("Unknown print format: %s", k); 
     1604   } 
     1605 
     1606  } else if ( strcmp(k, "--print-format") == 0 ) { 
     1607   _CKHAVEARGS(1); 
     1608 
    15941609  } else if ( strcmp(k, "--terminate") == 0 ) { 
    15951610   g_terminate = 1; 
     
    17401755 
    17411756  } else if ( strcmp(k, "--list-driver") == 0 ) { 
    1742    print_driverlist(); 
     1757   print_driverlist(print_format); 
    17431758   return 0; 
    17441759 
Note: See TracChangeset for help on using the changeset viewer.