xfs
[Top] [All Lists]

Re: [RFC] [PATCH] xfs_quota: support relative path as `path' arguments

To: Eric Sandeen <sandeen@xxxxxxxxxxx>
Subject: Re: [RFC] [PATCH] xfs_quota: support relative path as `path' arguments
From: Mark Tinguely <tinguely@xxxxxxx>
Date: Fri, 21 Dec 2012 09:06:57 -0600
Cc: Carlos Maiolino <cmaiolino@xxxxxxxxxx>, Satoru Takeuchi <takeuchi_satoru@xxxxxxxxxxxxxx>, xfs ML <xfs@xxxxxxxxxxx>
In-reply-to: <50D3EA2F.70404@xxxxxxxxxxx>
References: <50B49074.1020000@xxxxxxxxxxxxxx> <20121127165001.GA11620@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <50D3EA2F.70404@xxxxxxxxxxx>
User-agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:9.0) Gecko/20120122 Thunderbird/9.0
On 12/20/12 22:48, Eric Sandeen wrote:
On 11/27/12 10:50 AM, Carlos Maiolino wrote:
On Tue, Nov 27, 2012 at 07:05:40PM +0900, Satoru Takeuchi wrote:

From: Satoru Takeuchi<takeuchi_satoru@xxxxxxxxxxxxxx>

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@xxxxxxxxxxxxxx>


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.

Looks good,

Reviewed-by: Carlos Maiolino<cmaiolino@xxxxxxxxxx>
Tested-by: Carlos Maiolino<cmaiolino@xxxxxxxxxx>

SGI folks, is this patch ready to be committed?

Thanks,
-Eric

---
  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@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs


_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs

Thanks Eric for the ping.

This has been committed to git://oss.sgi.com/xfs/cmds/xfsprogs commit #6a23747.

--Mark.

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