* should "create_proc_read_entry" enforce read-only semantics?
@ 2007-05-30 12:17 Robert P. J. Day
0 siblings, 0 replies; only message in thread
From: Robert P. J. Day @ 2007-05-30 12:17 UTC (permalink / raw)
To: Linux Kernel Mailing List
admittedly more nitpickery, but it strikes me as a bit confusing
that you can use create_proc_read_entry() to create writable proc
files, since that routine is simply a wrapper for create_proc_entry
that passes the mode untouched and unexamined.
that's why you can get stuff like this from drivers/scsi/scsi_proc.c
...
p = create_proc_read_entry(name, S_IFREG | S_IRUGO | S_IWUSR,
sht->proc_dir, proc_scsi_read, shost);
if (!p) {
printk(KERN_ERR "%s: Failed to register host %d in"
"%s\n", __FUNCTION__, shost->host_no,
sht->proc_name);
return;
}
p->write_proc = proc_scsi_write_proc;
...
it just seems to abuse the semantics to use a routine called
"create_proc_read_entry" to create a writable file. but that's just
me.
rday
--
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA
http://fsdev.net/wiki/index.php?title=Main_Page
========================================================================
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-05-30 12:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-30 12:17 should "create_proc_read_entry" enforce read-only semantics? Robert P. J. Day
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®