~ubuntu-branches/ubuntu/saucy/checkpolicy/saucy

« back to all changes in this revision

Viewing changes to checkpolicy.c

  • Committer: Bazaar Package Importer
  • Author(s): Manoj Srivastava
  • Date: 2010-03-28 09:59:27 UTC
  • mfrom: (1.1.13 upstream) (2.2.4 sid)
  • Revision ID: james.westby@ubuntu.com-20100328095927-uzhis6ynaeqy8ufp
Tags: 2.0.21-1
* New upstream release
  + Add long options to checkpolicy and checkmodule by Guido
  Trentalancia <guido@trentalancia.com> 

Show diffs side-by-side

added added

removed removed

Lines of Context:
392
392
        int state;
393
393
        int show_version = 0;
394
394
        struct policy_file pf;
 
395
        struct option long_options[] = {
 
396
                {"output", required_argument, NULL, 'o'},
 
397
                {"target", required_argument, NULL, 't'},
 
398
                {"binary", no_argument, NULL, 'b'},
 
399
                {"debug", no_argument, NULL, 'd'},
 
400
                {"version", no_argument, NULL, 'V'},
 
401
                {"handle-unknown", optional_argument, NULL, 'U'},
 
402
                {"mls", no_argument, NULL, 'M'},
 
403
                {"help", no_argument, NULL, 'h'},
 
404
                {NULL, 0, NULL, 0}
 
405
        };
395
406
 
396
 
        while ((ch = getopt(argc, argv, "o:t:dbU:MVc:")) != EOF) {
 
407
        while ((ch = getopt_long(argc, argv, "o:t:dbU:MVc:h", long_options, NULL)) != -1) {
397
408
                switch (ch) {
398
409
                case 'o':
399
410
                        outfile = optarg;
458
469
                                        policyvers = n;
459
470
                                break;
460
471
                        }
 
472
                case 'h':
461
473
                default:
462
474
                        usage(argv[0]);
463
475
                }