tools/llvm: Do not build with symbols
[minix3.git] / minix / fs / pfs / utility.c
blob4109d83d0a6f0cbde42a4f21d0f08d7085a1cded
1 #include "fs.h"
4 /*===========================================================================*
5 * no_sys *
6 *===========================================================================*/
7 int no_sys(message *pfs_m_in, message *pfs_m_out)
9 /* Somebody has used an illegal system call number */
10 printf("no_sys: invalid call 0x%x to pfs\n", pfs_m_in->m_type);
11 return(EINVAL);
15 /*===========================================================================*
16 * clock_time *
17 *===========================================================================*/
18 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; /* Uptime in ticks */
27 clock_t realtime;
28 time_t boottime;
30 if ((r = getuptime(&uptime, &realtime, &boottime)) != OK)
31 panic("clock_time: getuptme2 failed: %d", r);
33 return( (time_t) (boottime + (realtime/sys_hz())));