/[inetutils]/inetutils/libinetutils/utmp_init.c
ViewVC logotype

Diff of /inetutils/libinetutils/utmp_init.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.7 by gray, Thu Apr 4 23:57:18 2002 UTC revision 1.8 by gray, Tue May 14 15:15:05 2002 UTC
# Line 53  utmp_init(char   *line, char   *user, ch Line 53  utmp_init(char   *line, char   *user, ch
53  #endif  #endif
54    
55      memset((char *) &utx, 0, sizeof(utx));      memset((char *) &utx, 0, sizeof(utx));
56  #if defined(HAVE_UTMP_UT_ID)  #if defined(HAVE_STRUCT_UTMP_UT_ID)
57      strncpy(utx.ut_id, id, sizeof(utx.ut_id));      strncpy(utx.ut_id, id, sizeof(utx.ut_id));
58  #endif  #endif
59  #if defined(HAVE_UTMP_UT_USER)  #if defined(HAVE_STRUCT_UTMP_UT_USER)
60      strncpy(utx.ut_user, user, sizeof(utx.ut_user));      strncpy(utx.ut_user, user, sizeof(utx.ut_user));
61  #else  #else
62      strncpy(utx.ut_name, user, sizeof(utx.ut_name));      strncpy(utx.ut_name, user, sizeof(utx.ut_name));
63  #endif  #endif
64      strncpy(utx.ut_line, line, sizeof(utx.ut_line));      strncpy(utx.ut_line, line, sizeof(utx.ut_line));
65  #if defined(HAVE_UTMP_UT_PID)  #if defined(HAVE_STRUCT_UTMP_UT_PID)
66      utx.ut_pid = getpid();      utx.ut_pid = getpid();
67  #endif  #endif
68  #if defined(HAVE_UTMP_UT_TYPE)  #if defined(HAVE_STRUCT_UTMP_UT_TYPE)
69      utx.ut_type = LOGIN_PROCESS;      utx.ut_type = LOGIN_PROCESS;
70  #endif  #endif
71  #if defined(HAVE_UTMPX_UT_TV)  #if defined(HAVE_STRUCT_UTMPX_UT_TV)
72      gettimeofday(&(utx.ut_tv), 0);      gettimeofday(&(utx.ut_tv), 0);
73  #else  #else
74      time(&(utx.ut_time));      time(&(utx.ut_time));

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26