diff -urN --exclude '*~' S0/fs/Kconfig hack-S0/fs/Kconfig --- S0/fs/Kconfig 2003-10-17 23:57:54.000000000 +0100 +++ hack-S0/fs/Kconfig 2003-12-23 22:36:11.000000000 +0000 @@ -760,6 +760,14 @@ This option will enlarge your kernel by about 67 KB. Several programs depend on this, so everyone should say Y here. +config PROC_UPDIKE + bool "visual uptime reporting support" + depends on PROC_FS + help + A dynamic commentary on the nature of uptime contests, drawing on + principles of the visual display of quantitative information + espoused by Ed Tufte. + config PROC_KCORE bool default y if !ARM diff -urN --exclude '*~' S0/fs/proc/proc_misc.c hack-S0/fs/proc/proc_misc.c --- S0/fs/proc/proc_misc.c 2003-10-01 18:50:21.000000000 +0100 +++ hack-S0/fs/proc/proc_misc.c 2003-12-23 21:54:17.000000000 +0000 @@ -153,6 +153,28 @@ return proc_calc_metrics(page, start, off, count, eof, len); } +#ifdef CONFIG_PROC_UPDIKE +static int updike_read_proc(char *page, char**start, off_t off, + int count, int *eof, void *data) +{ + struct timespec uptime; + int days; + int i = 0; + + do_posix_clock_monotonic_gettime(&uptime); + days = uptime.tv_sec / (3600 * 24); + page[0] = '8'; + while ((i < days) && (i <= PAGE_SIZE - 4)) { + page[++i] = '='; + } + page[i + 1] = 'D'; + page[i + 2] = '\n'; + page[i + 3] = '\0'; + + return proc_calc_metrics(page, start, off, count, eof, i + 3); +} +#endif + static int meminfo_read_proc(char *page, char **start, off_t off, int count, int *eof, void *data) { @@ -647,6 +669,9 @@ } *p, simple_ones[] = { {"loadavg", loadavg_read_proc}, {"uptime", uptime_read_proc}, +#ifdef CONFIG_PROC_UPDIKE + {"updike", updike_read_proc}, +#endif {"meminfo", meminfo_read_proc}, {"version", version_read_proc}, #ifdef CONFIG_PROC_HARDWARE