All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hugo Mills <hugo-lkml@carfax.org.uk>
To: Frank Kingswood <frank@kingswood-consulting.co.uk>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [patch 2/4] Add an option to show ISO, binary or raw bytes counts using df.
Date: Mon, 18 Oct 2010 21:46:54 +0100	[thread overview]
Message-ID: <20101018204654.GA7986@vlad.carfax.org.uk> (raw)
In-Reply-To: <4CBC03A4.4080600@kingswood-consulting.co.uk>

[-- Attachment #1: Type: text/plain, Size: 2286 bytes --]

On Mon, Oct 18, 2010 at 09:21:56AM +0100, Frank Kingswood wrote:
> On 17/10/10 19:26, hugo-lkml@carfax.org.uk wrote:
>> Change btrfs filesystem df to allow the user to control the scales
>> used for sizes in the output.
>>
>> Index: btrfs-progs-unstable/btrfs.c
>> ===================================================================
>> --- btrfs-progs-unstable.orig/btrfs.c	2010-10-17 18:43:57.000000000 +0100
>> +++ btrfs-progs-unstable/btrfs.c	2010-10-17 18:47:36.000000000 +0100
>> @@ -87,9 +87,10 @@
>>   		"Show the info of a btrfs filesystem. If no<uuid>  or<label>\n"
>>   		"is passed, info of all the btrfs filesystem are shown."
>>   	},
>> -	{ do_df_filesystem, 1,
>> -	  "filesystem df", "<path>\n"
>> +	{ do_df_filesystem, -1,
>> +	  "filesystem df", "[-r|-b|-i]<path>\n"
>>   		"Show space usage information for a mount point\n."
>> +		"-r, -b, -i for raw (bytes), binary or ISO sizes."
>>   	},
>
> This seems to eat up the short option namespace a bit quickly.
> Fileutils uses different names as well, it may be convenient for users to 
> match its names:
> 	-h --human-readable   powers of 2**10
> 	-H --si   powers of 1000

   Matching fileutils is probably a good idea. I'm happy to use -h and
-H.

>>   	{ do_balance, 1,
>>   	  "filesystem balance", "<path>\n"
>> Index: btrfs-progs-unstable/btrfs_cmds.c
>> ===================================================================
>> --- btrfs-progs-unstable.orig/btrfs_cmds.c	2010-10-17 18:43:57.000000000 +0100
>> +++ btrfs-progs-unstable/btrfs_cmds.c	2010-10-17 18:47:36.000000000 +0100
>> @@ -841,7 +841,36 @@
>>   	u64 count = 0, i;
>>   	int ret;
>>   	int fd;
>> -	char *path = argv[1];
>> +	char *path;
>> +	int format = PRETTY_SIZE_BINARY;
>
> Should the default not be to show sizes in bytes ("RAW")?

   I was trying not to change the default behaviour at all, but with
-h/-H (and no switch for --raw), that would make sense. I'll re-roll
the patches. (And update the man pages, as Goffredo asked).

   Hugo.

-- 
=== Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk ===
  PGP key: 515C238D from wwwkeys.eu.pgp.net or http://www.carfax.org.uk
     --- "I don't like the look of it,  I tell you." "Well, stop ---     
                          looking at it, then."                          

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2010-10-18 20:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-17 18:26 [patch 0/4] Size reporting of btrfs tool hugo-lkml
2010-10-17 18:26 ` [patch 1/4] Update pretty-printer for different multiple systems hugo-lkml
2010-10-17 18:26 ` [patch 2/4] Add an option to show ISO, binary or raw bytes counts using df hugo-lkml
2010-10-18  8:21   ` Frank Kingswood
2010-10-18 20:46     ` Hugo Mills [this message]
2010-10-17 18:26 ` [patch 3/4] Add an option to show ISO, binary or raw bytes counts using show hugo-lkml
2010-10-17 18:26 ` [patch 4/4] Add an option to show ISO, binary or raw bytes counts using btrfs-show hugo-lkml

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101018204654.GA7986@vlad.carfax.org.uk \
    --to=hugo-lkml@carfax.org.uk \
    --cc=frank@kingswood-consulting.co.uk \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.