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

From: Bill Nottingham
Date: Wed Mar 11 2009 - 18:08:05 EST


Christopher Brannon (cmbrannon@xxxxxxx) 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/