--- watchdog-5.9.old/src/shutdown.c 2010-03-06 21:06:51.000000000 +0000 +++ watchdog-5.9.cleanups/src/shutdown.c 2011-01-17 13:41:57.623877045 +0000 @@ -336,6 +336,7 @@ void do_shutdown(int errorcode) { int i = 0, fd; + size_t write_len; char *seedbck = RANDOM_SEED; /* soft-boot the system */ @@ -459,7 +460,7 @@ wtmp.ut_pid = 0; wtmp.ut_type = RUN_LVL; wtmp.ut_time = t; - write(fd, (char *) &wtmp, sizeof(wtmp)); + write_len = write(fd, (char *) &wtmp, sizeof(wtmp)); close(fd); } @@ -475,7 +476,7 @@ char buf[512]; if (read(fd_seed, buf, 512) == 512) - write(fd_bck, buf, 512); + write_len = write(fd_bck, buf, 512); close(fd_bck); } close(fd_seed);