[PATCH 3/13] pcmcia: warn on IOCTL usage

Dominik Brodowski linux at dominikbrodowski.net
Wed Sep 7 17:36:50 EDT 2005


More visible user information of scheduled feature removal.

Signed-off-by: Dominik Brodowski <linux at dominikbrodowski.net>
---

 drivers/pcmcia/pcmcia_ioctl.c |    8 ++++++++
 1 files changed, 8 insertions(+)

Index: 2.6.13-git4/drivers/pcmcia/pcmcia_ioctl.c
===================================================================
--- 2.6.13-git4.orig/drivers/pcmcia/pcmcia_ioctl.c
+++ 2.6.13-git4/drivers/pcmcia/pcmcia_ioctl.c
@@ -376,6 +376,7 @@ static int ds_open(struct inode *inode, 
     socket_t i = iminor(inode);
     struct pcmcia_socket *s;
     user_info_t *user;
+    static int warning_printed = 0;
 
     ds_dbg(0, "ds_open(socket %d)\n", i);
 
@@ -407,6 +408,13 @@ static int ds_open(struct inode *inode, 
     s->user = user;
     file->private_data = user;
 
+    if (!warning_printed) {
+	    printk(KERN_INFO "pcmcia: Detected deprecated PCMCIA ioctl usage.\n");
+	    printk(KERN_INFO "pcmcia: This interface will soon be removed from the kernel; please expect breakage unless you upgrade to new tools.\n");
+	    printk(KERN_INFO "pcmcia: see http://www.kernel.org/pub/linux/utils/kernel/pcmcia/pcmcia.html for details.\n");
+	    warning_printed++;
+    }
+
     if (s->pcmcia_state.present)
 	queue_event(user, CS_EVENT_CARD_INSERTION);
     return 0;



More information about the linux-pcmcia mailing list