Remove unused 'not_last' parameter from ip_add_del_route
[vpp.git] / src / vat / api_format.c
index e7382c2..bc5e959 100644 (file)
@@ -2137,6 +2137,7 @@ static void vl_api_memfd_segment_create_reply_t_handler
 
       vam->client_index_invalid = 1;
 
+      /* Note: this closes memfd.fd */
       retval = memfd_slave_init (&memfd);
       if (retval)
        clib_warning ("WARNING: segment map returned %d", retval);
@@ -2152,8 +2153,6 @@ static void vl_api_memfd_segment_create_reply_t_handler
       vl_client_connect_to_vlib_no_map ("pvt",
                                        "vpp_api_test(p)",
                                        32 /* input_queue_length */ );
-      if (close (my_fd) < 0)
-       clib_unix_warning ("close memfd fd pivot");
       vam->vl_input_queue = am->shmem_hdr->vl_input_queue;
 
       vl_socket_client_enable_disable (&vam->socket_client_main,
@@ -5885,7 +5884,7 @@ exec_inband (vat_main_t * vam)
   W (ret);
   /* json responses may or may not include a useful reply... */
   if (vec_len (vam->cmd_reply))
-    print (vam->ofp, (char *) (vam->cmd_reply));
+    print (vam->ofp, "%v", (char *) (vam->cmd_reply));
   return ret;
 }
 
@@ -7565,7 +7564,6 @@ api_ip_add_del_route (vat_main_t * vam)
   u8 create_vrf_if_needed = 0;
   u8 is_add = 1;
   u32 next_hop_weight = 1;
-  u8 not_last = 0;
   u8 is_multipath = 0;
   u8 address_set = 0;
   u8 address_length_set = 0;
@@ -7649,8 +7647,6 @@ api_ip_add_del_route (vat_main_t * vam)
        is_add = 0;
       else if (unformat (i, "add"))
        is_add = 1;
-      else if (unformat (i, "not-last"))
-       not_last = 1;
       else if (unformat (i, "resolve-via-host"))
        resolve_host = 1;
       else if (unformat (i, "resolve-via-attached"))
@@ -7759,7 +7755,6 @@ api_ip_add_del_route (vat_main_t * vam)
       mp->is_multipath = is_multipath;
       mp->is_resolve_host = resolve_host;
       mp->is_resolve_attached = resolve_attached;
-      mp->not_last = not_last;
       mp->next_hop_weight = next_hop_weight;
       mp->dst_address_length = dst_address_length;
       mp->next_hop_table_id = ntohl (next_hop_table_id);
@@ -20918,16 +20913,12 @@ api_app_namespace_add_del (vat_main_t * vam)
 static int
 api_memfd_segment_create (vat_main_t * vam)
 {
+#if VPP_API_TEST_BUILTIN == 0
   unformat_input_t *i = vam->input;
   vl_api_memfd_segment_create_t *mp;
   u64 size = 64 << 20;
   int ret;
 
-#if VPP_API_TEST_BUILTIN == 1
-  errmsg ("memfd_segment_create (builtin) not supported");
-  return -99;
-#endif
-
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
       if (unformat (i, "size %U", unformat_memory_size, &size))
@@ -20941,6 +20932,11 @@ api_memfd_segment_create (vat_main_t * vam)
   S (mp);
   W (ret);
   return ret;
+
+#else
+  errmsg ("memfd_segment_create (builtin) not supported");
+  return -99;
+#endif
 }
 
 static int