From: Frank Mori Hess Date: Mon, 1 Sep 2003 04:02:14 +0000 (+0000) Subject: on second thought, EPERM isn't any more accurate than ENODEV. X-Git-Tag: r0_7_69~242 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d81a2b0f542cd2854630e2bfa7771471f7070903;p=comedi.git on second thought, EPERM isn't any more accurate than ENODEV. --- diff --git a/comedi/comedi_fops.c b/comedi/comedi_fops.c index 47fdcf82..b125c89a 100644 --- a/comedi/comedi_fops.c +++ b/comedi/comedi_fops.c @@ -1631,9 +1631,10 @@ static int comedi_fop_open(struct inode *inode,struct file *file) dev->in_request_module=0; - if(!dev->attached && !capable(CAP_SYS_ADMIN)) - return -EPERM; - + if(!dev->attached && !capable(CAP_SYS_ADMIN)){ + DPRINTK("not attached and not root\n"); + return -ENODEV; + } ok: if(!try_module_get(THIS_MODULE)) return -ENOSYS;