log.c File Reference

#include <sys/types.h>
#include <stdio.h>
#include <utmp.h>
#include <pwd.h>
#include <fcntl.h>
#include <time.h>
#include <string.h>
#include <unistd.h>
#include <sys/utsname.h>

Include dependency graph for log.c:

Go to the source code of this file.

Defines

#define _POSIX_SOURCE   1

Functions

void write_log _ARGS ((void))
void write_log ()

Variables

static char WTMP [] = "/usr/adm/wtmp"
static char SHUT_LOG [] = "/usr/adm/log"
char who [8]
char * prog
static char * month []


Define Documentation

#define _POSIX_SOURCE   1
 

Definition at line 12 of file log.c.


Function Documentation

void write_log _ARGS (void)   ) 
 

void write_log  ) 
 

Definition at line 34 of file log.c.

References BOOT_TIME, close, getpwuid(), getuid, host, localtime(), month, utsname::nodename, now, O_APPEND, O_WRONLY, open, perror(), prog, passwd::pw_name, pwd, SHUT_LOG, sprintf(), strcmp, strcpy(), strlen(), time, time_t, tm::tm_hour, tm::tm_mday, tm::tm_min, tm::tm_mon, tm::tm_sec, uname, who, write, WTMP, and wtmp().

Referenced by main().


Variable Documentation

char* month[] [static]
 

Initial value:

 { "Jan", "Feb", "Mar", "Apr", "May", "Jun",
                         "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}

Definition at line 29 of file log.c.

char* prog
 

Definition at line 60 of file mdb.c.

char SHUT_LOG[] = "/usr/adm/log" [static]
 

Definition at line 25 of file log.c.

Referenced by terminate(), and write_log().

char who[8]
 

Definition at line 27 of file log.c.

Referenced by parsemode(), and write_log().

char WTMP[] = "/usr/adm/wtmp" [static]
 

Definition at line 24 of file log.c.


Generated on Fri Apr 14 23:05:56 2006 for minix by  doxygen 1.4.6