PM / Hibernate: Really deprecate deprecated user ioctls
They were deprecated and removed from exported headers more than 2 years ago. Inform users about their removal in the future now. (Switch cases needed to be reorderded for an easy fall through.) And add an entry to feature-removal-schedule. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
This commit is contained in:
committed by
Rafael J. Wysocki
parent
f8824cee40
commit
b694e52ebd
@@ -64,6 +64,17 @@ Who: Robin Getz <rgetz@blackfin.uclinux.org> & Matt Mackall <mpm@selenic.com>
|
|||||||
|
|
||||||
---------------------------
|
---------------------------
|
||||||
|
|
||||||
|
What: Deprecated snapshot ioctls
|
||||||
|
When: 2.6.36
|
||||||
|
|
||||||
|
Why: The ioctls in kernel/power/user.c were marked as deprecated long time
|
||||||
|
ago. Now they notify users about that so that they need to replace
|
||||||
|
their userspace. After some more time, remove them completely.
|
||||||
|
|
||||||
|
Who: Jiri Slaby <jirislaby@gmail.com>
|
||||||
|
|
||||||
|
---------------------------
|
||||||
|
|
||||||
What: The ieee80211_regdom module parameter
|
What: The ieee80211_regdom module parameter
|
||||||
When: March 2010 / desktop catchup
|
When: March 2010 / desktop catchup
|
||||||
|
|
||||||
|
@@ -195,6 +195,15 @@ static ssize_t snapshot_write(struct file *filp, const char __user *buf,
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void snapshot_deprecated_ioctl(unsigned int cmd)
|
||||||
|
{
|
||||||
|
if (printk_ratelimit())
|
||||||
|
printk(KERN_NOTICE "%pf: ioctl '%.8x' is deprecated and will "
|
||||||
|
"be removed soon, update your suspend-to-disk "
|
||||||
|
"utilities\n",
|
||||||
|
__builtin_return_address(0), cmd);
|
||||||
|
}
|
||||||
|
|
||||||
static long snapshot_ioctl(struct file *filp, unsigned int cmd,
|
static long snapshot_ioctl(struct file *filp, unsigned int cmd,
|
||||||
unsigned long arg)
|
unsigned long arg)
|
||||||
{
|
{
|
||||||
@@ -246,8 +255,9 @@ static long snapshot_ioctl(struct file *filp, unsigned int cmd,
|
|||||||
data->frozen = 0;
|
data->frozen = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SNAPSHOT_CREATE_IMAGE:
|
|
||||||
case SNAPSHOT_ATOMIC_SNAPSHOT:
|
case SNAPSHOT_ATOMIC_SNAPSHOT:
|
||||||
|
snapshot_deprecated_ioctl(cmd);
|
||||||
|
case SNAPSHOT_CREATE_IMAGE:
|
||||||
if (data->mode != O_RDONLY || !data->frozen || data->ready) {
|
if (data->mode != O_RDONLY || !data->frozen || data->ready) {
|
||||||
error = -EPERM;
|
error = -EPERM;
|
||||||
break;
|
break;
|
||||||
@@ -275,8 +285,9 @@ static long snapshot_ioctl(struct file *filp, unsigned int cmd,
|
|||||||
data->ready = 0;
|
data->ready = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SNAPSHOT_PREF_IMAGE_SIZE:
|
|
||||||
case SNAPSHOT_SET_IMAGE_SIZE:
|
case SNAPSHOT_SET_IMAGE_SIZE:
|
||||||
|
snapshot_deprecated_ioctl(cmd);
|
||||||
|
case SNAPSHOT_PREF_IMAGE_SIZE:
|
||||||
image_size = arg;
|
image_size = arg;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -290,15 +301,17 @@ static long snapshot_ioctl(struct file *filp, unsigned int cmd,
|
|||||||
error = put_user(size, (loff_t __user *)arg);
|
error = put_user(size, (loff_t __user *)arg);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SNAPSHOT_AVAIL_SWAP_SIZE:
|
|
||||||
case SNAPSHOT_AVAIL_SWAP:
|
case SNAPSHOT_AVAIL_SWAP:
|
||||||
|
snapshot_deprecated_ioctl(cmd);
|
||||||
|
case SNAPSHOT_AVAIL_SWAP_SIZE:
|
||||||
size = count_swap_pages(data->swap, 1);
|
size = count_swap_pages(data->swap, 1);
|
||||||
size <<= PAGE_SHIFT;
|
size <<= PAGE_SHIFT;
|
||||||
error = put_user(size, (loff_t __user *)arg);
|
error = put_user(size, (loff_t __user *)arg);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SNAPSHOT_ALLOC_SWAP_PAGE:
|
|
||||||
case SNAPSHOT_GET_SWAP_PAGE:
|
case SNAPSHOT_GET_SWAP_PAGE:
|
||||||
|
snapshot_deprecated_ioctl(cmd);
|
||||||
|
case SNAPSHOT_ALLOC_SWAP_PAGE:
|
||||||
if (data->swap < 0 || data->swap >= MAX_SWAPFILES) {
|
if (data->swap < 0 || data->swap >= MAX_SWAPFILES) {
|
||||||
error = -ENODEV;
|
error = -ENODEV;
|
||||||
break;
|
break;
|
||||||
@@ -321,6 +334,7 @@ static long snapshot_ioctl(struct file *filp, unsigned int cmd,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case SNAPSHOT_SET_SWAP_FILE: /* This ioctl is deprecated */
|
case SNAPSHOT_SET_SWAP_FILE: /* This ioctl is deprecated */
|
||||||
|
snapshot_deprecated_ioctl(cmd);
|
||||||
if (!swsusp_swap_in_use()) {
|
if (!swsusp_swap_in_use()) {
|
||||||
/*
|
/*
|
||||||
* User space encodes device types as two-byte values,
|
* User space encodes device types as two-byte values,
|
||||||
@@ -362,6 +376,7 @@ static long snapshot_ioctl(struct file *filp, unsigned int cmd,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case SNAPSHOT_PMOPS: /* This ioctl is deprecated */
|
case SNAPSHOT_PMOPS: /* This ioctl is deprecated */
|
||||||
|
snapshot_deprecated_ioctl(cmd);
|
||||||
error = -EINVAL;
|
error = -EINVAL;
|
||||||
|
|
||||||
switch (arg) {
|
switch (arg) {
|
||||||
|
Reference in New Issue
Block a user