Re: [PATCH] /dev/time for Linux, inspired by Plan 9

Bill Nottingham
2009-03-11T22:08:05Z

Christopher Brannon (cmbrannon@cox.net) said:
> Under Plan 9 from Bell Labs, one queries or sets the system clock by
> reading or writing text strings to a special file named /dev/time.
> I implemented such a facility for Linux. A read of /dev/time produces
> four decimal numbers: epoch seconds, nanoseconds since start of epoch,
> nanoseconds since boot, and nanoseconds per second. Writing a decimal number
> to /dev/time sets the system clock to the given number of epoch seconds.
> Anyone who is permitted to write to /dev/time may set the clock.
> Granting this privilege becomes as easy as modifying groups and file
> permissions.

Given the general array of current interfaces in the kernel, isn't
read/write of textual parameters better suited to sysfs or procfs
than a character device?

Bill