-
-#include <utmp.h>
-#define SCPYN(a, b) strncpy(a, b, sizeof(a))
-char wtmpf[] = "/usr/adm/wtmp";
-struct utmp wtmp;
-
-markdown()
-{
- register f = open(wtmpf, 1);
- if (f >= 0) {
- lseek(f, 0L, 2);
- SCPYN(wtmp.ut_line, "~");
- SCPYN(wtmp.ut_name, "shutdown");
- time(&wtmp.ut_time);
- write(f, (char *)&wtmp, sizeof(wtmp));
- close(f);
- }
-}