[sheepdog] [PATCH v4 10/10] collie: show copy number in the output of 'collie vdi list'
levin li
levin108 at gmail.com
Thu Aug 9 07:27:45 CEST 2012
From: levin li <xingke.lwp at taobao.com>
Signed-off-by: levin li <xingke.lwp at taobao.com>
---
collie/vdi.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/collie/vdi.c b/collie/vdi.c
index 08aa0b6..9408338 100644
--- a/collie/vdi.c
+++ b/collie/vdi.c
@@ -111,14 +111,14 @@ static void print_vdi_list(uint32_t vid, char *name, char *tag, uint32_t snapid,
putchar('\\');
putchar(*name++);
}
- printf(" %d %s %s %s %s %" PRIx32 " %s\n", snapid,
+ printf(" %d %s %s %s %s %" PRIx32 " %d %s\n", snapid,
vdi_size_str, my_objs_str, cow_objs_str, dbuf, vid,
- i->tag);
+ i->nr_copies, i->tag);
} else {
- printf("%c %-8s %5d %7s %7s %7s %s %7" PRIx32 " %s\n",
+ printf("%c %-8s %5d %7s %7s %7s %s %7" PRIx32 " %5d %13s\n",
is_current(i) ? (is_clone ? 'c' : ' ') : 's',
name, snapid, vdi_size_str, my_objs_str, cow_objs_str,
- dbuf, vid, i->tag);
+ dbuf, vid, i->nr_copies, i->tag);
}
}
@@ -311,7 +311,7 @@ static int vdi_list(int argc, char **argv)
char *vdiname = argv[optind];
if (!raw_output)
- printf(" Name Id Size Used Shared Creation time VDI id Tag\n");
+ printf(" Name Id Size Used Shared Creation time VDI id Copies Tag\n");
if (vdiname) {
struct get_vdi_info info;
--
1.7.1
More information about the sheepdog
mailing list