Whamcloud - gitweb
LU-960 utils: bad stripe count report, and validate stripe size
[fs/lustre-release.git] / lustre / utils / liblustreapi.c
index 88a0cd2..2994cdd 100644 (file)
@@ -177,6 +177,9 @@ int parse_size(char *optarg, unsigned long long *size,
 {
         char *end;
 
+        if (strncmp(optarg, "-", 1) == 0)
+                return -1;
+
         if (*size_units == 0)
                 *size_units = 1;
 
@@ -1654,7 +1657,7 @@ static void lov_dump_user_lmm_header(struct lov_user_md *lum, char *path,
                                                               &scount, NULL,
                                                               NULL);
                                 if (rc == 0)
-                                        llapi_printf(LLAPI_MSG_NORMAL, "%u%c",
+                                        llapi_printf(LLAPI_MSG_NORMAL, "%d%c",
                                                      scount, nl);
                                 else
                                         llapi_error(LLAPI_MSG_ERROR, rc,
@@ -1698,6 +1701,14 @@ static void lov_dump_user_lmm_header(struct lov_user_md *lum, char *path,
                              lum->lmm_pattern, nl);
         }
 
+        if ((verbose & VERBOSE_GENERATION) && !is_dir) {
+                if (verbose & ~VERBOSE_GENERATION)
+                        llapi_printf(LLAPI_MSG_NORMAL, "%slayout_gen:     ",
+                                     prefix);
+                llapi_printf(LLAPI_MSG_NORMAL, "%u%c",
+                             (int)lum->u.lum_layout_gen, nl);
+        }
+
         if (verbose & VERBOSE_OFFSET) {
                 if (verbose & ~VERBOSE_OFFSET)
                         llapi_printf(LLAPI_MSG_NORMAL, "%sstripe_offset:  ",
@@ -1926,7 +1937,7 @@ static int find_time_check(lstat_t *st, struct find_param *param, int mds)
         /* Check if file is accepted. */
         if (param->atime) {
                 ret = find_value_cmp(st->st_atime, param->atime,
-                                     param->asign, param->exclude_atime, 
+                                     param->asign, param->exclude_atime,
                                      24 * 60 * 60, mds);
                 if (ret < 0)
                         return ret;
@@ -1935,7 +1946,7 @@ static int find_time_check(lstat_t *st, struct find_param *param, int mds)
 
         if (param->mtime) {
                 ret = find_value_cmp(st->st_mtime, param->mtime,
-                                     param->msign, param->exclude_mtime, 
+                                     param->msign, param->exclude_mtime,
                                      24 * 60 * 60, mds);
                 if (ret < 0)
                         return ret;