#include #include #include #include #include /* * who version 0 * * main outline but no substance */ int main() { int fd; /* for file des of utmp */ struct utmp current_record; /* hold info from file */ int reclen = sizeof(struct utmp); fd = open( UTMP_FILE, O_RDONLY ); if ( fd == -1 ) { perror( "who0" ); exit(1); } while ( read ( fd , ¤t_record , reclen ) == reclen ) show_info( ¤t_record ); close ( fd ); return 0; }