[netperf-dev] netperf2 commit notice r315 - trunk/src

raj at netperf.org raj at netperf.org
Tue Sep 8 11:33:28 PDT 2009


Author: raj
Date: 2009-09-08 11:33:27 -0700 (Tue, 08 Sep 2009)
New Revision: 315

Modified:
   trunk/src/netslot_linux.c
Log:
more jose fixes

Modified: trunk/src/netslot_linux.c
===================================================================
--- trunk/src/netslot_linux.c	2009-09-08 18:31:19 UTC (rev 314)
+++ trunk/src/netslot_linux.c	2009-09-08 18:33:27 UTC (rev 315)
@@ -127,6 +127,7 @@
   return ret;
   
 }
+
 void
 find_interface_ids(char *interface_name, int *vendor, int *device, int *sub_vend, int *sub_dev) {
 
@@ -135,23 +136,19 @@
   char sysfile[128];  /* gotta love constants */
 
   /* first the vendor id */
-  ret = snprintf(sysfile,127,"/sys/class/net/%s/device/vendor",interface_name);
-  sysfile[128] = 0;
+  ret = snprintf(sysfile,128,"/sys/class/net/%s/device/vendor",interface_name);
   *vendor = get_val_from_file(sysfile);
 
   /* next the device */
-  ret = snprintf(sysfile,127,"/sys/class/net/%s/device/device",interface_name);
-  sysfile[128] = 0;
+  ret = snprintf(sysfile,128,"/sys/class/net/%s/device/device",interface_name);
   *device = get_val_from_file(sysfile);
 
   /* next the subsystem vendor */
-  ret = snprintf(sysfile,127,"/sys/class/net/%s/device/subsystem_vendor",interface_name);
-  sysfile[128] = 0;
+  ret = snprintf(sysfile,128,"/sys/class/net/%s/device/subsystem_vendor",interface_name);
   *sub_vend = get_val_from_file(sysfile);
 
   /* next the subsystem device */
-  ret = snprintf(sysfile,127,"/sys/class/net/%s/device/subsystem_device",interface_name);
-  sysfile[128] = 0;
+  ret = snprintf(sysfile,128,"/sys/class/net/%s/device/subsystem_device",interface_name);
   *sub_dev = get_val_from_file(sysfile);
 
 }



More information about the netperf-dev mailing list