X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=extras%2Fezio%2Fovs-switchui.c;h=16a6903f5feba3a5983559c53ba9d47e57fdcee4;hb=02dd3123a0e312f1d33403e744af52dd6096f12d;hp=864e34c1e744895a1ade9030d2253bc45ddeed09;hpb=e3830e909d210145cbe52a1da66058ebf2581fd6;p=openvswitch diff --git a/extras/ezio/ovs-switchui.c b/extras/ezio/ovs-switchui.c index 864e34c1..16a6903f 100644 --- a/extras/ezio/ovs-switchui.c +++ b/extras/ezio/ovs-switchui.c @@ -144,6 +144,7 @@ main(int argc, char *argv[]) long long int last_key_time = 0; int repeat_count = 0; + proctitle_init(argc, argv); set_program_name(argv[0]); time_init(); vlog_init(); @@ -995,7 +996,7 @@ initialize_terminal(void) } static void -restore_terminal(void *aux UNUSED) +restore_terminal(void *aux OVS_UNUSED) { endwin(); } @@ -1104,6 +1105,7 @@ do_show_data_rates(void *rates_) } if (!rates->xid) { struct ofp_stats_request *rq; + struct ofp_port_stats_request *psr; struct ofpbuf *b; rates->xid = random_uint32(); @@ -1111,6 +1113,10 @@ do_show_data_rates(void *rates_) rates->xid, &b); rq->type = htons(OFPST_PORT); rq->flags = htons(0); + psr = ofpbuf_put_uninit(b, sizeof *psr); + memset(psr, 0, sizeof *psr); + psr->port_no = htons(OFPP_NONE); + update_openflow_length(b); rconn_send_with_limit(rates->rconn, b, counter, 10); } @@ -1444,7 +1450,7 @@ init_reboot_notifier(void) } static void -sigusr1_handler(int signr UNUSED) +sigusr1_handler(int signr OVS_UNUSED) { sigusr1_triggered = true; } @@ -1874,7 +1880,7 @@ yesno(const char *title, bool def) } static void -cmd_show_version(const struct dict *dict UNUSED) +cmd_show_version(const struct dict *dict OVS_UNUSED) { show_string(VERSION BUILDNR); } @@ -1895,7 +1901,7 @@ cmd_browse_status(const struct dict *dict) } static void -cmd_shell(const struct dict *dict UNUSED) +cmd_shell(const struct dict *dict OVS_UNUSED) { const char *home; @@ -1919,7 +1925,7 @@ cmd_shell(const struct dict *dict UNUSED) } static void -cmd_show_motto(const struct dict *dict UNUSED) +cmd_show_motto(const struct dict *dict OVS_UNUSED) { show_string("\"Just Add Ice\""); } @@ -2457,7 +2463,7 @@ abbreviate_netdevs(const struct svec *netdevs, struct ds *abbrev) static void choose_netdevs(struct svec *choices) { - struct svec netdevs; + struct svec netdevs = SVEC_EMPTY_INITIALIZER; struct menu menu; size_t i; @@ -2547,7 +2553,7 @@ disconnected_string(int value) } static void -cmd_configure(const struct dict *dict UNUSED) +cmd_configure(const struct dict *dict OVS_UNUSED) { bool debug_mode = dict_get_bool(dict, "debug", false); struct dict config_dict; @@ -2889,7 +2895,7 @@ cmd_configure(const struct dict *dict UNUSED) } static void -cmd_set_up_pki(const struct dict *dict UNUSED) +cmd_set_up_pki(const struct dict *dict OVS_UNUSED) { static const char def_privkey_file[] = "/etc/openflow-switch/of0-privkey.pem";