Whamcloud - gitweb
LU-1187 tests: add create remote directory to racer
[fs/lustre-release.git] / snmp / lustre-snmp.c
index 3a8709b..3225e23 100644 (file)
@@ -1,6 +1,4 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
+/*
  * GPL HEADER START
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -16,8 +14,8 @@
  * in the LICENSE file that accompanied this code).
  *
  * You should have received a copy of the GNU General Public License
- * version 2 along with this program; If not, see [sun.com URL with a
- * copy of GPLv2].
+ * version 2 along with this program; If not, see
+ * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
  *
  * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
  * CA 95054 USA or visit www.sun.com if you need additional information or
@@ -26,7 +24,7 @@
  * GPL HEADER END
  */
 /*
- * Copyright  2008 Sun Microsystems, Inc. All rights reserved
+ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  */
 /*
@@ -238,23 +236,23 @@ var_clusterFileSystems(struct variable *vp,
 
     case SYSVERSION:
         sprintf(file_path, "%s%s", LUSTRE_PATH,"version");
-        if( SUCCESS != read_string(file_path, string,sizeof(string)))
+        if( SUCCESS != read_string(file_path, (char *)string,sizeof(string)))
             return NULL;
-        *var_len = strlen(string);
+        *var_len = strlen((char *)string);
         return (unsigned char *) string;
 
     case SYSKERNELVERSION:
         sprintf(file_path, "%s%s", LUSTRE_PATH,"kernel_version");
-        if( SUCCESS != read_string(file_path, string,sizeof(string)))
+        if( SUCCESS != read_string(file_path, (char *)string,sizeof(string)))
             return NULL;
-        *var_len = strlen(string);
+        *var_len = strlen((char *)string);
         return (unsigned char *) string;
 
     case SYSHEALTHCHECK:
         sprintf(file_path, "%s%s", LUSTRE_PATH,FILENAME_SYSHEALTHCHECK);
-        if( SUCCESS != read_string(file_path, string,sizeof(string)))
+        if( SUCCESS != read_string(file_path, (char *)string,sizeof(string)))
             return NULL;
-        *var_len = strlen(string);
+        *var_len = strlen((char*)string);
         return (unsigned char *) string;
 
     case SYSSTATUS:
@@ -573,8 +571,7 @@ write_sysStatus(int      action,
             size_t   name_len)
 {
   static long *long_ret;
-  int size;
-  int pid, new_value;
+  int new_value;
 
 
 
@@ -599,7 +596,6 @@ write_sysStatus(int      action,
 
 
         case RESERVE2:
-          size = var_val_len;
           long_ret = (long *) var_val;