[RFC] [PATCH] xfs_quota: support relative path as `path' arguments
Satoru Takeuchi
takeuchi_satoru at jp.fujitsu.com
Tue Nov 27 17:41:39 CST 2012
Hi Carlos,
(2012/11/28 1:50), Carlos Maiolino wrote:
> On Tue, Nov 27, 2012 at 07:05:40PM +0900, Satoru Takeuchi wrote:
>
>> From: Satoru Takeuchi <takeuchi_satoru at jp.fujitsu.com>
>>
>> Current xfs_quota only accepts absolute path as its `path' arguments.
>> This patch adds the support of relative path for user's convenience.
>>
>> Signed-off-by: Satoru Takeuchi <takeuchi_satoru at jp.fujitsu.com>
>>
>
> Using realpath() to handle the path being passed by user, not only makes able
> the usage of relative paths, but also fixes the problem in having a "/" at the
> end of the path. For those who abuses of TABs, this is very annoying.
Ah, I also tend to fix the trailing "/" at the end of the path as you said.
But I forgot to mentioned about it by the patch description :-)
Thanks,
Satoru
>
> Looks good,
>
> Reviewed-by: Carlos Maiolino <cmaiolino at redhat.com>
> Tested-by: Carlos Maiolino <cmaiolino at redhat.com>
>
>> ---
>> libxcmd/paths.c | 42 +++++++++++++++++++++++++++++-------------
>> 1 file changed, 29 insertions(+), 13 deletions(-)
>>
>> diff --git a/libxcmd/paths.c b/libxcmd/paths.c
>> index 2a92299..bd84cde 100644
>> --- a/libxcmd/paths.c
>> +++ b/libxcmd/paths.c
>> @@ -27,6 +27,7 @@
>> #include <xfs/path.h>
>> #include <xfs/input.h>
>> #include <xfs/project.h>
>> +#include <limits.h>
>>
>> extern char *progname;
>>
>> xfs mailing list
>> xfs at oss.sgi.com
>> http://oss.sgi.com/mailman/listinfo/xfs
>
More information about the xfs
mailing list