Whamcloud - gitweb
LU-1154 clio: rename coo_attr_set to coo_attr_update
[fs/lustre-release.git] / lnet / utils / debug.c
index b87b43c..1954a31 100644 (file)
@@ -27,7 +27,7 @@
  * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  *
- * Copyright (c) 2011, 2012, Intel Corporation.
+ * Copyright (c) 2011, 2014, Intel Corporation.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -728,10 +728,12 @@ int jt_dbg_clear_debug_buf(int argc, char **argv)
 int jt_dbg_mark_debug_buf(int argc, char **argv)
 {
        static char scratch[MAX_MARK_SIZE] = "";
-       struct libcfs_ioctl_data data = { 0 };
+       struct libcfs_ioctl_data data;
        char *text;
        int rc;
 
+       memset(&data, 0, sizeof(data));
+
        if (argc > 1) {
                int count, max_size = sizeof(scratch) - 1;
 
@@ -752,18 +754,19 @@ int jt_dbg_mark_debug_buf(int argc, char **argv)
 
        data.ioc_inllen1 = strlen(text) + 1;
        data.ioc_inlbuf1 = text;
-        if (libcfs_ioctl_pack(&data, &buf, max) != 0) {
-                fprintf(stderr, "libcfs_ioctl_pack failed.\n");
-                return -1;
-        }
 
-        rc = l_ioctl(LNET_DEV_ID, IOC_LIBCFS_MARK_DEBUG, buf);
-        if (rc) {
-                fprintf(stderr, "IOC_LIBCFS_MARK_DEBUG failed: %s\n",
-                        strerror(errno));
-                return -1;
-        }
-        return 0;
+       if (libcfs_ioctl_pack(&data, &buf, max) != 0) {
+               fprintf(stderr, "libcfs_ioctl_pack failed.\n");
+               return -1;
+       }
+
+       rc = l_ioctl(LNET_DEV_ID, IOC_LIBCFS_MARK_DEBUG, buf);
+       if (rc) {
+               fprintf(stderr, "IOC_LIBCFS_MARK_DEBUG failed: %s\n",
+                       strerror(errno));
+               return -1;
+       }
+       return 0;
 }
 
 static struct mod_paths {