Lines Matching refs:utmpp
100 static struct utmpx *utmpp; /* pointer for getutxent() */ variable
105 #define NMAX (sizeof (utmpp->ut_user))
106 #define LMAX (sizeof (utmpp->ut_line))
122 static char nameval[sizeof (utmpp->ut_user) + 1]; /* invoker's name */
140 static char user[sizeof (utmpp->ut_user) + 1]; /* holds user name */
479 char device[sizeof (utmpp->ut_line) + 1]; in dump()
483 char path[sizeof (utmpp->ut_line) + 6]; in dump()
492 if (utmpp->ut_user[0] == '\0') in dump()
495 (void) strncpy(user, utmpp->ut_user, sizeof (user)); in dump()
520 if (utmpp->ut_type == RUN_LVL || utmpp->ut_type == DEAD_PROCESS) { in dump()
521 pterm = utmpp->ut_exit.e_termination; in dump()
522 pexit = utmpp->ut_exit.e_exit; in dump()
528 lptr = localtime(&utmpp->ut_xtime); in dump()
535 if (utmpp->ut_line[0] == '\0') in dump()
538 (void) strncpy(device, utmpp->ut_line, in dump()
539 sizeof (utmpp->ut_line)); in dump()
540 device[sizeof (utmpp->ut_line)] = '\0'; in dump()
547 if (Topt && (utmpp->ut_type == USER_PROCESS)) { in dump()
550 (void) strncpy(path + 5, utmpp->ut_line, in dump()
551 sizeof (utmpp->ut_line)); in dump()
552 path[5 + sizeof (utmpp->ut_line)] = '\0'; in dump()
574 if (utmpp->ut_type == USER_PROCESS) { in dump()
576 (void) strncpy(path + 5, utmpp->ut_line, in dump()
577 sizeof (utmpp->ut_line)); in dump()
578 path[5 + sizeof (utmpp->ut_line)] = '\0'; in dump()
599 if (utmpp->ut_type != BOOT_TIME && in dump()
600 utmpp->ut_type != RUN_LVL && in dump()
601 utmpp->ut_type != ACCOUNTING) in dump()
602 (void) printf(" %5ld", utmpp->ut_pid); in dump()
607 if (utmpp->ut_type == DEAD_PROCESS) { in dump()
609 utmpp->ut_id); in dump()
612 } else if (utmpp->ut_type != INIT_PROCESS) { in dump()
625 while ((rc = strncmp(utmpp->ut_id, iinit, in dump()
664 if (utmpp->ut_type == INIT_PROCESS) in dump()
665 (void) printf(gettext(" id=%4.4s"), utmpp->ut_id); in dump()
669 if (dopt && utmpp->ut_type == DEAD_PROCESS) { in dump()
679 if (utmpp->ut_type == RUN_LVL) { in dump()
680 (void) printf(" %c %5ld %c", pterm, utmpp->ut_pid, in dump()
691 if (utmpp->ut_type == BOOT_TIME) { in dump()
701 if (utmpp && utmpp->ut_host[0]) in dump()
702 (void) printf("\t(%.*s)", sizeof (utmpp->ut_host), in dump()
703 utmpp->ut_host); in dump()
723 while ((utmpp = getutxent()) != NULL) { in process()
727 utmpp->ut_user, utmpp->ut_id, utmpp->ut_line, utmpp->ut_type); in process()
729 if (utmpp->ut_type <= UTMAXTYPE) { in process()
734 if (strncmp(myname, utmpp->ut_user, in process()
735 sizeof (utmpp->ut_user)) == 0 && in process()
736 strncmp(mytty, utmpp->ut_line, in process()
737 sizeof (utmpp->ut_line)) == 0 && in process()
738 utmpp->ut_type == USER_PROCESS) { in process()
756 if (validtype[utmpp->ut_type]) { in process()
758 if (utmpp->ut_type == LOGIN_PROCESS) { in process()
759 if ((utmpp->ut_line[0] == '\0') || in process()
760 (strcmp(utmpp->ut_user, in process()
770 "of %d\n"), program, utmpp->ut_type); in process()
801 utmpp = &utmpt; in process()