Cleanly support debug packages
[zfs.git] / lib / libzpool / util.c
index 781edb6..231043d 100644 (file)
@@ -19,8 +19,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
+ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
  */
 
 #include <assert.h>
@@ -90,7 +89,7 @@ show_vdev_stats(const char *desc, const char *ctype, nvlist_t *nv, int indent)
                if (is_log)
                        prefix = "log ";
 
-               if (nvlist_lookup_uint64_array(nv, ZPOOL_CONFIG_STATS,
+               if (nvlist_lookup_uint64_array(nv, ZPOOL_CONFIG_VDEV_STATS,
                    (uint64_t **)&vs, &c) != 0)
                        vs = &v0;
 
@@ -109,7 +108,7 @@ show_vdev_stats(const char *desc, const char *ctype, nvlist_t *nv, int indent)
                (void) printf("%*s%s%*s%*s%*s %5s %5s %5s %5s %5s %5s %5s\n",
                    indent, "",
                    prefix,
-                   indent + strlen(prefix) - 25 - (vs->vs_space ? 0 : 12),
+                   (int)(indent+strlen(prefix)-25-(vs->vs_space ? 0 : 12)),
                    desc,
                    vs->vs_space ? 6 : 0, vs->vs_space ? used : "",
                    vs->vs_space ? 6 : 0, vs->vs_space ? avail : "",