| 444 | } |
| 445 | |
| 446 | static void |
| 447 | print_deadprocs (STRUCT_UTMP const *utmp_ent) |
| 448 | { |
| 449 | static char *exitstr; |
| 450 | char *comment = make_id_equals_comment (utmp_ent); |
| 451 | PIDSTR_DECL_AND_INIT (pidstr, utmp_ent); |
| 452 | |
| 453 | if (!exitstr) |
| 454 | exitstr = xmalloc (strlen (_("term=")) |
| 455 | + INT_STRLEN_BOUND (utmp_ent->ut_exit.e_termination) + 1 |
| 456 | + strlen (_("exit=")) |
| 457 | + INT_STRLEN_BOUND (utmp_ent->ut_exit.e_exit) |
| 458 | + 1); |
| 459 | sprintf (exitstr, "%s%d %s%d", _("term="), utmp_ent->ut_exit.e_termination, |
| 460 | _("exit="), utmp_ent->ut_exit.e_exit); |
| 461 | |
| 462 | /* FIXME: add idle time? */ |
| 463 | |
| 464 | print_line ("", ' ', utmp_ent->ut_line, |
| 465 | time_string (utmp_ent), "", pidstr, comment, exitstr); |
| 466 | free (comment); |
| 467 | } |
| 468 | |
| 469 | static void |
| 470 | print_login (STRUCT_UTMP const *utmp_ent) |
no test coverage detected