[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: modify chmod

From: jeff.liu
Subject: Re: modify chmod
Date: Sun, 07 Feb 2010 20:46:10 +0800
User-agent: Thunderbird (X11/20080505)

Jim Meyering 写道:
jeff.liu wrote:
A tiny patch, make chmod do not touch the inode if the new file
permission mode is same as it was before.
+static bool
+may_have_nfsacl(const char *file)
+ struct statfs buf;
+ /* If statfs fails, assume we can't use the optimization. */
+ if (statfs (file, &buf) < 0)

This function should accept a file descriptor, not a file name,
and should call fstatfs, not statfs.

Thanks for the correction.
IMHO, to get a fd, then call fstatfs ranther than statfs here, is to ensure the same file object proceeding to operated on?
For your next version of this patch, please find a way to send
it that does not split lines or remove leading spaces.
I will take care for this kind of formating issues.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]