From: Goffredo Baroncelli <kreijack@inwind.it>
To: Ilya Dryomov <idryomov@gmail.com>
Cc: "linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH 1/2] Update btrfs filesystem df command
Date: Wed, 03 Oct 2012 19:09:39 +0200 [thread overview]
Message-ID: <506C7153.4020004@inwind.it> (raw)
In-Reply-To: <20121003150219.GB1978@zambezi.lan>
On 10/03/2012 05:02 PM, Ilya Dryomov wrote:
>> +static int cmd_disk_free(int argc, char **argv)
>> > +{
>> > +
>> > + int flags=DF_SHOW_SUMMARY|DF_SHOW_DETAIL|DF_HUMAN_UNIT;
>> > + int i, more_than_one=0;
>> > +
>> > + if (check_argc_min(argc, 2))
>> > + usage(cmd_disk_free_usage);
>> > +
>> > + for(i=1; i< argc ; i++){
>> > + if(!strcmp(argv[i],"-d"))
>> > + flags&= ~DF_SHOW_DETAIL;
>> > + else if(!strcmp(argv[i],"-s"))
>> > + flags&= ~DF_SHOW_SUMMARY;
>> > + else if(!strcmp(argv[i],"-k"))
>> > + flags&= ~DF_HUMAN_UNIT;
>> > + else{
>> > + int r;
>> > + if(more_than_one)
>> > + printf("\n");
>> > + r = _cmd_disk_free(argv[i], flags);
>> > + if( r ) return r;
>> > + more_than_one=1;
>> > + }
> Is there any reason getopt(), or better yet, getopt_long() won't work?
I re-changed idea: I will use getopt()
>
next prev parent reply other threads:[~2012-10-03 17:10 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-03 11:43 [PATCH][BTRFS-PROGS][V1] btrfs filesystem df Goffredo Baroncelli
2012-10-03 11:43 ` [PATCH 1/2] Update btrfs filesystem df command Goffredo Baroncelli
2012-10-03 15:02 ` Ilya Dryomov
2012-10-03 16:34 ` Goffredo Baroncelli
2012-10-03 17:20 ` Ilya Dryomov
2012-10-03 17:38 ` Goffredo Baroncelli
2012-10-03 17:09 ` Goffredo Baroncelli [this message]
2012-10-03 11:43 ` [PATCH 2/2] Update help page Goffredo Baroncelli
2012-10-03 11:56 ` [PATCH][BTRFS-PROGS][V1] btrfs filesystem df Hugo Mills
2012-10-03 16:17 ` Goffredo Baroncelli
2012-10-03 16:34 ` Hugo Mills
2012-10-09 9:43 ` Bart Noordervliet
2012-10-09 11:38 ` Goffredo Baroncelli
2012-10-09 12:51 ` Bart Noordervliet
2012-10-09 18:22 ` Goffredo Baroncelli
2012-10-12 9:42 ` Martin Steigerwald
2012-10-03 15:01 ` Ilya Dryomov
2012-10-03 16:46 ` Goffredo Baroncelli
2012-10-03 17:46 ` Ilya Dryomov
2012-10-03 20:01 ` Goffredo Baroncelli
2012-10-03 20:24 ` Ilya Dryomov
2012-10-12 10:01 ` Martin Steigerwald
2012-10-12 9:55 ` Martin Steigerwald
-- strict thread matches above, loose matches on Subject: below --
2012-10-03 17:22 [PATCH][BTRFS-PROGS][V2] " Goffredo Baroncelli
2012-10-03 17:22 ` [PATCH 1/2] Update btrfs filesystem df command Goffredo Baroncelli
2012-10-03 20:34 ` Ilya Dryomov
2012-10-03 20:38 ` Hugo Mills
2012-10-03 20:43 ` Ilya Dryomov
2012-10-03 20:53 ` Goffredo Baroncelli
2012-10-04 17:27 [PATCH][BTRFS-PROGS][V3] btrfs filesystem df Goffredo Baroncelli
2012-10-04 17:27 ` [PATCH 1/2] Update btrfs filesystem df command Goffredo Baroncelli
2012-10-13 17:47 [PATCH][BTRFS-PROGS][V4] btrfs filesystem df Goffredo Baroncelli
2012-10-13 17:47 ` [PATCH 1/2] Update btrfs filesystem df command Goffredo Baroncelli
2012-10-13 19:14 [PATCH][BTRFS-PROGS][V6] btrfs filesystem df Goffredo Baroncelli
2012-10-13 19:14 ` [PATCH 1/2] Update btrfs filesystem df command Goffredo Baroncelli
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=506C7153.4020004@inwind.it \
--to=kreijack@inwind.it \
--cc=idryomov@gmail.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).