From: yangsheng Date: Tue, 16 Nov 2010 06:04:24 +0000 (+0800) Subject: b=24003 Shows stripe_count: 65535 but should be '-1'. X-Git-Tag: 2.0.56.0~13 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=4a99c80813924fdcd3871a166394734fb4cd045a b=24003 Shows stripe_count: 65535 but should be '-1'. i=johann --- diff --git a/lustre/utils/liblustreapi.c b/lustre/utils/liblustreapi.c index 2167131..233c7b0 100644 --- a/lustre/utils/liblustreapi.c +++ b/lustre/utils/liblustreapi.c @@ -1402,8 +1402,14 @@ static void lov_dump_user_lmm_header(struct lov_user_md *lum, char *path, if (verbose & ~VERBOSE_COUNT) llapi_printf(LLAPI_MSG_NORMAL, "%sstripe_count: ", prefix); - llapi_printf(LLAPI_MSG_NORMAL, "%hd%c", - (__s16)lum->lmm_stripe_count, nl); + if (is_dir) + llapi_printf(LLAPI_MSG_NORMAL, "%d%c", + lum->lmm_stripe_count == + (typeof(lum->lmm_stripe_count))(-1) ? -1 : + lum->lmm_stripe_count, nl); + else + llapi_printf(LLAPI_MSG_NORMAL, "%hd%c", + (__s16)lum->lmm_stripe_count, nl); } if (verbose & VERBOSE_SIZE) {