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 <smithj...@gmail.com> wrote:
> excuse me, errno.h.
>
> On 8/21/10, James Smith <smithj...@gmail.com> wrote:
>> Thanks.
>>
>> What about stderr.h?
>>
>> On 8/21/10, Goffredo Baroncelli <kreij...@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 <d...@condordes.net> wrote:
>>>> > On Fri, Aug 20, 2010 at 12:00, Andreas Philipp
>>>> > <philipp.andr...@gmail.com> wrote:
>>>> >>  On 20.08.2010 20:49, Josh Berry wrote:
>>>> >>>
>>>> >>> On Fri, Aug 20, 2010 at 11:34, Andreas Philipp
>>>> >>> <philipp.andr...@gmail.com>  wrote:
>>>> >>>>
>>>> >>>>  On 20.08.2010 20:27, Josh Berry wrote:
>>>> >>>>>
>>>> >>>>> On Fri, Aug 20, 2010 at 05:03, Goffredo
>>> Baroncelli<kreij...@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 majord...@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 majord...@vger.kernel.org
>>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>>
>>>
>>>
>>> --
>>> gpg key@ keyserver.linux.it: Goffredo Baroncelli (ghigo)
>>> <kreij...@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 majord...@vger.kernel.org
>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>
>>
>
Error code listing for btrfs.

A) Clone btrfs disk
A1: Error accessing the inputted subvolume.
A2: The inputted subvolume is not recognized as a subvolume.
A3: Passed argument is not a directory.

B) Snapshot btrfs disk
B1: Incorrect snapshot name has been entered.
B2: Inputted name is past the allowed length.
B3: Cannot access a requested file.
B4: Cannot access requested file.
B5: Cannot snapshot disk.

C) Delete subvolume
C1: Error deleting the inputted subvolume.
C2: Cannot delete the marked file. (Is not a subvolume)
C3: Incorrect subvolume name.
C4: Inputted name is past the allowed length. (Max char: 255)
C5: Cannot access the subvolume for deletion.
C6: Cannot delete subvolume.

D) Create subvolume
D1: Inputted name already exists.
D2: Incorrect subvolume name has been enteredI) Add Volume to filesystem.
I1: Can't access mount point point for adding volume.
I2: Unable to open device for adding volume.
I3: Unable to stat..
D3: Inputted name is past the allowed length. (Max char: 255)
D4: Cannot access requested file.
D5: Cannot create subvolume.
D6: Cannot access for syncing.
D7: Unable to create sync.

E) Scan for btrfs filesystems on block device.
E1: Error scanning for btrfs filesystem.
E2: Failed to open dev node to initialize filesystem tool.
E3: Unable to scan the device.

F) Defragment
F1: Cannot access the device to complete a defragment.
F2: Unable to defragment inputted device.

G) Resize 
G1: Cannot access device node for resize completion.
G2: Size value too long to allow resize.
G3: Unable to resize btrfs partition. 

H) Scan filesystem
H1: Error while scanning.

I) Add Volume to filesystem.
I1: Can't access mount point point for adding volume.
I2: Unable to open device for adding volume.
I3: Unable to stat.
I4: Not a block device.
I5: Unable to init device for adding of volumes.
I6: Error adding the device for adding volumes.

J) Balancing filesystems.
J1: Cannot access requested files.
J2: Balancing inodes.

K) Remove Volume from filesystem.
K1: Cannot addess requested file for volume removal.
K2: Error removing the device.

L) Label
L1: Some devices missing.


===
A.11) Ambiguous argument
B.12) Unknown Command
C.13) Minimum arguments unsatisfied
D.14) Minimum arguments unsatisfied

Reply via email to