ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/logging.C
(Generate patch)

Comparing rxvt-unicode/src/logging.C (file contents):
Revision 1.7 by pcg, Fri Feb 13 12:16:21 2004 UTC vs.
Revision 1.8 by pcg, Wed Mar 17 03:47:12 2004 UTC

81 else if (sscanf (pty, "pts/%d", &i) == 1) 81 else if (sscanf (pty, "pts/%d", &i) == 1)
82 sprintf (ut_id, "vt%02x", (i & 0xff)); /* sysv naming */ 82 sprintf (ut_id, "vt%02x", (i & 0xff)); /* sysv naming */
83#endif 83#endif
84 else if (STRNCMP (pty, "pty", 3) && STRNCMP (pty, "tty", 3)) 84 else if (STRNCMP (pty, "pty", 3) && STRNCMP (pty, "tty", 3))
85 { 85 {
86 rxvt_print_error ("can't parse tty name \"%s\"", pty); 86 rxvt_warn ("can't parse tty name \"%s\", not adding utmp entry.\n", pty);
87 return; 87 return;
88 } 88 }
89 89
90#ifdef HAVE_STRUCT_UTMP 90#ifdef HAVE_STRUCT_UTMP
91 MEMSET (ut, 0, sizeof (struct utmp)); 91 MEMSET (ut, 0, sizeof (struct utmp));
403 403
404# ifdef HAVE_STRUCT_LASTLOG 404# ifdef HAVE_STRUCT_LASTLOG
405 pwent = getpwuid (getuid ()); 405 pwent = getpwuid (getuid ());
406 if (!pwent) 406 if (!pwent)
407 { 407 {
408 rxvt_print_error ("no entry in password file"); 408 rxvt_warn ("no entry in password file, not updating lastlog.\n");
409 return; 409 return;
410 } 410 }
411
411 MEMSET (&ll, 0, sizeof (ll)); 412 MEMSET (&ll, 0, sizeof (ll));
412 ll.ll_time = time (NULL); 413 ll.ll_time = time (NULL);
413 STRNCPY (ll.ll_line, pty, sizeof (ll.ll_line)); 414 STRNCPY (ll.ll_line, pty, sizeof (ll.ll_line));
414 STRNCPY (ll.ll_host, host, sizeof (ll.ll_host)); 415 STRNCPY (ll.ll_host, host, sizeof (ll.ll_host));
415# ifdef LASTLOG_IS_DIR 416# ifdef LASTLOG_IS_DIR

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines