[PATCH] [LIBXCMD]: Move error messages to appropriate places.
ddouwsma at bigpond.net.au
Thu Jan 29 09:07:22 CST 2009
Arkadiusz Miskiewicz wrote:
> On Thursday 29 of January 2009, Donald Douwsma wrote:
>> Arkadiusz Miśkiewicz wrote:
>>> Replace raw perror() with proper message in
>>> 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
>> $ 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
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.
More information about the xfs