X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=utilities%2Fovs-dpctl.c;h=932aa893fef49e1ced25a03e3752e028fd5cd4bf;hb=49c36903d6d65bed96cba31f05534510a21a68d7;hp=5a0da820c2fbe8a06c8f3b091fa23550ea542d32;hpb=3f355f47f8e7343e909ccfa854454d667baf3c38;p=openvswitch diff --git a/utilities/ovs-dpctl.c b/utilities/ovs-dpctl.c index 5a0da820..932aa893 100644 --- a/utilities/ovs-dpctl.c +++ b/utilities/ovs-dpctl.c @@ -99,11 +99,15 @@ int main(int argc, char *argv[]) static void parse_options(int argc, char *argv[]) { + enum { + OPT_DUMMY = UCHAR_MAX + 1, + VLOG_OPTION_ENUMS + }; static struct option long_options[] = { {"timeout", required_argument, 0, 't'}, - {"verbose", optional_argument, 0, 'v'}, {"help", no_argument, 0, 'h'}, {"version", no_argument, 0, 'V'}, + VLOG_LONG_OPTIONS, {0, 0, 0, 0}, }; char *short_options = long_options_to_short_options(long_options); @@ -135,9 +139,7 @@ parse_options(int argc, char *argv[]) OVS_PRINT_VERSION(0, 0); exit(EXIT_SUCCESS); - case 'v': - vlog_set_verbosity(optarg); - break; + VLOG_OPTION_HANDLERS case '?': exit(EXIT_FAILURE); @@ -371,9 +373,11 @@ show_dpif(struct dpif *dpif) printf("\tports: cur:%"PRIu32", max:%"PRIu32"\n", stats.n_ports, stats.max_ports); printf("\tgroups: max:%"PRIu16"\n", stats.max_groups); - printf("\tlookups: frags:%"PRIu64", hit:%"PRIu64", missed:%"PRIu64", " - "lost:%"PRIu64"\n", - stats.n_frags, stats.n_hit, stats.n_missed, stats.n_lost); + printf("\tlookups: frags:%llu, hit:%llu, missed:%llu, lost:%llu\n", + (unsigned long long int) stats.n_frags, + (unsigned long long int) stats.n_hit, + (unsigned long long int) stats.n_missed, + (unsigned long long int) stats.n_lost); printf("\tqueues: max-miss:%"PRIu16", max-action:%"PRIu16"\n", stats.max_miss_queue, stats.max_action_queue); }