X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=snmp%2Flustre-snmp.c;h=047385273fae7999491745f44b3bb1baea2a9a4c;hp=1a3039af0d365a58356805b7ad9854ff66b85cef;hb=303ea892488b985ba84e6c8e1481f6c7c914c7ed;hpb=313b3c3b9d82670b77d4624deb4471f89fc5a8cb diff --git a/snmp/lustre-snmp.c b/snmp/lustre-snmp.c index 1a3039a..0473852 100644 --- a/snmp/lustre-snmp.c +++ b/snmp/lustre-snmp.c @@ -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. @@ -26,8 +24,10 @@ * 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. + * + * Copyright (c) 2012, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/ @@ -238,23 +238,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 +573,7 @@ write_sysStatus(int action, size_t name_len) { static long *long_ret; - int size; - int pid, new_value; + int new_value; @@ -599,7 +598,6 @@ write_sysStatus(int action, case RESERVE2: - size = var_val_len; long_ret = (long *) var_val;