Re: [PATCH 1/3] btrfs-progs: move out print in cmd_df to another function

2013-08-29 Thread Wang Shilong
On 08/16/2013 08:48 PM, Anand Jain wrote: Hello Anand, We'd appreciate you use checkpatch.pl to check coding style before sending patches. For this patch: ERROR: foo * bar should be foo *bar #35: FILE: cmds-filesystem.c:47: +static char * group_type_str(u64 flag) ERROR: foo * bar should be

Re: [PATCH 1/3] btrfs-progs: move out print in cmd_df to another function

2013-08-29 Thread Anand Jain
Hi Wang, apologies it didn't pass checkpatch.pl. will fix them. Thanks, Anand On 08/30/2013 10:01 AM, Wang Shilong wrote: On 08/16/2013 08:48 PM, Anand Jain wrote: Hello Anand, We'd appreciate you use checkpatch.pl to check coding style before sending patches. For this patch: ERROR:

Re: [PATCH 1/3] btrfs-progs: move out print in cmd_df to another function

2013-08-20 Thread Anand Jain
This seems to be a whole lot of code for a simple iterating printf: struct space_type_thingy_whatver *sp = sargs-spaces; for (i = 0; i sargs-total_spaces; i++, sp++) { printf(%s, %s: total=%s, used=%s\n, group_type_str(sp-flags),

Re: [PATCH 1/3] btrfs-progs: move out print in cmd_df to another function

2013-08-19 Thread Zach Brown
+static void print_df(struct btrfs_ioctl_space_args *sargs) +{ + char description[80]; + char *total_bytes; + char *used_bytes; + u64 flags; + u64 i; + int written; + char g_str[64]; + int g_sz; + for (i = 0; i sargs-total_spaces; i++) { +

[PATCH 1/3] btrfs-progs: move out print in cmd_df to another function

2013-08-16 Thread Anand Jain
This is a prepatory work for the following btrfs fi show command fixes. So that we have a function get_df to get the fs sizes v2: combined the other patches as below and rebase btrfs-progs: get string for the group profile and type Signed-off-by: Anand Jain anand.j...@oracle.com ---