Messages in this thread | | | Date | Tue, 26 Aug 2003 08:32:49 +0100 | From | Christoph Hellwig <> | Subject | Re: [PATCH] Add MOUNT_STATUS ioctl to cdrom device |
| |
On Tue, Aug 26, 2003 at 01:50:43PM +0700, Samphan Raruenrom wrote: > I'm sorry for issueing this layering violation. I read a guideline that > it's easier to submit a patch to add device driver ioctl than inventing > something new. It really doesn't belong here.
That guideline is wrong. Adding a driver ioctl is slmost always wrong.
> Could you guide me where else can I place this functionality? > > (my random idea) > - fcntl(open("/dev/cdrom", F_MNTSTAT) > - umount2("/dev/cdrom", MS_TEST) // not actually perform > - new system call! e.g. mntstat(open("/dev/cdrom"))
In userspace. Or you could tell me what you want to actually archive - your call by itself doesn't make any sense.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |