From: Matthew Wilcox <matthew@wil.cx>
To: Ameer Armaly <ameer@bellsouth.net>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: [patch] add flags to stat()
Date: Mon, 7 Aug 2006 08:23:02 -0600 [thread overview]
Message-ID: <20060807142302.GM4379@parisc-linux.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0608061158060.1620@sg1>
On Sun, Aug 06, 2006 at 11:58:26AM -0400, Ameer Armaly wrote:
> -asmlinkage long sys_newstat(char __user *filename, struct stat __user
> *statbuf)
> +asmlinkage long sys_newstat(char __user *filename, struct stat __user
> *statbuf, unsigned int flags)
> {
> struct kstat stat;
> - int error = vfs_stat_fd(AT_FDCWD, filename, &stat);
> + int error;
> + if(!flags) /*The want everything, so let's flip on all the flags.*/
> + --flags;
> + error = vfs_stat_fd(AT_FDCWD, filename, &stat, flags);
You can't assume that old programs calling sys_newstat will happen to
have a 0 in the flags argument. Look at how we handled this for
sys_mount (MS_MGC_VAL).
Or introduce new syscalls with flags, of course.
prev parent reply other threads:[~2006-08-07 14:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-06 15:58 [patch] add flags to stat() Ameer Armaly
2006-08-07 7:11 ` Josef Sipek
2006-08-07 16:48 ` Bryan Henderson
2006-08-07 17:06 ` Dave Kleikamp
2006-08-07 17:22 ` Josef Sipek
2006-08-07 14:23 ` Matthew Wilcox [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060807142302.GM4379@parisc-linux.org \
--to=matthew@wil.cx \
--cc=ameer@bellsouth.net \
--cc=linux-fsdevel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.