xfs
[Top] [All Lists]

Re: [PATCH] [LIBXCMD]: Move error messages to appropriate places.

To: Arkadiusz Miskiewicz <arekm@xxxxxxxx>
Subject: Re: [PATCH] [LIBXCMD]: Move error messages to appropriate places.
From: Donald Douwsma <ddouwsma@xxxxxxxxxxxxxx>
Date: Fri, 30 Jan 2009 02:07:22 +1100
Cc: xfs@xxxxxxxxxxx
In-reply-to: <200901291543.07441.arekm@xxxxxxxx>
References: <1233167051-14711-1-git-send-email-arekm@xxxxxxxx> <4981BD32.2090405@xxxxxxxxxxxxxx> <200901291543.07441.arekm@xxxxxxxx>
User-agent: Thunderbird 2.0.0.19 (X11/20090105)
Arkadiusz Miskiewicz wrote:
On Thursday 29 of January 2009, Donald Douwsma wrote:
Arkadiusz Miśkiewicz wrote:
Replace raw perror() with proper message in
fs_table_initialise_mounts().

Replace raw perror() with proper message and move it from
fs_mount_point_from_path() to fs_table_initialise_projects() where this
message has meaning.
I like your change, it makes things clearer.

But does this particular error actually help people? I've seen it a few
times when testing quota code in the past. It's only used when reading in
projects, and causes errors to be displayed even when issuing non project
commands.

$ sudo bash -c "echo 10:/var/nonexistantdir >> /etc/projects
$ xfs_quota -c print
/var/nonexistantdir: No such file or directory
Filesystem          Pathname
/home               /dev/sda8

Now it will be:
xfs_quota: cannot find mount point for path `/var/nonexistantdir': No such file or directory

I'd be tempted to remove this error, and add error checking code to the
project specific commands that walk tree's.

The path won't be added to walk iterator and there will be no error at walk time.

Good point, if we dont give the error at that point there is no way for the 
user to
find out what happened, not good.


The fix would be probably to not add project to the iterating engine when asking for non-project things etc.

That would be nice, in the meantime I think your change is a good idea.

Don

<Prev in Thread] Current Thread [Next in Thread>