This patch randomizes the error codes and also fixes up some typos including capitalization in the output. It would almost be nice to see a translation effort for the tool as well.
Goffredo Baroncelli
2010-Aug-20 12:03 UTC
Re: [RFC] Move all btrfs command to only one command
On Thursday, 19 August, 2010, James Smith wrote:> This patch randomizes the error codes and also fixes up some typosincluding> capitalization in the output. > > It would almost be nice to see a translation effort for the tool as well. >Hi James, I don''t comment the changing the capitalization. Regarding the other changes: [...] { struct Command *cp; - printf("Usage:\n"); + printf("VFS-2593 %s\n", BTRFS_BUILD_VERSION); ^^^^^^^^ What means VFS-2593 ? + printf("\nNo matter where you go, there you are.\n"); Is it really useful this kind of comment ? [...] + fprintf(stderr, "ERR-A.11: in command ''"); I am not against this kind of error codes, but I prefer + fprintf(stderr, "Error ''ERR-A.11'' in command ''"); And a file.txt which details the error codes (otherwise these errors are not very useful). Why some error codes contain a dot (see ERR-C.13) and others not (like ERR- A3) ? Reagrds G.Baroncelli -- gpg key@ keyserver.linux.it: Goffredo Baroncelli (ghigo) <kreijackATinwind.it> Key fingerprint = 4769 7E51 5293 D36C 814E C054 BF04 F161 3DC5 0512 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Fri, Aug 20, 2010 at 7:03 AM, Goffredo Baroncelli <kreijack@gmail.com> wrote:> > > + fprintf(stderr, "ERR-A.11: in command ''"); > > I am not against this kind of error codes, but I prefer > > + fprintf(stderr, "Error ''ERR-A.11'' in command ''"); > > And a file.txt which details the error codes (otherwise these errors are not > very useful). > > Why some error codes contain a dot (see ERR-C.13) and others not (like ERR- > A3) ?Goffredo Baroncelli - I think those are good comments! However, I would further suggest that when reporting an error code that including the ''ERR-'' prefix is redundant. Therefore, I propose: fprintf(stderr, "Error ''A.11'' in command ''"); What does A. 11 refer to, anyway? -- Jon -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Benjamin Griese
2010-Aug-20 14:42 UTC
Re: [RFC] Move all btrfs command to only one command
Hello guys, I would also prefer doing it in an all-in-one tool with various parameters. I like the concept how the Solaris-Devs did it by consolidating every special configuration tool to an "xyzadm"-binary (idea: btrfsadm? i.e. similar to mdadm?). For me as an admin it is easier to remember only one command, especially when its neccessery to use it only from time to time. There exists only one manpage where every parameter is found (in theory). :) And for the devs (sorry, I''m not one of those guys ;) ) maybe its easier to maintain/improve only one binary + lib. Just my opinion. :) bye, benjamin On Fri, Aug 20, 2010 at 14:43, Jon Nelson <jnelson@jamponi.net> wrote:> On Fri, Aug 20, 2010 at 7:03 AM, Goffredo Baroncelli <kreijack@gmail.com> wrote: >> >> >> + fprintf(stderr, "ERR-A.11: in command ''"); >> >> I am not against this kind of error codes, but I prefer >> >> + fprintf(stderr, "Error ''ERR-A.11'' in command ''"); >> >> And a file.txt which details the error codes (otherwise these errors are not >> very useful). >> >> Why some error codes contain a dot (see ERR-C.13) and others not (like ERR- >> A3) ? > > Goffredo Baroncelli - I think those are good comments! > > However, I would further suggest that when reporting an error code > that including the ''ERR-'' prefix is redundant. Therefore, I propose: > > fprintf(stderr, "Error ''A.11'' in command ''"); > > What does A. 11 refer to, anyway? > > -- > Jon > -- > To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html >-- To be or not to be -- Shakespeare | To do is to be -- Nietzsche | To be is to do -- Sartre | Do be do be do -- Sinatra -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Fri, Aug 20, 2010 at 05:03, Goffredo Baroncelli <kreijack@gmail.com> wrote:> On Thursday, 19 August, 2010, James Smith wrote: >> This patch randomizes the error codes and also fixes up some typos > including >> capitalization in the output. >> >> It would almost be nice to see a translation effort for the tool as well.[...]> > + fprintf(stderr, "ERR-A.11: in command ''"); > > I am not against this kind of error codes, but I prefer > > + fprintf(stderr, "Error ''ERR-A.11'' in command ''");As a layman/end user, I disagree. The former format is easier for shell scripts and the like to parse -- the error code can be extracted with a simple "cut -d: -f1". (In fact, I wish the output from things like "btrfs filesystem df", "show", etc. were easier to parse, but that''s a separate issue. :) ) -- Josh -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Andreas Philipp
2010-Aug-20 18:34 UTC
Re: [RFC] Move all btrfs command to only one command
On 20.08.2010 20:27, Josh Berry wrote:> On Fri, Aug 20, 2010 at 05:03, Goffredo Baroncelli<kreijack@gmail.com> wrote: >> On Thursday, 19 August, 2010, James Smith wrote: >>> This patch randomizes the error codes and also fixes up some typos >> including >>> capitalization in the output. >>> >>> It would almost be nice to see a translation effort for the tool as well. > [...] >> + fprintf(stderr, "ERR-A.11: in command ''"); >> >> I am not against this kind of error codes, but I prefer >> >> + fprintf(stderr, "Error ''ERR-A.11'' in command ''"); > As a layman/end user, I disagree. The former format is easier for > shell scripts and the like to parse -- the error code can be extracted > with a simple "cut -d: -f1".This makes no difference. A simple `cut -d " " -f1` would do the job in the second case. Andreas> (In fact, I wish the output from things like "btrfs filesystem df", > "show", etc. were easier to parse, but that''s a separate issue. :) ) > > -- Josh > -- > To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html-- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Fri, Aug 20, 2010 at 11:34, Andreas Philipp <philipp.andreas@gmail.com> wrote:> On 20.08.2010 20:27, Josh Berry wrote: >> >> On Fri, Aug 20, 2010 at 05:03, Goffredo Baroncelli<kreijack@gmail.com> >> wrote: >>> >>> On Thursday, 19 August, 2010, James Smith wrote: >>>> >>>> This patch randomizes the error codes and also fixes up some typos >>> >>> including >>>> >>>> capitalization in the output. >>>> >>>> It would almost be nice to see a translation effort for the tool as >>>> well. >> >> [...] >>> >>> + fprintf(stderr, "ERR-A.11: in command ''"); >>> >>> I am not against this kind of error codes, but I prefer >>> >>> + fprintf(stderr, "Error ''ERR-A.11'' in command ''"); >> >> As a layman/end user, I disagree. The former format is easier for >> shell scripts and the like to parse -- the error code can be extracted >> with a simple "cut -d: -f1". > > This makes no difference. A simple `cut -d " " -f1` would do the job in the > second case.I think you meant -f2, and that still leaves the quotes hanging around. So you''d need to cut -d" " -f2 |tr -d "''" . It''s not a big deal either way, I just think the former is easier to work with. -- Josh -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Goffredo Baroncelli
2010-Aug-20 18:56 UTC
Re: [RFC] Move all btrfs command to only one command
On Friday, 20 August, 2010, Benjamin Griese wrote:> Hello guys, > > I would also prefer doing it in an all-in-one tool with various parameters. > I like the concept how the Solaris-Devs did it by consolidating every > special configuration tool to an "xyzadm"-binary (idea: btrfsadm? i.e. > similar to mdadm?). > For me as an admin it is easier to remember only one command, > especially when its neccessery to use it only from time to time. > There exists only one manpage where every parameter is found (in theory).:)> And for the devs (sorry, I''m not one of those guys ;) ) maybe its > easier to maintain/improve only one binary + lib. > > Just my opinion. :)This is the reason of btrfs command. The aim of this command (which is quite new) is to groups all the btrfs related command. In fact, the btrfs command is able to replace btrfs-show, btrfs-vol, btrfsctl, which may be considered "obsolete". Regarding the other commands: * btrfs-debug-tree, btrfs-map-logical, btrfs-image: are debugging commands. Not useful to a system administrator * btrfsck: historically the fsck* program is a standalone program. And the btrfs one is not useful at all. * mkfs.btrfs: same as above * btrfs-convert, btrfstune: may be possible candidate for an inclusion in the btrfs program But what is needed is not the request but the codes :-) Regards Goffredo> > bye, benjamin > > > On Fri, Aug 20, 2010 at 14:43, Jon Nelson <jnelson@jamponi.net> wrote: > > On Fri, Aug 20, 2010 at 7:03 AM, Goffredo Baroncelli <kreijack@gmail.com>wrote:> >> > >> > >> + fprintf(stderr, "ERR-A.11: in command ''"); > >> > >> I am not against this kind of error codes, but I prefer > >> > >> + fprintf(stderr, "Error ''ERR-A.11'' in command''");> >> > >> And a file.txt which details the error codes (otherwise these errors arenot> >> very useful). > >> > >> Why some error codes contain a dot (see ERR-C.13) and others not (likeERR-> >> A3) ? > > > > Goffredo Baroncelli - I think those are good comments! > > > > However, I would further suggest that when reporting an error code > > that including the ''ERR-'' prefix is redundant. Therefore, I propose: > > > > fprintf(stderr, "Error ''A.11'' in command ''"); > > > > What does A. 11 refer to, anyway? > > > > -- > > Jon > > -- > > To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in > > the body of a message to majordomo@vger.kernel.org > > More majordomo info at http://vger.kernel.org/majordomo-info.html > > > > > > -- > To be or not to be -- Shakespeare | To do is to be -- Nietzsche | To > be is to do -- Sartre | Do be do be do -- Sinatra > -- > To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html >-- gpg key@ keyserver.linux.it: Goffredo Baroncelli (ghigo) <kreijack@inwind.it> Key fingerprint = 4769 7E51 5293 D36C 814E C054 BF04 F161 3DC5 0512 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Andreas Philipp
2010-Aug-20 19:00 UTC
Re: [RFC] Move all btrfs command to only one command
On 20.08.2010 20:49, Josh Berry wrote:> On Fri, Aug 20, 2010 at 11:34, Andreas Philipp > <philipp.andreas@gmail.com> wrote: >> On 20.08.2010 20:27, Josh Berry wrote: >>> On Fri, Aug 20, 2010 at 05:03, Goffredo Baroncelli<kreijack@gmail.com> >>> wrote: >>>> On Thursday, 19 August, 2010, James Smith wrote: >>>>> This patch randomizes the error codes and also fixes up some typos >>>> including >>>>> capitalization in the output. >>>>> >>>>> It would almost be nice to see a translation effort for the tool as >>>>> well. >>> [...] >>>> + fprintf(stderr, "ERR-A.11: in command ''"); >>>> >>>> I am not against this kind of error codes, but I prefer >>>> >>>> + fprintf(stderr, "Error ''ERR-A.11'' in command ''"); >>> As a layman/end user, I disagree. The former format is easier for >>> shell scripts and the like to parse -- the error code can be extracted >>> with a simple "cut -d: -f1". >> This makes no difference. A simple `cut -d " " -f1` would do the job in the >> second case. > I think you meant -f2, and that still leaves the quotes hanging > around. So you''d need to cut -d" " -f2 |tr -d "''" . It''s not a big > deal either way, I just think the former is easier to work with.Sorry, of course -f2. But why not simply cut -d "''" -f 2? Andreas -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Goffredo Baroncelli
2010-Aug-20 19:03 UTC
Re: [RFC] Move all btrfs command to only one command
On Friday, 20 August, 2010, Josh Berry wrote:> On Fri, Aug 20, 2010 at 11:34, Andreas Philipp > <philipp.andreas@gmail.com> wrote: > > On 20.08.2010 20:27, Josh Berry wrote: > >> > >> On Fri, Aug 20, 2010 at 05:03, Goffredo Baroncelli<kreijack@gmail.com> > >> wrote: > >>> > >>> On Thursday, 19 August, 2010, James Smith wrote: > >>>> > >>>> This patch randomizes the error codes and also fixes up some typos > >>> > >>> including > >>>> > >>>> capitalization in the output. > >>>> > >>>> It would almost be nice to see a translation effort for the tool as > >>>> well. > >> > >> [...] > >>> > >>> + fprintf(stderr, "ERR-A.11: in command ''"); > >>> > >>> I am not against this kind of error codes, but I prefer > >>> > >>> + fprintf(stderr, "Error ''ERR-A.11'' in command''");> >> > >> As a layman/end user, I disagree. The former format is easier for > >> shell scripts and the like to parse -- the error code can be extracted > >> with a simple "cut -d: -f1". > > > > This makes no difference. A simple `cut -d " " -f1` would do the job inthe> > second case. > > I think you meant -f2, and that still leaves the quotes hanging > around. So you''d need to cut -d" " -f2 |tr -d "''" . It''s not a big > deal either way, I just think the former is easier to work with.Why do not use the exit() return value ? My goal when I wrote btrfs, was a clean up of the returned codes. The btrfsctl command (the old command) is a mess regarding this aspect. But btrfs should (modulo BUG) return 0 for a successful action and a value different to 0 for an error. I agree that these codes have to be documented in the man page.> > -- Josh >-- gpg key@ keyserver.linux.it: Goffredo Baroncelli (ghigo) <kreijack@inwind.it> Key fingerprint = 4769 7E51 5293 D36C 814E C054 BF04 F161 3DC5 0512 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Fri, Aug 20, 2010 at 12:00, Andreas Philipp <philipp.andreas@gmail.com> wrote:> On 20.08.2010 20:49, Josh Berry wrote: >> >> On Fri, Aug 20, 2010 at 11:34, Andreas Philipp >> <philipp.andreas@gmail.com> wrote: >>> >>> On 20.08.2010 20:27, Josh Berry wrote: >>>> >>>> On Fri, Aug 20, 2010 at 05:03, Goffredo Baroncelli<kreijack@gmail.com> >>>> wrote: >>>>> >>>>> On Thursday, 19 August, 2010, James Smith wrote: >>>>>> >>>>>> This patch randomizes the error codes and also fixes up some typos >>>>> >>>>> including >>>>>> >>>>>> capitalization in the output. >>>>>> >>>>>> It would almost be nice to see a translation effort for the tool as >>>>>> well. >>>> >>>> [...] >>>>> >>>>> + fprintf(stderr, "ERR-A.11: in command ''"); >>>>> >>>>> I am not against this kind of error codes, but I prefer >>>>> >>>>> + fprintf(stderr, "Error ''ERR-A.11'' in command >>>>> ''"); >>>> >>>> As a layman/end user, I disagree. The former format is easier for >>>> shell scripts and the like to parse -- the error code can be extracted >>>> with a simple "cut -d: -f1". >>> >>> This makes no difference. A simple `cut -d " " -f1` would do the job in >>> the >>> second case. >> >> I think you meant -f2, and that still leaves the quotes hanging >> around. So you''d need to cut -d" " -f2 |tr -d "''" . It''s not a big >> deal either way, I just think the former is easier to work with. > > Sorry, of course -f2. But why not simply cut -d "''" -f 2?Oh right, good point. :) Though as Goffredo said, using the error code is probably better anyway. -- Josh -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Truthfully, this is probably this first I''ve actually done in C++; I used to do PHP and a small amount of Javascript. I like that the tool has seen some work and decided to at least attempt a bit more work towards a decent tool. Re: ERR codes. I don''t know if a uniform approach is what''s needed for *nix usability. However should the codes end up unified to start with or should there be some variety in how the single tool functions? I don''t know right now how much work it would be to roll fsck into it and by that time the tool is done and the error codes would have to be adjusted. The reason for the variety is simply from what I was able to pull out of the style of coding vs. the function of the tool. Btrfsctl wasn''t really designed with a clean purpose in mind, i.e. the code isn''t as modular as could be expected for uniform functioning against it''s filesystem''s role. The tools included by most filesystems in Linux are already an afterthought with functional but poor implementation. If reiserfs fell out of the sky as a model filesystem, btrfsctl fell out of the sky as a model filesystem tool. I''d like to keep the error-codes ambiguous to allow some expansion room for future work. It''s still an improvement over simply reporting ''error''. Re: VFS-2593. I think it''s a useless little change that probably doesn''t need to be there at all. As far as modelizing the tool structure it might have some merit. Otherwise I don''t know what isn''t feasible from a practicality standpoint as far as what other model tools are included into the binary that relate to btrfs alone. How long until Linux has a library for common filesystem operations, for example? How does one differentiate the tools between filesystems? If I were to choose a decent way to class tools I would probably break the program to the point where it''s functional and still has the ability to exhibit new ideas; I don''t know any other filesystem tool that''s had the same exposure on this side of the fence. The poet in question actually ended up on a plaque for the Excelsior starship of Star Trek fame, and I always kind of liked it. I sort of don''t see any reason to realistically retain it, though it might be worth as a nonsensical psychological distraction to remember while a filesystem is being tampered with. :) I''ll look at a error.txt file (after finding convention) and also update the man. In regards to shortening of dev/device -- is this really neccessary? And what harm does this cause in the first place? In device add-delete functionality. On 8/20/10, Josh Berry <des@condordes.net> wrote:> On Fri, Aug 20, 2010 at 12:00, Andreas Philipp > <philipp.andreas@gmail.com> wrote: >> On 20.08.2010 20:49, Josh Berry wrote: >>> >>> On Fri, Aug 20, 2010 at 11:34, Andreas Philipp >>> <philipp.andreas@gmail.com> wrote: >>>> >>>> On 20.08.2010 20:27, Josh Berry wrote: >>>>> >>>>> On Fri, Aug 20, 2010 at 05:03, Goffredo Baroncelli<kreijack@gmail.com> >>>>> wrote: >>>>>> >>>>>> On Thursday, 19 August, 2010, James Smith wrote: >>>>>>> >>>>>>> This patch randomizes the error codes and also fixes up some typos >>>>>> >>>>>> including >>>>>>> >>>>>>> capitalization in the output. >>>>>>> >>>>>>> It would almost be nice to see a translation effort for the tool as >>>>>>> well. >>>>> >>>>> [...] >>>>>> >>>>>> + fprintf(stderr, "ERR-A.11: in command ''"); >>>>>> >>>>>> I am not against this kind of error codes, but I prefer >>>>>> >>>>>> + fprintf(stderr, "Error ''ERR-A.11'' in command >>>>>> ''"); >>>>> >>>>> As a layman/end user, I disagree. The former format is easier for >>>>> shell scripts and the like to parse -- the error code can be extracted >>>>> with a simple "cut -d: -f1". >>>> >>>> This makes no difference. A simple `cut -d " " -f1` would do the job in >>>> the >>>> second case. >>> >>> I think you meant -f2, and that still leaves the quotes hanging >>> around. So you''d need to cut -d" " -f2 |tr -d "''" . It''s not a big >>> deal either way, I just think the former is easier to work with. >> >> Sorry, of course -f2. But why not simply cut -d "''" -f 2? > > Oh right, good point. :) Though as Goffredo said, using the error > code is probably better anyway. > > -- Josh > -- > To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html >-- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Goffredo Baroncelli
2010-Aug-21 09:37 UTC
Re: [RFC] Move all btrfs command to only one command
On Saturday, 21 August, 2010, James Smith wrote: [...]> I''ll look at a error.txt file (after finding convention) and also > update the man. In regards to shortening of dev/device -- is this > really neccessary? And what harm does this cause in the first place? > In device add-delete functionality.Make sense to rename <dev> in <device> for the "btrfs add/delete" commands> > > On 8/20/10, Josh Berry <des@condordes.net> wrote: > > On Fri, Aug 20, 2010 at 12:00, Andreas Philipp > > <philipp.andreas@gmail.com> wrote: > >> On 20.08.2010 20:49, Josh Berry wrote: > >>> > >>> On Fri, Aug 20, 2010 at 11:34, Andreas Philipp > >>> <philipp.andreas@gmail.com> wrote: > >>>> > >>>> On 20.08.2010 20:27, Josh Berry wrote: > >>>>> > >>>>> On Fri, Aug 20, 2010 at 05:03, GoffredoBaroncelli<kreijack@gmail.com>> >>>>> wrote: > >>>>>> > >>>>>> On Thursday, 19 August, 2010, James Smith wrote: > >>>>>>> > >>>>>>> This patch randomizes the error codes and also fixes up some typos > >>>>>> > >>>>>> including > >>>>>>> > >>>>>>> capitalization in the output. > >>>>>>> > >>>>>>> It would almost be nice to see a translation effort for the tool as > >>>>>>> well. > >>>>> > >>>>> [...] > >>>>>> > >>>>>> + fprintf(stderr, "ERR-A.11: in command ''"); > >>>>>> > >>>>>> I am not against this kind of error codes, but I prefer > >>>>>> > >>>>>> + fprintf(stderr, "Error ''ERR-A.11'' in command > >>>>>> ''"); > >>>>> > >>>>> As a layman/end user, I disagree. The former format is easier for > >>>>> shell scripts and the like to parse -- the error code can beextracted> >>>>> with a simple "cut -d: -f1". > >>>> > >>>> This makes no difference. A simple `cut -d " " -f1` would do the jobin> >>>> the > >>>> second case. > >>> > >>> I think you meant -f2, and that still leaves the quotes hanging > >>> around. So you''d need to cut -d" " -f2 |tr -d "''" . It''s not a big > >>> deal either way, I just think the former is easier to work with. > >> > >> Sorry, of course -f2. But why not simply cut -d "''" -f 2? > > > > Oh right, good point. :) Though as Goffredo said, using the error > > code is probably better anyway. > > > > -- Josh > > -- > > To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in > > the body of a message to majordomo@vger.kernel.org > > More majordomo info at http://vger.kernel.org/majordomo-info.html > > > -- > To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html >-- gpg key@ keyserver.linux.it: Goffredo Baroncelli (ghigo) <kreijack@inwind.it> Key fingerprint = 4769 7E51 5293 D36C 814E C054 BF04 F161 3DC5 0512 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/btrfs_cmds.c b/btrfs_cmds.c index e112902..271ca89 100644 --- a/btrfs_cmds.c +++ b/btrfs_cmds.c @@ -497,7 +497,7 @@ static void print_one_uuid(struct btrfs_fs_devices *fs_devices) devs_found++; } if (devs_found < total) { - printf("\t*** Some devices missing\n"); + printf("\t L1: Some devices missing\n"); } printf("\n"); } diff --git a/btrfs.c b/btrfs.c index 4d263c4..b3a087e 100644 --- a/btrfs.c +++ b/btrfs.c @@ -134,12 +135,13 @@ static void help(char *np) { struct Command *cp; - printf("Usage:\n"); + printf("VFS-2593-A %s\n", BTRFS_BUILD_VERSION); + printf("\nNo matter where you go, there you are.\n"); + printf("\nUsage:\n"); for( cp = commands; cp->verb; cp++ ) print_help(np, cp); - printf("\n\t%s help|--help|-h\n\t\tShow the help.\n",np); - printf("\n%s\n", BTRFS_BUILD_VERSION); + printf("\n\t%s help|--help|-h\n\t\tShow help.\n",np); } I don''t like the look of using errno.h at this time, so attached is the error code file extracted from the help file and an additional patch for label support. There may be leftover typos especially in the errorcode.txt file so it might be nice to have a read-over. Does someone want to get on strings translation? :) On 8/21/10, James Smith <smithjd15@gmail.com> wrote:> excuse me, errno.h. > > On 8/21/10, James Smith <smithjd15@gmail.com> wrote: >> Thanks. >> >> What about stderr.h? >> >> On 8/21/10, Goffredo Baroncelli <kreijack@gmail.com> wrote: >>> On Saturday, 21 August, 2010, James Smith wrote: >>> [...] >>>> I''ll look at a error.txt file (after finding convention) and also >>>> update the man. In regards to shortening of dev/device -- is this >>>> really neccessary? And what harm does this cause in the first place? >>>> In device add-delete functionality. >>> >>> Make sense to rename <dev> in <device> for the "btrfs add/delete" >>> commands >>> >>> >>>> >>>> >>>> On 8/20/10, Josh Berry <des@condordes.net> wrote: >>>> > On Fri, Aug 20, 2010 at 12:00, Andreas Philipp >>>> > <philipp.andreas@gmail.com> wrote: >>>> >> On 20.08.2010 20:49, Josh Berry wrote: >>>> >>> >>>> >>> On Fri, Aug 20, 2010 at 11:34, Andreas Philipp >>>> >>> <philipp.andreas@gmail.com> wrote: >>>> >>>> >>>> >>>> On 20.08.2010 20:27, Josh Berry wrote: >>>> >>>>> >>>> >>>>> On Fri, Aug 20, 2010 at 05:03, Goffredo >>> Baroncelli<kreijack@gmail.com> >>>> >>>>> wrote: >>>> >>>>>> >>>> >>>>>> On Thursday, 19 August, 2010, James Smith wrote: >>>> >>>>>>> >>>> >>>>>>> This patch randomizes the error codes and also fixes up some >>>> >>>>>>> typos >>>> >>>>>> >>>> >>>>>> including >>>> >>>>>>> >>>> >>>>>>> capitalization in the output. >>>> >>>>>>> >>>> >>>>>>> It would almost be nice to see a translation effort for the >>>> >>>>>>> tool >>>> >>>>>>> as >>>> >>>>>>> well. >>>> >>>>> >>>> >>>>> [...] >>>> >>>>>> >>>> >>>>>> + fprintf(stderr, "ERR-A.11: in command >>>> >>>>>> ''"); >>>> >>>>>> >>>> >>>>>> I am not against this kind of error codes, but I prefer >>>> >>>>>> >>>> >>>>>> + fprintf(stderr, "Error ''ERR-A.11'' in >>>> >>>>>> command >>>> >>>>>> ''"); >>>> >>>>> >>>> >>>>> As a layman/end user, I disagree. The former format is easier >>>> >>>>> for >>>> >>>>> shell scripts and the like to parse -- the error code can be >>> extracted >>>> >>>>> with a simple "cut -d: -f1". >>>> >>>> >>>> >>>> This makes no difference. A simple `cut -d " " -f1` would do the >>>> >>>> job >>> in >>>> >>>> the >>>> >>>> second case. >>>> >>> >>>> >>> I think you meant -f2, and that still leaves the quotes hanging >>>> >>> around. So you''d need to cut -d" " -f2 |tr -d "''" . It''s not a >>>> >>> big >>>> >>> deal either way, I just think the former is easier to work with. >>>> >> >>>> >> Sorry, of course -f2. But why not simply cut -d "''" -f 2? >>>> > >>>> > Oh right, good point. :) Though as Goffredo said, using the error >>>> > code is probably better anyway. >>>> > >>>> > -- Josh >>>> > -- >>>> > To unsubscribe from this list: send the line "unsubscribe >>>> > linux-btrfs" >>>> > in >>>> > the body of a message to majordomo@vger.kernel.org >>>> > More majordomo info at http://vger.kernel.org/majordomo-info.html >>>> > >>>> -- >>>> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" >>>> in >>>> the body of a message to majordomo@vger.kernel.org >>>> More majordomo info at http://vger.kernel.org/majordomo-info.html >>>> >>> >>> >>> -- >>> gpg key@ keyserver.linux.it: Goffredo Baroncelli (ghigo) >>> <kreijack@inwind.it> >>> Key fingerprint = 4769 7E51 5293 D36C 814E C054 BF04 F161 3DC5 0512 >>> -- >>> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" >>> in >>> the body of a message to majordomo@vger.kernel.org >>> More majordomo info at http://vger.kernel.org/majordomo-info.html >>> >> >