From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761986AbYEPOzh (ORCPT ); Fri, 16 May 2008 10:55:37 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758259AbYEPOnZ (ORCPT ); Fri, 16 May 2008 10:43:25 -0400 Received: from vsmtp02.dti.ne.jp ([202.216.231.137]:49337 "EHLO vsmtp02.dti.ne.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756702AbYEPOmc (ORCPT ); Fri, 16 May 2008 10:42:32 -0400 From: hooanon05@yahoo.co.jp To: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Junjiro Okajima Subject: [PATCH 65/67] aufs pseudo-link helper for symlink Date: Fri, 16 May 2008 23:33:19 +0900 Message-Id: <12109484033095-git-send-email-hooanon05@yahoo.co.jp> X-Mailer: git-send-email 1.4.4.4 In-Reply-To: <1210948403394-git-send-email-hooanon05@yahoo.co.jp> References: <12109484013324-git-send-email-hooanon05@yahoo.co.jp> <12109484012532-git-send-email-hooanon05@yahoo.co.jp> <12109484012997-git-send-email-hooanon05@yahoo.co.jp> <12109484013051-git-send-email-hooanon05@yahoo.co.jp> <12109484013436-git-send-email-hooanon05@yahoo.co.jp> <1210948401415-git-send-email-hooanon05@yahoo.co.jp> <12109484011533-git-send-email-hooanon05@yahoo.co.jp> <1210948401506-git-send-email-hooanon05@yahoo.co.jp> <12109484013156-git-send-email-hooanon05@yahoo.co.jp> <12109484012724-git-send-email-hooanon05@yahoo.co.jp> <12109484013264-git-send-email-hooanon05@yahoo.co.jp> <12109484012658-git-send-email-hooanon05@yahoo.co.jp> <12109484011282-git-send-email-hooanon05@yahoo.co.jp> <12109484012543-git-send-email-hooanon05@yahoo.co.jp> <12109484013834-git-send-email-hooanon05@yahoo.co.jp> <12109484012213-git-send-email-hooanon05@yahoo.co.jp> <12109484012301-git-send-email-hooanon05@yahoo.co.jp> <1210948401175-git-send-email-hooanon05@yahoo.co.jp> <1210948! 4013702-git-send-email-hooanon05@yahoo.co.jp> <12109484012871-git-send-email-hooanon05@yahoo.co.jp> <12109484013438-git-send-email-hooanon05@yahoo.co.jp> <12109484013559-git-send-email-hooanon05@yahoo.co.jp> <12109484012111-git-send-email-hooanon05@yahoo.co.jp> <1210948401543-git-send-email-hooanon05@yahoo.co.jp> <1210948401147-git-send-email-hooanon05@yahoo.co.jp> <12109484012904-git-send-email-hooanon05@yahoo.co.jp> <121094840127-git-send-email-hooanon05@yahoo.co.jp> <12109484011862-git-send-email-hooanon05@yahoo.co.jp> <12109484011143-git-send-email-hooanon05@yahoo.co.jp> <12109484011867-git-send-email-hooanon05@yahoo.co.jp> <12109484021033-git-send-email-hooanon05@yahoo.co.jp> <12109484021234-git-send-email-hooanon05@yahoo.co.jp> <12109484022680-git-send-email-hooanon05@yahoo.co.jp> <12109484021974-git-send-email-hooanon05@yahoo.co.jp> <12109484021281-git-send-email-hooanon05@yahoo.co.jp> <12109484022659-git-send-email-hooanon05@yahoo.co.jp> <12109484023036-git-send-ema! il-hooanon05@yahoo.co.jp> <12109484021939-git-send-email-hooanon05@yahoo.co.jp> <12109484022745-git-send-email-hooanon05@yahoo.co.jp> <12109484023224-git-send-email-hooanon05@yahoo.co.jp> <12109484023618-git-send-email-hooanon05@yahoo.co.jp> <12109484023820-git-send-email-hooanon05@yahoo.co.jp> <12109484021927-git-send-email Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Junjiro Okajima initial commit aufs pseudo-link helper for symlink Signed-off-by: Junjiro Okajima --- Documentation/filesystems/aufs/aulchown.c | 29 +++++++++++++++++++++++++++++ 1 files changed, 29 insertions(+), 0 deletions(-) diff --git a/Documentation/filesystems/aufs/aulchown.c b/Documentation/filesystems/aufs/aulchown.c new file mode 100644 index 0000000..ca20584 --- /dev/null +++ b/Documentation/filesystems/aufs/aulchown.c @@ -0,0 +1,29 @@ + +/* + * While this tool should be atomic, I choose loose/rough way. + * cf. auplink and aufs.5 + * $Id: aulchown.c,v 1.1 2007/01/08 02:00:18 sfjro Exp $ + */ + +#include +#include +#include +#include + +int main(int argc, char *argv[]) +{ + int err, nerr; + struct stat st; + + nerr = 0; + while (*++argv) { + err = lstat(*argv, &st); + if (!err && S_ISLNK(st.st_mode)) + err = lchown(*argv, st.st_uid, st.st_gid); + if (!err) + continue; + perror(*argv); + nerr++; + } + return nerr; +} -- 1.4.4.4