|   xen-ia64-devel
[Xen-devel] [patch 01/16] sysctl: implement CTL_UNNUMBERED 
| From: Eric W. Biederman <ebiederm@xxxxxxxxxxxx>
This patch takes the CTL_UNNUMBERD concept from NFS and makes it available to
all new sysctl users.
At the same time the sysctl binary interface maintenance documentation is
updated to mention and to describe what is needed to successfully maintain the
sysctl binary interface.
Signed-off-by: Eric W. Biederman <ebiederm@xxxxxxxxxxxx>
Acked-by: Alan Cox <alan@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
Signed-off-by: Linus Torvalds <torvalds@xxxxxxxx>
---
Wed, 19 Sep 2007 15:17:27 +0900:
This is a backport of some code for Linux that is needed by
my backport of kexec to IA64 xen. As it patches common code
Alex Williams asked me to submitt it to xen-devel, so here it is.
Linux upstream, commit 7cc13edc139108bb527b692f0548dce6bc648572
 fs/lockd/svc.c         |    3 ---
 fs/nfs/sysctl.c        |    5 -----
 include/linux/sysctl.h |   14 +++++++++++---
 3 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c
index 6341392..8ca1808 100644
--- a/fs/lockd/svc.c
+++ b/fs/lockd/svc.c
@@ -353,9 +353,6 @@ EXPORT_SYMBOL(lockd_down);
  * Sysctl parameters (same as module parameters, different interface).
  */
 
-/* Something that isn't CTL_ANY, CTL_NONE or a value that may clash. */
-#define CTL_UNNUMBERED         -2
-
 static ctl_table nlm_sysctls[] = {
        {
                .ctl_name       = CTL_UNNUMBERED,
diff --git a/fs/nfs/sysctl.c b/fs/nfs/sysctl.c
index 2fe3403..3ea50ac 100644
--- a/fs/nfs/sysctl.c
+++ b/fs/nfs/sysctl.c
@@ -18,11 +18,6 @@
 static const int nfs_set_port_min = 0;
 static const int nfs_set_port_max = 65535;
 static struct ctl_table_header *nfs_callback_sysctl_table;
-/*
- * Something that isn't CTL_ANY, CTL_NONE or a value that may clash.
- * Use the same values as fs/lockd/svc.c
- */
-#define CTL_UNNUMBERED -2
 
 static ctl_table nfs_cb_sysctls[] = {
 #ifdef CONFIG_NFS_V4
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index c184732..d98562f 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -6,10 +6,17 @@
  ****************************************************************
  ****************************************************************
  **
+ **  WARNING:
  **  The values in this file are exported to user space via 
- **  the sysctl() binary interface.  However this interface
- **  is unstable and deprecated and will be removed in the future. 
- **  For a stable interface use /proc/sys.
+ **  the sysctl() binary interface.  Do *NOT* change the
+ **  numbering of any existing values here, and do not change
+ **  any numbers within any one set of values.  If you have to
+ **  have to redefine an existing interface, use a new number for it.
+ **  The kernel will then return -ENOTDIR to any application using
+ **  the old binary interface.
+ **
+ **  For new interfaces unless you really need a binary number
+ **  please use CTL_UNNUMBERED.
  **
  ****************************************************************
  ****************************************************************
@@ -48,6 +55,7 @@ struct __sysctl_args {
 #ifdef __KERNEL__
 #define CTL_ANY                -1      /* Matches any name */
 #define CTL_NONE       0
+#define CTL_UNNUMBERED CTL_NONE        /* sysctl without a binary number */
 #endif
 
 enum
-- 
-- 
Horms
  H: http://www.vergenet.net/~horms/
  W: http://www.valinux.co.jp/en/
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
 | 
 
| <Prev in Thread] | Current Thread | [Next in Thread> |  | 
[Xen-ia64-devel] [patch 08/12] Kexec: offsets for EFI runtime	regions, (continued)
[Xen-ia64-devel] [patch 08/12] Kexec: offsets for EFI runtime	regions, Simon Horman
[Xen-ia64-devel] [patch 12/12] Kexec: Implement elf_core_save_regs(), Simon Horman
[Xen-ia64-devel] [patch 10/12] Kexec: Map runtime EFI regions the	same way as Linux, Simon Horman
[Xen-ia64-devel] [patch 07/12] Kexec: Zap VHPT in relocate_kernel, Simon Horman
[Xen-ia64-devel] [patch 01/12] kexec for xen, Simon Horman
[Xen-ia64-devel] [patch 12/16] Date: Thu,	12 Jul 2007 15:50:37 +0900 Subkect: Kexec: machine	addresss macros From: Simon Horman <horms@xxxxxxxxxxxx>, Simon Horman
[Xen-ia64-devel] [patch 13/16] Kdump: Use the machine address for	the boot params region, Simon Horman
[Xen-ia64-devel] [patch 05/12] Kexec: Save the MADT ACPI tables so	that they can be restored, Simon Horman
[Xen-ia64-devel] [patch 09/12] Kexec: Allow page fault handler to	handle EFI regions, Simon Horman
[Xen-ia64-devel] [patch 2/2] Set alternate location for /proc/iomem	on ia64 xen, Simon Horman
[Xen-devel] [patch 01/16] sysctl: implement CTL_UNNUMBERED,
Simon Horman <=
[Xen-ia64-devel] [patch 16/16] kexec/kdump: call	xen_machine_kexec_setup_resources() after init_bootmem(), Simon Horman
[Xen-ia64-devel] [patch 07/16] Xenification of IA64 Kexec/kdump, Simon Horman
Re: [Xen-ia64-devel] [patch 07/16] Xenification of IA64 Kexec/kdump, Horms
[Xen-ia64-devel] [patch 02/16] Initialise xen_start_info earlier in	setup_arch(), Simon Horman
[Xen-ia64-devel] [patch 05/16] Kexec: Use xen machine_kexec() and	machine_shutdown(), Simon Horman
 |  |  |