From 7eef566dbf56a3b23c7d7ac0302a5eeb019c12df Mon Sep 17 00:00:00 2001 From: yangsheng Date: Thu, 21 Oct 2010 18:42:00 +0800 Subject: [PATCH] b=24003 Shows stripe_count: 65535 but should be '-1'. i=johann --- lustre/utils/liblustreapi.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lustre/utils/liblustreapi.c b/lustre/utils/liblustreapi.c index 18f6184..e7e30a1 100644 --- a/lustre/utils/liblustreapi.c +++ b/lustre/utils/liblustreapi.c @@ -1382,8 +1382,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, "%u%c", - (int)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, "%u%c", + (int)lum->lmm_stripe_count, nl); } if (verbose & VERBOSE_SIZE) { -- 1.8.3.1