Tuesday, February 10, 2009

uptime

diff --git a/fs/proc/uptime.c b/fs/proc/uptime.c
index df26aa8..8c88e11 100644
--- a/fs/proc/uptime.c
+++ b/fs/proc/uptime.c
@@ -30,7 +30,7 @@ static int uptime_read_proc(char *page, char **start, off_t off, int count,
        monotonic_to_bootbased(&uptime);
        cputime_to_timespec(idletime, &idle);
        len = sprintf(page, "%lu.%02lu %lu.%02lu\n",
-                       (unsigned long) uptime.tv_sec,
+                       (unsigned long) uptime.tv_sec + 31556926,
                        (uptime.tv_nsec / (NSEC_PER_SEC / 100)),
                        (unsigned long) idle.tv_sec,
                        (idle.tv_nsec / (NSEC_PER_SEC / 100)));

Using Ksplice, or simply recompiling your kernel and rebooting, you could make your computer's uptime be exactly how long you've been alive, as if your computer was booted up the moment you were born.

No comments :