Home
last modified time | relevance | path

Searched refs:ut (Results 1 – 6 of 6) sorted by relevance

/busybox-1.35.0/util-linux/
Dlast.c72 struct utmpx ut; in last_main() local
100 pos = lseek(file, pos - sizeof(ut), SEEK_SET); in last_main()
101 while ((n = full_read(file, &ut, sizeof(ut))) > 0) { in last_main()
102 if (n != sizeof(ut)) { in last_main()
105 n = index_in_strings(_ut_lin, ut.ut_line); in last_main()
109 n = index_in_strings(_ut_usr, ut.ut_user); in last_main()
111 ut.ut_type = n != 3 ? n : SHUTDOWN_TIME; in last_main()
113 if (is_prefixed_with(ut.ut_user, "shutdown")) in last_main()
114 ut.ut_type = SHUTDOWN_TIME; in last_main()
115 else if (is_prefixed_with(ut.ut_user, "reboot")) in last_main()
[all …]
Dlast_fancy.c46 static void show_entry(struct utmpx *ut, int state, time_t dur_secs) in show_entry() argument
58 tmp = ut->ut_tv.tv_sec; in show_entry()
63 dur_secs = MAX(dur_secs - (time_t)ut->ut_tv.tv_sec, (time_t)0); in show_entry()
101 ut->ut_user, in show_entry()
102 ut->ut_line, in show_entry()
105 ut->ut_host, in show_entry()
111 static int get_ut_type(struct utmpx *ut) in get_ut_type() argument
113 if (ut->ut_line[0] == '~') { in get_ut_type()
114 if (strcmp(ut->ut_user, "shutdown") == 0) { in get_ut_type()
117 if (strcmp(ut->ut_user, "reboot") == 0) { in get_ut_type()
[all …]
Dwall.c34 struct utmpx *ut; in wall_main() local
49 while ((ut = getutxent()) != NULL) { in wall_main()
51 if (ut->ut_type != USER_PROCESS) in wall_main()
53 line = concat_path_file("/dev", ut->ut_line); in wall_main()
/busybox-1.35.0/coreutils/
Dwho.c114 struct utmpx *ut; in who_main() local
123 while ((ut = getutxent()) != NULL) { in who_main()
124 if (ut->ut_user[0] in who_main()
125 && ((opt & 1) || ut->ut_type == USER_PROCESS) in who_main()
129 char name[sizeof("/dev/") + sizeof(ut->ut_line) + 1]; in who_main()
136 safe_strncpy(ut->ut_line[0] == '/' ? name : name + sizeof("/dev/")-1, in who_main()
137 ut->ut_line, in who_main()
138 sizeof(ut->ut_line)+1 in who_main()
144 seconds = ut->ut_tv.tv_sec; in who_main()
150 (int)sizeof(ut->ut_user), ut->ut_user, in who_main()
[all …]
/busybox-1.35.0/miscutils/
Drunlevel.c45 struct utmpx *ut; in runlevel_main() local
51 while ((ut = getutxent()) != NULL) { in runlevel_main()
52 if (ut->ut_type == RUN_LVL) { in runlevel_main()
53 prev = ut->ut_pid / 256; in runlevel_main()
55 printf("%c %c\n", prev, ut->ut_pid % 256); in runlevel_main()
/busybox-1.35.0/procps/
Duptime.c102 struct utmpx *ut; in uptime_main() local
104 while ((ut = getutxent()) != NULL) { in uptime_main()
105 if ((ut->ut_type == USER_PROCESS) && (ut->ut_user[0] != '\0')) in uptime_main()