tty: try more often to get the config byte.
[minix.git] / servers / pfs / utility.c
blobe18a882552ef737ed77d0d63f0d841b9af09a8b9
1 #include "fs.h"
4 /*===========================================================================*
5 * no_sys *
6 *===========================================================================*/
7 PUBLIC int no_sys()
9 /* Somebody has used an illegal system call number */
10 printf("no_sys: invalid call %d\n", req_nr);
11 return(EINVAL);
15 /*===========================================================================*
16 * clock_time *
17 *===========================================================================*/
18 PUBLIC time_t clock_time()
20 /* This routine returns the time in seconds since 1.1.1970. MINIX is an
21 * astrophysically naive system that assumes the earth rotates at a constant
22 * rate and that such things as leap seconds do not exist.
25 int r;
26 clock_t uptime, boottime;
28 if ((r = getuptime2(&uptime,&boottime)) != OK)
29 panic("clock_time: getuptme2 failed: %d", r);
31 return( (time_t) (boottime + (uptime/sys_hz())));