xfs
[Top] [All Lists]

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

To: Donald Douwsma <ddouwsma@xxxxxxxxxxxxxx>
Subject: Re: [PATCH] [LIBXCMD]: Move error messages to appropriate places.
From: Arkadiusz Miskiewicz <arekm@xxxxxxxx>
Date: Thu, 29 Jan 2009 15:43:07 +0100
Cc: xfs@xxxxxxxxxxx
In-reply-to: <4981BD32.2090405@xxxxxxxxxxxxxx>
References: <1233167051-14711-1-git-send-email-arekm@xxxxxxxx> <4981BD32.2090405@xxxxxxxxxxxxxx>
User-agent: PLD Linux KMail/1.9.10
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. 

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

> Don

-- 
Arkadiusz Miśkiewicz        PLD/Linux Team
arekm / maven.pl            http://ftp.pld-linux.org/

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