On 10/03/2012 10:38 PM, Hugo Mills wrote:
+ if( !(flags& (DF_SHOW_SUMMARY|DF_SHOW_DETAIL)) ){
> > + fprintf(stderr, "btrfs filesystem df: it is not possible to specify -s AND -d\n");
>
> This doesn't look right at all. You are adding two switches and
> specifying both of them is an error? A little too much for a command
> whose job is to do some basic math and pretty-print the result.
>
> How about displaying just the summary by default and then adding a
> *single* switch (-v or whatever) for summary+details?
I'd prefer to see both sections by default. The reason for this is
that without both sections, people tend to get confused because they
don't know they're looking at half the story (e.g. some numbers change
twice as fast as they think they should).
I agree with Hugo. As default both the section should be showed.
I think supplying both options should probably show both sections
again, and make it not an error to do so, but I'm happy either way.
Because the default is to show both the sections, passing a switch means
"hide the other section". So passing both the switches means: "hide both
the sections"...
This is the reason of the check.
I am thinking to remove both the switches... But today is too late...
Now I am seeing a reply by Ilya which reached this same conclusion...
But today is still to late. Tomorrow I will rearrange the patch...
Hugo.
Goffredp
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html