Lines Matching refs:up

62 	struct utmpx *up = &utmpx;		/* and a pointer to it */  in account()  local
64 (void) memset(up, '\0', sizeof (utmpx)); in account()
65 up->ut_user[0] = '.'; in account()
66 (void) strncpy(&up->ut_user[1], Tag, sizeof (up->ut_user)-1); in account()
67 (void) strncpy(up->ut_line, lastname(line), sizeof (up->ut_line)); in account()
68 up->ut_pid = getpid(); in account()
69 up->ut_type = USER_PROCESS; in account()
70 up->ut_id[0] = 't'; in account()
71 up->ut_id[1] = 'm'; in account()
72 up->ut_id[2] = SC_WILDC; in account()
73 up->ut_id[3] = SC_WILDC; in account()
74 up->ut_exit.e_termination = 0; in account()
75 up->ut_exit.e_exit = 0; in account()
76 (void) time(&up->ut_tv.tv_sec); in account()
77 if (makeutx(up) == NULL) { in account()
78 log("makeutx for pid %d failed", up->ut_pid); in account()
122 struct utmpx *up; in cleanut() local
126 while ((up = getutxent())) { in cleanut()
127 if (up->ut_pid == pid) { in cleanut()
128 if (up->ut_type == DEAD_PROCESS) { in cleanut()
133 (void) strncpy(user, up->ut_user, sizeof (up->ut_user)); in cleanut()
134 user[sizeof (up->ut_user)] = '\0'; in cleanut()
135 (void) strncpy(ttyn, up->ut_line, sizeof (up->ut_line)); in cleanut()
136 ttyn[sizeof (up->ut_line)] = '\0'; in cleanut()
137 (void) strncpy(rhost, up->ut_host, in cleanut()
138 sizeof (up->ut_host)); in cleanut()
139 rhost[sizeof (up->ut_host)] = '\0'; in cleanut()
150 up->ut_type = DEAD_PROCESS; in cleanut()
151 up->ut_exit.e_termination = WTERMSIG(status); in cleanut()
152 up->ut_exit.e_exit = WEXITSTATUS(status); in cleanut()
153 (void) time(&up->ut_tv.tv_sec); in cleanut()
155 if (modutx(up) == NULL) { in cleanut()
161 (void) pututxline(up); in cleanut()
162 updwtmpx("wtmpx", up); in cleanut()