Re: [patch] F_GETPATH implementation

From: Linus Torvalds
Date: Mon Apr 14 2008 - 18:53:13 EST




On Mon, 14 Apr 2008, Davide Libenzi wrote:
> Index: linux-2.6.mod/include/asm-generic/fcntl.h
> ===================================================================
> --- linux-2.6.mod.orig/include/asm-generic/fcntl.h 2008-04-13 15:01:09.000000000 -0700
> +++ linux-2.6.mod/include/asm-generic/fcntl.h 2008-04-13 18:37:35.000000000 -0700
> @@ -73,6 +73,7 @@
> #define F_SETSIG 10 /* for sockets. */
> #define F_GETSIG 11 /* for sockets. */
> #endif
> +#define F_GETPATH 12

This won't work.

Different architectures have different F_xyzzy numbers, and 12 is already
used by various ones (it's F_SETOWN in asm-parisc/fcntl.h, for example).

I think you'd have to do it in terms of F_LINUX_SPECIFIC_BASE, like
F_NOTIFY is done, for example. That way you avoid these issues.

Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/