****************************************************************
****************************************************************
**
- ** WARNING:
** The values in this file are exported to user space via
- ** 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 redefine an existing interface, use a new number for it.
- ** The kernel will then return ENOTDIR to any application using
- ** the old binary interface.
- **
- ** --sct
+ ** 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.
**
****************************************************************
****************************************************************
if (copy_from_user(&tmp, args, sizeof(tmp)))
return -EFAULT;
-
+
+ if (tmp.nlen != 2 || tmp.name[0] != CTL_KERN ||
+ tmp.name[1] != KERN_VERSION) {
+ int i;
+ printk(KERN_INFO "%s: numerical sysctl ", current->comm);
+ for (i = 0; i < tmp.nlen; i++)
+ printk("%d ", tmp.name[i]);
+ printk("is obsolete.\n");
+ }
+
lock_kernel();
error = do_sysctl(tmp.name, tmp.nlen, tmp.oldval, tmp.oldlenp,
tmp.newval, tmp.newlen);