Re: [patch] add flags to stat()

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

 



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.
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux