Messages in this thread | | | From | (H. Peter Anvin) | Subject | Re: What /proc should contain [was: /proc/driver/microcode] | Date | 23 Feb 2000 13:42:26 -0800 |
| |
Followup to: <20000223115417.A1246@xmission.com> By author: Erik Andersen <andersen@xmission.com> In newsgroup: linux.dev.kernel > > Everyone seems anxious about their favorite little text files the currently > live in /proc. With a proper set of sysctl entries, those little text files > could be easily recreated via user space apps. Heck, the whole current text > file could be accessed via sysctl (no reason to keep them as simple one liners > -- BSD has some multi line text files in there). This would leave /proc > containing nothing but pid #'s, and a symlink to the current pid's /proc entry. > > The example of /proc/rtc was mentioned several times. > Any reason that this file could not be replaced with > rtc/rtc_time > rtc/rtc_date > rtc/rtc_epoch > etc... > sysctl entries? Or one fat "rtc" entry" that has the > whole current file? >
/proc/sys/dev/rtc/{time,date,epoch,...} probably would be better, although sometimes with changing devices one have to consider the issue of atomicity; sometimes one *have* to be able to perform complex operations atomically. IMNSHO that's what /dev/rtc is for.
I personally think the strict formatting of sysctl() is a good thing, although I do have to agree 10000% with Linus that sysctl() should be entirely string-based. As for the sysctl() system call, I would either remove it or replace it with a system call taking a file descriptor to the appropriate /proc/sys node. Although redundant, it might provide somewhat less overhead than the /proc/sys interface.
-hpa -- <hpa@transmeta.com> at work, <hpa@zytor.com> in private! "Unix gives you enough rope to shoot yourself in the foot."
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |