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, unsigned int flags)
...
> +        if(!flags) /*The want everything, so let's flip on all the flags.*/
> +                --flags;

if (!flags)
	flags = ~0;

or even..

flags = flags ? flags : ~0;

Alternatively, you could define S_ALL, have it include all the flags and use
that instead of ~0. This is probably the best option.

Josef "Jeff" Sipek.

-- 
You measure democracy by the freedom it gives its dissidents, not the
freedom it gives its assimilated conformists.
		- Abbie Hoffman
-
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