Line | Source | Count |
1 | | - |
2 | | - |
3 | | - |
4 | static | - |
5 | _Bool | - |
6 | do_lookup; | - |
7 | | - |
8 | | - |
9 | | - |
10 | | - |
11 | static | - |
12 | _Bool | - |
13 | short_list; | - |
14 | | - |
15 | | - |
16 | static | - |
17 | _Bool | - |
18 | short_output; | - |
19 | | - |
20 | | - |
21 | | - |
22 | | - |
23 | static | - |
24 | _Bool | - |
25 | include_idle; | - |
26 | | - |
27 | | - |
28 | static | - |
29 | _Bool | - |
30 | include_heading; | - |
31 | | - |
32 | | - |
33 | | - |
34 | static | - |
35 | _Bool | - |
36 | include_mesg; | - |
37 | | - |
38 | | - |
39 | static | - |
40 | _Bool | - |
41 | include_exit; | - |
42 | | - |
43 | | - |
44 | static | - |
45 | _Bool | - |
46 | need_boottime; | - |
47 | | - |
48 | | - |
49 | static | - |
50 | _Bool | - |
51 | need_deadprocs; | - |
52 | | - |
53 | | - |
54 | static | - |
55 | _Bool | - |
56 | need_login; | - |
57 | | - |
58 | | - |
59 | static | - |
60 | _Bool | - |
61 | need_initspawn; | - |
62 | | - |
63 | | - |
64 | static | - |
65 | _Bool | - |
66 | need_clockchange; | - |
67 | | - |
68 | | - |
69 | static | - |
70 | _Bool | - |
71 | need_runlevel; | - |
72 | | - |
73 | | - |
74 | static | - |
75 | _Bool | - |
76 | need_users; | - |
77 | | - |
78 | | - |
79 | static | - |
80 | _Bool | - |
81 | my_line_only; | - |
82 | | - |
83 | | - |
84 | | - |
85 | static char const *time_format; | - |
86 | static int time_format_width; | - |
87 | | - |
88 | | - |
89 | enum | - |
90 | { | - |
91 | LOOKUP_OPTION = 0x7f + 1 | - |
92 | }; | - |
93 | | - |
94 | static struct option const longopts[] = | - |
95 | { | - |
96 | {"all", | - |
97 | 0 | - |
98 | , | - |
99 | ((void *)0) | - |
100 | , 'a'}, | - |
101 | {"boot", | - |
102 | 0 | - |
103 | , | - |
104 | ((void *)0) | - |
105 | , 'b'}, | - |
106 | {"count", | - |
107 | 0 | - |
108 | , | - |
109 | ((void *)0) | - |
110 | , 'q'}, | - |
111 | {"dead", | - |
112 | 0 | - |
113 | , | - |
114 | ((void *)0) | - |
115 | , 'd'}, | - |
116 | {"heading", | - |
117 | 0 | - |
118 | , | - |
119 | ((void *)0) | - |
120 | , 'H'}, | - |
121 | {"login", | - |
122 | 0 | - |
123 | , | - |
124 | ((void *)0) | - |
125 | , 'l'}, | - |
126 | {"lookup", | - |
127 | 0 | - |
128 | , | - |
129 | ((void *)0) | - |
130 | , LOOKUP_OPTION}, | - |
131 | {"message", | - |
132 | 0 | - |
133 | , | - |
134 | ((void *)0) | - |
135 | , 'T'}, | - |
136 | {"mesg", | - |
137 | 0 | - |
138 | , | - |
139 | ((void *)0) | - |
140 | , 'T'}, | - |
141 | {"process", | - |
142 | 0 | - |
143 | , | - |
144 | ((void *)0) | - |
145 | , 'p'}, | - |
146 | {"runlevel", | - |
147 | 0 | - |
148 | , | - |
149 | ((void *)0) | - |
150 | , 'r'}, | - |
151 | {"short", | - |
152 | 0 | - |
153 | , | - |
154 | ((void *)0) | - |
155 | , 's'}, | - |
156 | {"time", | - |
157 | 0 | - |
158 | , | - |
159 | ((void *)0) | - |
160 | , 't'}, | - |
161 | {"users", | - |
162 | 0 | - |
163 | , | - |
164 | ((void *)0) | - |
165 | , 'u'}, | - |
166 | {"writable", | - |
167 | 0 | - |
168 | , | - |
169 | ((void *)0) | - |
170 | , 'T'}, | - |
171 | {"help", | - |
172 | 0 | - |
173 | , | - |
174 | ((void *)0) | - |
175 | , GETOPT_HELP_CHAR}, | - |
176 | {"version", | - |
177 | 0 | - |
178 | , | - |
179 | ((void *)0) | - |
180 | , GETOPT_VERSION_CHAR}, | - |
181 | { | - |
182 | ((void *)0) | - |
183 | , 0, | - |
184 | ((void *)0) | - |
185 | , 0} | - |
186 | }; | - |
187 | | - |
188 | | - |
189 | | - |
190 | | - |
191 | static const char * | - |
192 | idle_string (time_t when, time_t boottime) | - |
193 | { | - |
194 | static time_t now = ((time_t) ~ ((time_t) (! (! ((time_t) 0 < (time_t) -1)) ? (time_t) -1 : ((((time_t) 1 << ((sizeof (time_t) * 8) - 2)) - 1) * 2 + 1)))); | - |
195 | | - |
196 | if (now == ((time_t) ~ ((time_t) (! (! ((time_t) 0 < (time_t) -1)) ? (time_t) -1 : ((((time_t) 1 << ((sizeof (time_t) * 8) - 2)) - 1) * 2 + 1))))TRUE | evaluated 1 time by 1 test | FALSE | never evaluated |
) | 0-1 |
197 | time (&now);executed 1 time by 1 test: time (&now); | 1 |
198 | | - |
199 | if (boottime < whenTRUE | evaluated 1 time by 1 test | FALSE | never evaluated |
&& now - 24 * 60 * 60 < whenTRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
&& when <= nowTRUE | never evaluated | FALSE | never evaluated |
) | 0-1 |
200 | { | - |
201 | int seconds_idle = now - when; | - |
202 | if (seconds_idle < 60TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
203 | return never executed: return " . "; " . ";never executed: return " . "; | 0 |
204 | else | - |
205 | { | - |
206 | static char idle_hhmm[6]; | - |
207 | | - |
208 | | - |
209 | | - |
210 | (( | - |
211 | seconds_idle / (60 * 60) < 24 | - |
212 | ) ? (void) (0) : __assert_fail ( | - |
213 | "seconds_idle / (60 * 60) < 24" | - |
214 | , "src/who.c", 205, __PRETTY_FUNCTION__)) | - |
215 | ; | - |
216 | sprintf (idle_hhmm, "%02d:%02d", | - |
217 | seconds_idle / (60 * 60), | - |
218 | (seconds_idle % (60 * 60)) / 60); | - |
219 | return never executed: return idle_hhmm; idle_hhmm;never executed: return idle_hhmm; | 0 |
220 | } | - |
221 | } | - |
222 | | - |
223 | returnexecuted 1 time by 1 test: return dcgettext (((void *)0), " old " , 5) ; executed 1 time by 1 test: return dcgettext (((void *)0), " old " , 5) ; | 1 |
224 | dcgettext (((void *)0), executed 1 time by 1 test: return dcgettext (((void *)0), " old " , 5) ; | 1 |
225 | " old "executed 1 time by 1 test: return dcgettext (((void *)0), " old " , 5) ; | 1 |
226 | , 5)executed 1 time by 1 test: return dcgettext (((void *)0), " old " , 5) ; | 1 |
227 | ;executed 1 time by 1 test: return dcgettext (((void *)0), " old " , 5) ; | 1 |
228 | } | - |
229 | | - |
230 | | - |
231 | static const char * | - |
232 | time_string (const STRUCT_UTMP *utmp_ent) | - |
233 | { | - |
234 | static char buf[(((((sizeof (intmax_t) * 8) - (! ((__typeof__ (intmax_t)) 0 < (__typeof__ (intmax_t)) -1))) * 146 + 484) / 485) + (! ((__typeof__ (intmax_t)) 0 < (__typeof__ (intmax_t)) -1))) + sizeof "-%m-%d %H:%M"]; | - |
235 | | - |
236 | | - |
237 | | - |
238 | | - |
239 | | - |
240 | | - |
241 | | - |
242 | time_t t = ((utmp_ent)->ut_tv.tv_sec); | - |
243 | struct tm *tmp = localtime (&t); | - |
244 | | - |
245 | if (tmpTRUE | evaluated 1 time by 1 test | FALSE | never evaluated |
) | 0-1 |
246 | { | - |
247 | strftime (buf, sizeof buf, time_format, tmp); | - |
248 | returnexecuted 1 time by 1 test: return buf; buf;executed 1 time by 1 test: return buf; | 1 |
249 | } | - |
250 | else | - |
251 | return never executed: return timetostr (t, buf); timetostr (t, buf);never executed: return timetostr (t, buf); | 0 |
252 | } | - |
253 | | - |
254 | | - |
255 | | - |
256 | | - |
257 | static void | - |
258 | print_line (int userlen, const char *user, const char state, | - |
259 | int linelen, const char *line, | - |
260 | const char *time_str, const char *idle, const char *pid, | - |
261 | const char *comment, const char *exitstr) | - |
262 | { | - |
263 | static char mesg[3] = { ' ', 'x', '\0' }; | - |
264 | char *buf; | - |
265 | char x_idle[1 + 6 + 1]; | - |
266 | char x_pid[1 + (((((sizeof (pid_t) * 8) - (! ((__typeof__ (pid_t)) 0 < (__typeof__ (pid_t)) -1))) * 146 + 484) / 485) + (! ((__typeof__ (pid_t)) 0 < (__typeof__ (pid_t)) -1))) + 1]; | - |
267 | char *x_exitstr; | - |
268 | int err; | - |
269 | | - |
270 | mesg[1] = state; | - |
271 | | - |
272 | if (include_idleTRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
&& !short_outputTRUE | never evaluated | FALSE | never evaluated |
&& strlen (idle) < sizeof x_idle - 1TRUE | never evaluated | FALSE | never evaluated |
) | 0-1 |
273 | sprintf (x_idle, " %-6s", idle); never executed: sprintf (x_idle, " %-6s", idle); | 0 |
274 | else | - |
275 | *executed 1 time by 1 test: *x_idle = '\0'; x_idle = '\0';executed 1 time by 1 test: *x_idle = '\0'; | 1 |
276 | | - |
277 | if (!short_outputTRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
&& strlen (pid) < sizeof x_pid - 1TRUE | never evaluated | FALSE | never evaluated |
) | 0-1 |
278 | sprintf (x_pid, " %10s", pid); never executed: sprintf (x_pid, " %10s", pid); | 0 |
279 | else | - |
280 | *executed 1 time by 1 test: *x_pid = '\0'; x_pid = '\0';executed 1 time by 1 test: *x_pid = '\0'; | 1 |
281 | | - |
282 | x_exitstr = xmalloc (include_exit ? 1 + | - |
283 | ((( | - |
284 | 12 | - |
285 | )>( | - |
286 | strlen (exitstr) | - |
287 | ))?( | - |
288 | 12 | - |
289 | ):( | - |
290 | strlen (exitstr) | - |
291 | )) | - |
292 | + 1 : 1); | - |
293 | if (include_exitTRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
) | 0-1 |
294 | sprintf (x_exitstr, " %-12s", exitstr); never executed: sprintf (x_exitstr, " %-12s", exitstr); | 0 |
295 | else | - |
296 | *executed 1 time by 1 test: *x_exitstr = '\0'; x_exitstr = '\0';executed 1 time by 1 test: *x_exitstr = '\0'; | 1 |
297 | | - |
298 | err = asprintf (&buf, | - |
299 | "%-8.*s" | - |
300 | "%s" | - |
301 | " %-12.*s" | - |
302 | " %-*s" | - |
303 | "%s" | - |
304 | "%s" | - |
305 | " %-8s" | - |
306 | "%s" | - |
307 | , | - |
308 | userlen, user ? user : " .", | - |
309 | include_mesg ? mesg : "", | - |
310 | linelen, line, | - |
311 | time_format_width, | - |
312 | time_str, | - |
313 | x_idle, | - |
314 | x_pid, | - |
315 | | - |
316 | | - |
317 | | - |
318 | | - |
319 | comment, | - |
320 | x_exitstr | - |
321 | ); | - |
322 | if (err == -1TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
) | 0-1 |
323 | xalloc_die (); never executed: xalloc_die (); | 0 |
324 | | - |
325 | { | - |
326 | | - |
327 | char *p = buf + strlen (buf); | - |
328 | while (*--TRUE | evaluated 4 times by 1 test | FALSE | evaluated 1 time by 1 test |
p == ' 'TRUE | evaluated 4 times by 1 test | FALSE | evaluated 1 time by 1 test |
) | 1-4 |
329 | ;executed 4 times by 1 test: ; | 4 |
330 | *(p + 1) = '\0'; | - |
331 | } | - |
332 | | - |
333 | puts (buf); | - |
334 | free (buf); | - |
335 | free (x_exitstr); | - |
336 | }executed 1 time by 1 test: end of block | 1 |
337 | | - |
338 | | - |
339 | | - |
340 | static | - |
341 | _Bool | - |
342 | | - |
343 | is_tty_writable (struct stat const *pstat) | - |
344 | { | - |
345 | returnexecuted 1 time by 1 test: return pstat->st_mode & (0200 >> 3) ; pstat->st_mode & executed 1 time by 1 test: return pstat->st_mode & (0200 >> 3) ; | 1 |
346 | (0200 >> 3)executed 1 time by 1 test: return pstat->st_mode & (0200 >> 3) ; | 1 |
347 | ;executed 1 time by 1 test: return pstat->st_mode & (0200 >> 3) ; | 1 |
348 | } | - |
349 | | - |
350 | | - |
351 | | - |
352 | static void | - |
353 | print_user (const STRUCT_UTMP *utmp_ent, time_t boottime) | - |
354 | { | - |
355 | struct stat stats; | - |
356 | time_t last_change; | - |
357 | char mesg; | - |
358 | char idlestr[6 + 1]; | - |
359 | static char *hoststr; | - |
360 | | - |
361 | static size_t hostlen; | - |
362 | | - |
363 | | - |
364 | | - |
365 | | - |
366 | | - |
367 | char line[sizeof (utmp_ent->ut_line) + (sizeof ("/dev/") - 1) + 1]; | - |
368 | char *p = line; | - |
369 | char pidstr[(((((sizeof (utmp_ent->ut_pid) * 8) - (! ((__typeof__ (utmp_ent->ut_pid)) 0 < (__typeof__ (utmp_ent->ut_pid)) -1))) * 146 + 484) / 485) + (! ((__typeof__ (utmp_ent->ut_pid)) 0 < (__typeof__ (utmp_ent->ut_pid)) -1))) + 1]; sprintf (pidstr, "%ld", (long int) (utmp_ent->ut_pid)); | - |
370 | | - |
371 | | - |
372 | | - |
373 | | - |
374 | if ( ! ((((TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
utmp_ent->ut_line)[0]) == '/')TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
|| 0 != 0TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
)) | 0-1 |
375 | p = stpcpy (p, "/dev/");executed 1 time by 1 test: p = stpcpy (p, "/dev/"); | 1 |
376 | stzncpy (p, utmp_ent->ut_line, sizeof (utmp_ent->ut_line)); | - |
377 | | - |
378 | if (stat (line, &stats) == 0TRUE | evaluated 1 time by 1 test | FALSE | never evaluated |
) | 0-1 |
379 | { | - |
380 | mesg = is_tty_writable (&stats)TRUE | evaluated 1 time by 1 test | FALSE | never evaluated |
? '+' : '-'; | 0-1 |
381 | last_change = stats. | - |
382 | st_atim.tv_sec | - |
383 | ; | - |
384 | }executed 1 time by 1 test: end of block | 1 |
385 | else | - |
386 | { | - |
387 | mesg = '?'; | - |
388 | last_change = 0; | - |
389 | } never executed: end of block | 0 |
390 | | - |
391 | if (last_changeTRUE | evaluated 1 time by 1 test | FALSE | never evaluated |
) | 0-1 |
392 | sprintf (idlestr, "%.*s", 6, idle_string (last_change, boottime));executed 1 time by 1 test: sprintf (idlestr, "%.*s", 6, idle_string (last_change, boottime)); | 1 |
393 | else | - |
394 | sprintf (idlestr, " ?"); never executed: sprintf (idlestr, " ?"); | 0 |
395 | | - |
396 | | - |
397 | if (utmp_ent->ut_host[0]TRUE | evaluated 1 time by 1 test | FALSE | never evaluated |
) | 0-1 |
398 | { | - |
399 | char ut_host[sizeof (utmp_ent->ut_host) + 1]; | - |
400 | char *host = | - |
401 | ((void *)0) | - |
402 | ; | - |
403 | char *display = | - |
404 | ((void *)0) | - |
405 | ; | - |
406 | | - |
407 | | - |
408 | stzncpy (ut_host, utmp_ent->ut_host, sizeof (utmp_ent->ut_host)); | - |
409 | | - |
410 | | - |
411 | display = | - |
412 | (__extension__ (__builtin_constant_p (TRUE | evaluated 1 time by 1 test | FALSE | never evaluated |
| 0-1 |
413 | ':'TRUE | evaluated 1 time by 1 test | FALSE | never evaluated |
| 0-1 |
414 | )TRUE | evaluated 1 time by 1 test | FALSE | never evaluated |
&& !__builtin_constant_p (TRUE | evaluated 1 time by 1 test | FALSE | never evaluated |
| 0-1 |
415 | ut_hostTRUE | evaluated 1 time by 1 test | FALSE | never evaluated |
| 0-1 |
416 | )TRUE | evaluated 1 time by 1 test | FALSE | never evaluated |
&& (TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
| 0-1 |
417 | ':'TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
| 0-1 |
418 | ) == '\0'TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
? (char *) __rawmemchr ( | 0-1 |
419 | ut_host | - |
420 | , | - |
421 | ':' | - |
422 | ) : __builtin_strchr ( | - |
423 | ut_host | - |
424 | , | - |
425 | ':' | - |
426 | ))) | - |
427 | ; | - |
428 | if (displayTRUE | evaluated 1 time by 1 test | FALSE | never evaluated |
) | 0-1 |
429 | *executed 1 time by 1 test: *display++ = '\0'; display++ = '\0';executed 1 time by 1 test: *display++ = '\0'; | 1 |
430 | | - |
431 | if (*TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
ut_hostTRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
&& do_lookupTRUE | never evaluated | FALSE | never evaluated |
) | 0-1 |
432 | { | - |
433 | | - |
434 | host = canon_host (ut_host); | - |
435 | } never executed: end of block | 0 |
436 | | - |
437 | if (! hostTRUE | evaluated 1 time by 1 test | FALSE | never evaluated |
) | 0-1 |
438 | host = ut_host;executed 1 time by 1 test: host = ut_host; | 1 |
439 | | - |
440 | if (displayTRUE | evaluated 1 time by 1 test | FALSE | never evaluated |
) | 0-1 |
441 | { | - |
442 | if (hostlen < strlen (host) + strlen (display) + 4TRUE | evaluated 1 time by 1 test | FALSE | never evaluated |
) | 0-1 |
443 | { | - |
444 | hostlen = strlen (host) + strlen (display) + 4; | - |
445 | free (hoststr); | - |
446 | hoststr = xmalloc (hostlen); | - |
447 | }executed 1 time by 1 test: end of block | 1 |
448 | sprintf (hoststr, "(%s:%s)", host, display); | - |
449 | }executed 1 time by 1 test: end of block | 1 |
450 | else | - |
451 | { | - |
452 | if (hostlen < strlen (host) + 3TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
453 | { | - |
454 | hostlen = strlen (host) + 3; | - |
455 | free (hoststr); | - |
456 | hoststr = xmalloc (hostlen); | - |
457 | } never executed: end of block | 0 |
458 | sprintf (hoststr, "(%s)", host); | - |
459 | } never executed: end of block | 0 |
460 | | - |
461 | if (host != ut_hostTRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
) | 0-1 |
462 | free (host); never executed: free (host); | 0 |
463 | }executed 1 time by 1 test: end of block | 1 |
464 | else | - |
465 | { | - |
466 | if (hostlen < 1TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
467 | { | - |
468 | hostlen = 1; | - |
469 | free (hoststr); | - |
470 | hoststr = xmalloc (hostlen); | - |
471 | } never executed: end of block | 0 |
472 | *hoststr = '\0'; | - |
473 | } never executed: end of block | 0 |
474 | | - |
475 | | - |
476 | print_line (sizeof ((utmp_ent)-> | - |
477 | ut_user | - |
478 | ), ((utmp_ent)-> | - |
479 | ut_user | - |
480 | ), mesg, | - |
481 | sizeof utmp_ent->ut_line, utmp_ent->ut_line, | - |
482 | time_string (utmp_ent), idlestr, pidstr, | - |
483 | hoststr ? hoststr : "", ""); | - |
484 | }executed 1 time by 1 test: end of block | 1 |
485 | | - |
486 | static void | - |
487 | print_boottime (const STRUCT_UTMP *utmp_ent) | - |
488 | { | - |
489 | print_line (-1, "", ' ', -1, | - |
490 | dcgettext (((void *)0), | - |
491 | "system boot" | - |
492 | , 5) | - |
493 | , | - |
494 | time_string (utmp_ent), "", "", "", ""); | - |
495 | } never executed: end of block | 0 |
496 | | - |
497 | static char * | - |
498 | make_id_equals_comment (STRUCT_UTMP const *utmp_ent) | - |
499 | { | - |
500 | char *comment = xmalloc (strlen ( | - |
501 | dcgettext (((void *)0), | - |
502 | "id=" | - |
503 | , 5) | - |
504 | ) + sizeof ((utmp_ent)->ut_id) + 1); | - |
505 | | - |
506 | strcpy (comment, | - |
507 | dcgettext (((void *)0), | - |
508 | "id=" | - |
509 | , 5) | - |
510 | ); | - |
511 | strncat (comment, ((utmp_ent)->ut_id), sizeof ((utmp_ent)->ut_id)); | - |
512 | return never executed: return comment; comment;never executed: return comment; | 0 |
513 | } | - |
514 | | - |
515 | static void | - |
516 | print_deadprocs (const STRUCT_UTMP *utmp_ent) | - |
517 | { | - |
518 | static char *exitstr; | - |
519 | char *comment = make_id_equals_comment (utmp_ent); | - |
520 | char pidstr[(((((sizeof (utmp_ent->ut_pid) * 8) - (! ((__typeof__ (utmp_ent->ut_pid)) 0 < (__typeof__ (utmp_ent->ut_pid)) -1))) * 146 + 484) / 485) + (! ((__typeof__ (utmp_ent->ut_pid)) 0 < (__typeof__ (utmp_ent->ut_pid)) -1))) + 1]; sprintf (pidstr, "%ld", (long int) (utmp_ent->ut_pid)); | - |
521 | | - |
522 | if (!exitstrTRUE | never evaluated | FALSE | never evaluated |
) | 0 |
523 | exitstr = xmalloc (strlen ( never executed: exitstr = xmalloc (strlen ( dcgettext (((void *)0), "term=" , 5) ) + (((((sizeof (((utmp_ent)->ut_exit.e_termination)) * 8) - (! ((__typeof__ (((utmp_ent)->ut_exit.e_termination))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_termination))) -1))) * 146 + 484) ...ut_exit.e_exit)) * 8) - (! ((__typeof__ (((utmp_ent)->ut_exit.e_exit))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_exit))) -1))) * 146 + 484) / 485) + (! ((__typeof__ (((utmp_ent)->ut_exit.e_exit))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_exit))) -1))) + 1); | 0 |
524 | dcgettext (((void *)0), never executed: exitstr = xmalloc (strlen ( dcgettext (((void *)0), "term=" , 5) ) + (((((sizeof (((utmp_ent)->ut_exit.e_termination)) * 8) - (! ((__typeof__ (((utmp_ent)->ut_exit.e_termination))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_termination))) -1))) * 146 + 484) ...ut_exit.e_exit)) * 8) - (! ((__typeof__ (((utmp_ent)->ut_exit.e_exit))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_exit))) -1))) * 146 + 484) / 485) + (! ((__typeof__ (((utmp_ent)->ut_exit.e_exit))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_exit))) -1))) + 1); | 0 |
525 | "term=" never executed: exitstr = xmalloc (strlen ( dcgettext (((void *)0), "term=" , 5) ) + (((((sizeof (((utmp_ent)->ut_exit.e_termination)) * 8) - (! ((__typeof__ (((utmp_ent)->ut_exit.e_termination))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_termination))) -1))) * 146 + 484) ...ut_exit.e_exit)) * 8) - (! ((__typeof__ (((utmp_ent)->ut_exit.e_exit))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_exit))) -1))) * 146 + 484) / 485) + (! ((__typeof__ (((utmp_ent)->ut_exit.e_exit))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_exit))) -1))) + 1); | 0 |
526 | , 5) never executed: exitstr = xmalloc (strlen ( dcgettext (((void *)0), "term=" , 5) ) + (((((sizeof (((utmp_ent)->ut_exit.e_termination)) * 8) - (! ((__typeof__ (((utmp_ent)->ut_exit.e_termination))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_termination))) -1))) * 146 + 484) ...ut_exit.e_exit)) * 8) - (! ((__typeof__ (((utmp_ent)->ut_exit.e_exit))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_exit))) -1))) * 146 + 484) / 485) + (! ((__typeof__ (((utmp_ent)->ut_exit.e_exit))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_exit))) -1))) + 1); | 0 |
527 | ) never executed: exitstr = xmalloc (strlen ( dcgettext (((void *)0), "term=" , 5) ) + (((((sizeof (((utmp_ent)->ut_exit.e_termination)) * 8) - (! ((__typeof__ (((utmp_ent)->ut_exit.e_termination))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_termination))) -1))) * 146 + 484) ...ut_exit.e_exit)) * 8) - (! ((__typeof__ (((utmp_ent)->ut_exit.e_exit))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_exit))) -1))) * 146 + 484) / 485) + (! ((__typeof__ (((utmp_ent)->ut_exit.e_exit))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_exit))) -1))) + 1); | 0 |
528 | + (((((sizeof (((utmp_ent)->ut_exit.e_termination)) * 8) - (! ((__typeof__ (((utmp_ent)->ut_exit.e_termination))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_termination))) -1))) * 146 + 484) / 485) + (! ((__typeof__ (((utmp_ent)->ut_exit.e_termination))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_termination))) -1))) + 1 never executed: exitstr = xmalloc (strlen ( dcgettext (((void *)0), "term=" , 5) ) + (((((sizeof (((utmp_ent)->ut_exit.e_termination)) * 8) - (! ((__typeof__ (((utmp_ent)->ut_exit.e_termination))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_termination))) -1))) * 146 + 484) ...ut_exit.e_exit)) * 8) - (! ((__typeof__ (((utmp_ent)->ut_exit.e_exit))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_exit))) -1))) * 146 + 484) / 485) + (! ((__typeof__ (((utmp_ent)->ut_exit.e_exit))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_exit))) -1))) + 1); | 0 |
529 | + strlen ( never executed: exitstr = xmalloc (strlen ( dcgettext (((void *)0), "term=" , 5) ) + (((((sizeof (((utmp_ent)->ut_exit.e_termination)) * 8) - (! ((__typeof__ (((utmp_ent)->ut_exit.e_termination))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_termination))) -1))) * 146 + 484) ...ut_exit.e_exit)) * 8) - (! ((__typeof__ (((utmp_ent)->ut_exit.e_exit))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_exit))) -1))) * 146 + 484) / 485) + (! ((__typeof__ (((utmp_ent)->ut_exit.e_exit))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_exit))) -1))) + 1); | 0 |
530 | dcgettext (((void *)0), never executed: exitstr = xmalloc (strlen ( dcgettext (((void *)0), "term=" , 5) ) + (((((sizeof (((utmp_ent)->ut_exit.e_termination)) * 8) - (! ((__typeof__ (((utmp_ent)->ut_exit.e_termination))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_termination))) -1))) * 146 + 484) ...ut_exit.e_exit)) * 8) - (! ((__typeof__ (((utmp_ent)->ut_exit.e_exit))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_exit))) -1))) * 146 + 484) / 485) + (! ((__typeof__ (((utmp_ent)->ut_exit.e_exit))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_exit))) -1))) + 1); | 0 |
531 | "exit=" never executed: exitstr = xmalloc (strlen ( dcgettext (((void *)0), "term=" , 5) ) + (((((sizeof (((utmp_ent)->ut_exit.e_termination)) * 8) - (! ((__typeof__ (((utmp_ent)->ut_exit.e_termination))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_termination))) -1))) * 146 + 484) ...ut_exit.e_exit)) * 8) - (! ((__typeof__ (((utmp_ent)->ut_exit.e_exit))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_exit))) -1))) * 146 + 484) / 485) + (! ((__typeof__ (((utmp_ent)->ut_exit.e_exit))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_exit))) -1))) + 1); | 0 |
532 | , 5) never executed: exitstr = xmalloc (strlen ( dcgettext (((void *)0), "term=" , 5) ) + (((((sizeof (((utmp_ent)->ut_exit.e_termination)) * 8) - (! ((__typeof__ (((utmp_ent)->ut_exit.e_termination))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_termination))) -1))) * 146 + 484) ...ut_exit.e_exit)) * 8) - (! ((__typeof__ (((utmp_ent)->ut_exit.e_exit))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_exit))) -1))) * 146 + 484) / 485) + (! ((__typeof__ (((utmp_ent)->ut_exit.e_exit))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_exit))) -1))) + 1); | 0 |
533 | ) never executed: exitstr = xmalloc (strlen ( dcgettext (((void *)0), "term=" , 5) ) + (((((sizeof (((utmp_ent)->ut_exit.e_termination)) * 8) - (! ((__typeof__ (((utmp_ent)->ut_exit.e_termination))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_termination))) -1))) * 146 + 484) ...ut_exit.e_exit)) * 8) - (! ((__typeof__ (((utmp_ent)->ut_exit.e_exit))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_exit))) -1))) * 146 + 484) / 485) + (! ((__typeof__ (((utmp_ent)->ut_exit.e_exit))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_exit))) -1))) + 1); | 0 |
534 | + (((((sizeof (((utmp_ent)->ut_exit.e_exit)) * 8) - (! ((__typeof__ (((utmp_ent)->ut_exit.e_exit))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_exit))) -1))) * 146 + 484) / 485) + (! ((__typeof__ (((utmp_ent)->ut_exit.e_exit))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_exit))) -1))) never executed: exitstr = xmalloc (strlen ( dcgettext (((void *)0), "term=" , 5) ) + (((((sizeof (((utmp_ent)->ut_exit.e_termination)) * 8) - (! ((__typeof__ (((utmp_ent)->ut_exit.e_termination))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_termination))) -1))) * 146 + 484) ...ut_exit.e_exit)) * 8) - (! ((__typeof__ (((utmp_ent)->ut_exit.e_exit))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_exit))) -1))) * 146 + 484) / 485) + (! ((__typeof__ (((utmp_ent)->ut_exit.e_exit))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_exit))) -1))) + 1); | 0 |
535 | + 1); never executed: exitstr = xmalloc (strlen ( dcgettext (((void *)0), "term=" , 5) ) + (((((sizeof (((utmp_ent)->ut_exit.e_termination)) * 8) - (! ((__typeof__ (((utmp_ent)->ut_exit.e_termination))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_termination))) -1))) * 146 + 484) ...ut_exit.e_exit)) * 8) - (! ((__typeof__ (((utmp_ent)->ut_exit.e_exit))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_exit))) -1))) * 146 + 484) / 485) + (! ((__typeof__ (((utmp_ent)->ut_exit.e_exit))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_exit))) -1))) + 1); | 0 |
536 | sprintf (exitstr, "%s%d %s%d", | - |
537 | dcgettext (((void *)0), | - |
538 | "term=" | - |
539 | , 5) | - |
540 | , ((utmp_ent)->ut_exit.e_termination), | - |
541 | | - |
542 | dcgettext (((void *)0), | - |
543 | "exit=" | - |
544 | , 5) | - |
545 | , ((utmp_ent)->ut_exit.e_exit)); | - |
546 | | - |
547 | | - |
548 | | - |
549 | print_line (-1, "", ' ', sizeof utmp_ent->ut_line, utmp_ent->ut_line, | - |
550 | time_string (utmp_ent), "", pidstr, comment, exitstr); | - |
551 | free (comment); | - |
552 | } never executed: end of block | 0 |
553 | | - |
554 | static void | - |
555 | print_login (const STRUCT_UTMP *utmp_ent) | - |
556 | { | - |
557 | char *comment = make_id_equals_comment (utmp_ent); | - |
558 | char pidstr[(((((sizeof (utmp_ent->ut_pid) * 8) - (! ((__typeof__ (utmp_ent->ut_pid)) 0 < (__typeof__ (utmp_ent->ut_pid)) -1))) * 146 + 484) / 485) + (! ((__typeof__ (utmp_ent->ut_pid)) 0 < (__typeof__ (utmp_ent->ut_pid)) -1))) + 1]; sprintf (pidstr, "%ld", (long int) (utmp_ent->ut_pid)); | - |
559 | | - |
560 | | - |
561 | | - |
562 | print_line (-1, | - |
563 | dcgettext (((void *)0), | - |
564 | "LOGIN" | - |
565 | , 5) | - |
566 | , ' ', sizeof utmp_ent->ut_line, utmp_ent->ut_line, | - |
567 | time_string (utmp_ent), "", pidstr, comment, ""); | - |
568 | free (comment); | - |
569 | } never executed: end of block | 0 |
570 | | - |
571 | static void | - |
572 | print_initspawn (const STRUCT_UTMP *utmp_ent) | - |
573 | { | - |
574 | char *comment = make_id_equals_comment (utmp_ent); | - |
575 | char pidstr[(((((sizeof (utmp_ent->ut_pid) * 8) - (! ((__typeof__ (utmp_ent->ut_pid)) 0 < (__typeof__ (utmp_ent->ut_pid)) -1))) * 146 + 484) / 485) + (! ((__typeof__ (utmp_ent->ut_pid)) 0 < (__typeof__ (utmp_ent->ut_pid)) -1))) + 1]; sprintf (pidstr, "%ld", (long int) (utmp_ent->ut_pid)); | - |
576 | | - |
577 | print_line (-1, "", ' ', sizeof utmp_ent->ut_line, utmp_ent->ut_line, | - |
578 | time_string (utmp_ent), "", pidstr, comment, ""); | - |
579 | free (comment); | - |
580 | } never executed: end of block | 0 |
581 | | - |
582 | static void | - |
583 | print_clockchange (const STRUCT_UTMP *utmp_ent) | - |
584 | { | - |
585 | | - |
586 | print_line (-1, "", ' ', -1, | - |
587 | dcgettext (((void *)0), | - |
588 | "clock change" | - |
589 | , 5) | - |
590 | , | - |
591 | time_string (utmp_ent), "", "", "", ""); | - |
592 | } never executed: end of block | 0 |
593 | | - |
594 | static void | - |
595 | print_runlevel (const STRUCT_UTMP *utmp_ent) | - |
596 | { | - |
597 | static char *runlevline, *comment; | - |
598 | unsigned char last = ((utmp_ent)->ut_pid) / 256; | - |
599 | unsigned char curr = ((utmp_ent)->ut_pid) % 256; | - |
600 | | - |
601 | if (!runlevlineTRUE | never evaluated | FALSE | never evaluated |
) | 0 |
602 | runlevline = xmalloc (strlen ( never executed: runlevline = xmalloc (strlen ( dcgettext (((void *)0), "run-level" , 5) ) + 3); | 0 |
603 | dcgettext (((void *)0), never executed: runlevline = xmalloc (strlen ( dcgettext (((void *)0), "run-level" , 5) ) + 3); | 0 |
604 | "run-level" never executed: runlevline = xmalloc (strlen ( dcgettext (((void *)0), "run-level" , 5) ) + 3); | 0 |
605 | , 5) never executed: runlevline = xmalloc (strlen ( dcgettext (((void *)0), "run-level" , 5) ) + 3); | 0 |
606 | ) + 3); never executed: runlevline = xmalloc (strlen ( dcgettext (((void *)0), "run-level" , 5) ) + 3); | 0 |
607 | sprintf (runlevline, "%s %c", | - |
608 | dcgettext (((void *)0), | - |
609 | "run-level" | - |
610 | , 5) | - |
611 | , curr); | - |
612 | | - |
613 | if (!commentTRUE | never evaluated | FALSE | never evaluated |
) | 0 |
614 | comment = xmalloc (strlen ( never executed: comment = xmalloc (strlen ( dcgettext (((void *)0), "last=" , 5) ) + 2); | 0 |
615 | dcgettext (((void *)0), never executed: comment = xmalloc (strlen ( dcgettext (((void *)0), "last=" , 5) ) + 2); | 0 |
616 | "last=" never executed: comment = xmalloc (strlen ( dcgettext (((void *)0), "last=" , 5) ) + 2); | 0 |
617 | , 5) never executed: comment = xmalloc (strlen ( dcgettext (((void *)0), "last=" , 5) ) + 2); | 0 |
618 | ) + 2); never executed: comment = xmalloc (strlen ( dcgettext (((void *)0), "last=" , 5) ) + 2); | 0 |
619 | sprintf (comment, "%s%c", | - |
620 | dcgettext (((void *)0), | - |
621 | "last=" | - |
622 | , 5) | - |
623 | , (last == 'N') ? 'S' : last); | - |
624 | | - |
625 | print_line (-1, "", ' ', -1, runlevline, time_string (utmp_ent), | - |
626 | "", "", c_isprint (last) ? comment : "", ""); | - |
627 | | - |
628 | return; never executed: return; | 0 |
629 | } | - |
630 | | - |
631 | | - |
632 | | - |
633 | static void | - |
634 | list_entries_who (size_t n, const STRUCT_UTMP *utmp_buf) | - |
635 | { | - |
636 | unsigned long int entries = 0; | - |
637 | char const *separator = ""; | - |
638 | | - |
639 | while (n--TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
640 | { | - |
641 | if ((((TRUE | never evaluated | FALSE | never evaluated |
utmp_buf)->TRUE | never evaluated | FALSE | never evaluated |
| 0 |
642 | ut_userTRUE | never evaluated | FALSE | never evaluated |
| 0 |
643 | )[0]TRUE | never evaluated | FALSE | never evaluated |
&& (((TRUE | never evaluated | FALSE | never evaluated |
utmp_buf)->ut_type == (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
644 | 7TRUE | never evaluated | FALSE | never evaluated |
| 0 |
645 | ))TRUE | never evaluated | FALSE | never evaluated |
|| (0 && ((dead code: ((utmp_buf)->ut_tv.tv_sec) != 0 utmp_buf)->ut_tv.tv_sec) != 0dead code: ((utmp_buf)->ut_tv.tv_sec) != 0 )))) | - |
646 | { | - |
647 | char *trimmed_name; | - |
648 | | - |
649 | trimmed_name = extract_trimmed_name (utmp_buf); | - |
650 | | - |
651 | printf ("%s%s", separator, trimmed_name); | - |
652 | free (trimmed_name); | - |
653 | separator = " "; | - |
654 | entries++; | - |
655 | } never executed: end of block | 0 |
656 | utmp_buf++; | - |
657 | } never executed: end of block | 0 |
658 | printf ( | - |
659 | dcgettext (((void *)0), | - |
660 | "\n# users=%lu\n" | - |
661 | , 5) | - |
662 | , entries); | - |
663 | } never executed: end of block | 0 |
664 | | - |
665 | static void | - |
666 | print_heading (void) | - |
667 | { | - |
668 | print_line (-1, | - |
669 | dcgettext (((void *)0), | - |
670 | "NAME" | - |
671 | , 5) | - |
672 | , ' ', -1, | - |
673 | dcgettext (((void *)0), | - |
674 | "LINE" | - |
675 | , 5) | - |
676 | , | - |
677 | dcgettext (((void *)0), | - |
678 | "TIME" | - |
679 | , 5) | - |
680 | , | - |
681 | dcgettext (((void *)0), | - |
682 | "IDLE" | - |
683 | , 5) | - |
684 | , | - |
685 | | - |
686 | dcgettext (((void *)0), | - |
687 | "PID" | - |
688 | , 5) | - |
689 | , | - |
690 | dcgettext (((void *)0), | - |
691 | "COMMENT" | - |
692 | , 5) | - |
693 | , | - |
694 | dcgettext (((void *)0), | - |
695 | "EXIT" | - |
696 | , 5) | - |
697 | ); | - |
698 | } never executed: end of block | 0 |
699 | | - |
700 | | - |
701 | static void | - |
702 | scan_entries (size_t n, const STRUCT_UTMP *utmp_buf) | - |
703 | { | - |
704 | char *ttyname_b ; | - |
705 | time_t boottime = ((time_t) ~ ((time_t) (! (! ((time_t) 0 < (time_t) -1)) ? (time_t) -1 : ((((time_t) 1 << ((sizeof (time_t) * 8) - 2)) - 1) * 2 + 1)))); | - |
706 | | - |
707 | if (include_headingTRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
) | 0-1 |
708 | print_heading (); never executed: print_heading (); | 0 |
709 | | - |
710 | if (my_line_onlyTRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
) | 0-1 |
711 | { | - |
712 | ttyname_b = ttyname ( | - |
713 | 0 | - |
714 | ); | - |
715 | if (!ttyname_bTRUE | never evaluated | FALSE | never evaluated |
) | 0 |
716 | return; never executed: return; | 0 |
717 | if ( | - |
718 | (TRUE | never evaluated | FALSE | never evaluated |
__extension__ (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
719 | sizeof ("/dev/") - 1TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
720 | )TRUE | never evaluated | FALSE | never evaluated |
&& ((__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
721 | ttyname_bTRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
722 | )TRUE | never evaluated | FALSE | never evaluated |
&& strlen (TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
723 | ttyname_bTRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
724 | ) < ((size_t) (TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
725 | sizeof ("/dev/") - 1TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
726 | ))TRUE | never evaluated | FALSE | never evaluated |
) || (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
727 | "" "/dev/" ""TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
728 | )TRUE | never evaluated | FALSE | never evaluated |
&& strlen (TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
729 | "" "/dev/" ""TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
730 | ) < ((size_t) (TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
731 | sizeof ("/dev/") - 1TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
732 | ))TRUE | never evaluated | FALSE | never evaluated |
)) ? __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
733 | ttyname_bTRUE | never evaluated | FALSE | never evaluated |
| 0 |
734 | ) && __builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
735 | "" "/dev/" ""TRUE | never evaluated | FALSE | never evaluated |
| 0 |
736 | ) && (__s1_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
737 | ttyname_bTRUE | never evaluated | FALSE | never evaluated |
| 0 |
738 | ), __s2_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
739 | "" "/dev/" ""TRUE | never evaluated | FALSE | never evaluated |
| 0 |
740 | ), (!((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
741 | ttyname_bTRUE | never evaluated | FALSE | never evaluated |
| 0 |
742 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
743 | ttyname_bTRUE | never evaluated | FALSE | never evaluated |
| 0 |
744 | ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
745 | "" "/dev/" ""TRUE | never evaluated | FALSE | never evaluated |
| 0 |
746 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
747 | "" "/dev/" ""TRUE | never evaluated | FALSE | never evaluated |
| 0 |
748 | ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
749 | ttyname_bTRUE | never evaluated | FALSE | never evaluated |
| 0 |
750 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
751 | "" "/dev/" ""TRUE | never evaluated | FALSE | never evaluated |
| 0 |
752 | ) : (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
753 | ttyname_bTRUE | never evaluated | FALSE | never evaluated |
| 0 |
754 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
755 | ttyname_bTRUE | never evaluated | FALSE | never evaluated |
| 0 |
756 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
757 | ttyname_bTRUE | never evaluated | FALSE | never evaluated |
| 0 |
758 | ) == 1) && (__s1_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
759 | ttyname_bTRUE | never evaluated | FALSE | never evaluated |
| 0 |
760 | ), __s1_len < 4) ? (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
761 | "" "/dev/" ""TRUE | never evaluated | FALSE | never evaluated |
| 0 |
762 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
763 | "" "/dev/" ""TRUE | never evaluated | FALSE | never evaluated |
| 0 |
764 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
765 | "" "/dev/" ""TRUE | never evaluated | FALSE | never evaluated |
| 0 |
766 | ) == 1) ? __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
767 | ttyname_bTRUE | never evaluated | FALSE | never evaluated |
| 0 |
768 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
769 | "" "/dev/" ""TRUE | never evaluated | FALSE | never evaluated |
| 0 |
770 | ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
771 | "" "/dev/" ""TRUE | never evaluated | FALSE | never evaluated |
| 0 |
772 | ); int __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
773 | ttyname_bTRUE | never evaluated | FALSE | never evaluated |
| 0 |
774 | ))[0] - __s2[0]); if (__s1_len > 0TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
775 | ttyname_bTRUE | never evaluated | FALSE | never evaluated |
| 0 |
776 | ))[1] - __s2[1]); if (__s1_len > 1TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
777 | ttyname_bTRUE | never evaluated | FALSE | never evaluated |
| 0 |
778 | ))[2] - __s2[2]); if (__s1_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( ttyname_b ))[3] - __s2[3]); | 0 |
779 | ttyname_bTRUE | never evaluated | FALSE | never evaluated |
never executed: __result = (((const unsigned char *) (const char *) ( ttyname_b ))[3] - __s2[3]); | 0 |
780 | ))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
781 | "" "/dev/" ""TRUE | never evaluated | FALSE | never evaluated |
| 0 |
782 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
783 | "" "/dev/" ""TRUE | never evaluated | FALSE | never evaluated |
| 0 |
784 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
785 | "" "/dev/" ""TRUE | never evaluated | FALSE | never evaluated |
| 0 |
786 | ) == 1) && (__s2_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
787 | "" "/dev/" ""TRUE | never evaluated | FALSE | never evaluated |
| 0 |
788 | ), __s2_len < 4) ? (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
789 | ttyname_bTRUE | never evaluated | FALSE | never evaluated |
| 0 |
790 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
791 | ttyname_bTRUE | never evaluated | FALSE | never evaluated |
| 0 |
792 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
793 | ttyname_bTRUE | never evaluated | FALSE | never evaluated |
| 0 |
794 | ) == 1) ? __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
795 | ttyname_bTRUE | never evaluated | FALSE | never evaluated |
| 0 |
796 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
797 | "" "/dev/" ""TRUE | never evaluated | FALSE | never evaluated |
| 0 |
798 | ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
799 | ttyname_bTRUE | never evaluated | FALSE | never evaluated |
| 0 |
800 | ); int __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
801 | "" "/dev/" ""TRUE | never evaluated | FALSE | never evaluated |
| 0 |
802 | ))[0] - __s2[0]); if (__s2_len > 0TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
803 | "" "/dev/" ""TRUE | never evaluated | FALSE | never evaluated |
| 0 |
804 | ))[1] - __s2[1]); if (__s2_len > 1TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
805 | "" "/dev/" ""TRUE | never evaluated | FALSE | never evaluated |
| 0 |
806 | ))[2] - __s2[2]); if (__s2_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( "" "/dev/" "" ))[3] - __s2[3]); | 0 |
807 | "" "/dev/" ""TRUE | never evaluated | FALSE | never evaluated |
never executed: __result = (((const unsigned char *) (const char *) ( "" "/dev/" "" ))[3] - __s2[3]); | 0 |
808 | ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
809 | ttyname_bTRUE | never evaluated | FALSE | never evaluated |
| 0 |
810 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
811 | "" "/dev/" ""TRUE | never evaluated | FALSE | never evaluated |
| 0 |
812 | )))); }) : strncmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
813 | ttyname_bTRUE | never evaluated | FALSE | never evaluated |
| 0 |
814 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
815 | "" "/dev/" ""TRUE | never evaluated | FALSE | never evaluated |
| 0 |
816 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
817 | sizeof ("/dev/") - 1TRUE | never evaluated | FALSE | never evaluated |
| 0 |
818 | ))) TRUE | never evaluated | FALSE | never evaluated |
| 0 |
819 | == 0TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
820 | ttyname_b += (sizeof ("/dev/") - 1); never executed: ttyname_b += (sizeof ("/dev/") - 1); | 0 |
821 | } never executed: end of block | 0 |
822 | | - |
823 | while (n--TRUE | evaluated 4 times by 1 test | FALSE | evaluated 1 time by 1 test |
) | 1-4 |
824 | { | - |
825 | if (!my_line_onlyTRUE | evaluated 4 times by 1 test | FALSE | never evaluated |
| 0-4 |
826 | || (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
827 | (__extension__ (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
828 | sizeof (utmp_buf->ut_line)TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
829 | )TRUE | never evaluated | FALSE | never evaluated |
&& ((__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
830 | ttyname_bTRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
831 | )TRUE | never evaluated | FALSE | never evaluated |
&& strlen (TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
832 | ttyname_bTRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
833 | ) < ((size_t) (TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
834 | sizeof (utmp_buf->ut_line)TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
835 | ))TRUE | never evaluated | FALSE | never evaluated |
) || (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
836 | utmp_buf->ut_lineTRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
837 | )TRUE | never evaluated | FALSE | never evaluated |
&& strlen (TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
838 | utmp_buf->ut_lineTRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
839 | ) < ((size_t) (TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
840 | sizeof (utmp_buf->ut_line)TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
841 | ))TRUE | never evaluated | FALSE | never evaluated |
)) ? __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
842 | ttyname_bTRUE | never evaluated | FALSE | never evaluated |
| 0 |
843 | ) && __builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
844 | utmp_buf->ut_lineTRUE | never evaluated | FALSE | never evaluated |
| 0 |
845 | ) && (__s1_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
846 | ttyname_bTRUE | never evaluated | FALSE | never evaluated |
| 0 |
847 | ), __s2_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
848 | utmp_buf->ut_lineTRUE | never evaluated | FALSE | never evaluated |
| 0 |
849 | ), (!((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
850 | ttyname_bTRUE | never evaluated | FALSE | never evaluated |
| 0 |
851 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
852 | ttyname_bTRUE | never evaluated | FALSE | never evaluated |
| 0 |
853 | ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
854 | utmp_buf->ut_lineTRUE | never evaluated | FALSE | never evaluated |
| 0 |
855 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
856 | utmp_buf->ut_lineTRUE | never evaluated | FALSE | never evaluated |
| 0 |
857 | ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
858 | ttyname_bTRUE | never evaluated | FALSE | never evaluated |
| 0 |
859 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
860 | utmp_buf->ut_lineTRUE | never evaluated | FALSE | never evaluated |
| 0 |
861 | ) : (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
862 | ttyname_bTRUE | never evaluated | FALSE | never evaluated |
| 0 |
863 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
864 | ttyname_bTRUE | never evaluated | FALSE | never evaluated |
| 0 |
865 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
866 | ttyname_bTRUE | never evaluated | FALSE | never evaluated |
| 0 |
867 | ) == 1) && (__s1_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
868 | ttyname_bTRUE | never evaluated | FALSE | never evaluated |
| 0 |
869 | ), __s1_len < 4) ? (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
870 | utmp_buf->ut_lineTRUE | never evaluated | FALSE | never evaluated |
| 0 |
871 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
872 | utmp_buf->ut_lineTRUE | never evaluated | FALSE | never evaluated |
| 0 |
873 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
874 | utmp_buf->ut_lineTRUE | never evaluated | FALSE | never evaluated |
| 0 |
875 | ) == 1) ? __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
876 | ttyname_bTRUE | never evaluated | FALSE | never evaluated |
| 0 |
877 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
878 | utmp_buf->ut_lineTRUE | never evaluated | FALSE | never evaluated |
| 0 |
879 | ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
880 | utmp_buf->ut_lineTRUE | never evaluated | FALSE | never evaluated |
| 0 |
881 | ); int __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
882 | ttyname_bTRUE | never evaluated | FALSE | never evaluated |
| 0 |
883 | ))[0] - __s2[0]); if (__s1_len > 0TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
884 | ttyname_bTRUE | never evaluated | FALSE | never evaluated |
| 0 |
885 | ))[1] - __s2[1]); if (__s1_len > 1TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
886 | ttyname_bTRUE | never evaluated | FALSE | never evaluated |
| 0 |
887 | ))[2] - __s2[2]); if (__s1_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( ttyname_b ))[3] - __s2[3]); | 0 |
888 | ttyname_bTRUE | never evaluated | FALSE | never evaluated |
never executed: __result = (((const unsigned char *) (const char *) ( ttyname_b ))[3] - __s2[3]); | 0 |
889 | ))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
890 | utmp_buf->ut_lineTRUE | never evaluated | FALSE | never evaluated |
| 0 |
891 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
892 | utmp_buf->ut_lineTRUE | never evaluated | FALSE | never evaluated |
| 0 |
893 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
894 | utmp_buf->ut_lineTRUE | never evaluated | FALSE | never evaluated |
| 0 |
895 | ) == 1) && (__s2_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
896 | utmp_buf->ut_lineTRUE | never evaluated | FALSE | never evaluated |
| 0 |
897 | ), __s2_len < 4) ? (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
898 | ttyname_bTRUE | never evaluated | FALSE | never evaluated |
| 0 |
899 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
900 | ttyname_bTRUE | never evaluated | FALSE | never evaluated |
| 0 |
901 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
902 | ttyname_bTRUE | never evaluated | FALSE | never evaluated |
| 0 |
903 | ) == 1) ? __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
904 | ttyname_bTRUE | never evaluated | FALSE | never evaluated |
| 0 |
905 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
906 | utmp_buf->ut_lineTRUE | never evaluated | FALSE | never evaluated |
| 0 |
907 | ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
908 | ttyname_bTRUE | never evaluated | FALSE | never evaluated |
| 0 |
909 | ); int __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
910 | utmp_buf->ut_lineTRUE | never evaluated | FALSE | never evaluated |
| 0 |
911 | ))[0] - __s2[0]); if (__s2_len > 0TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
912 | utmp_buf->ut_lineTRUE | never evaluated | FALSE | never evaluated |
| 0 |
913 | ))[1] - __s2[1]); if (__s2_len > 1TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
914 | utmp_buf->ut_lineTRUE | never evaluated | FALSE | never evaluated |
| 0 |
915 | ))[2] - __s2[2]); if (__s2_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( utmp_buf->ut_line ))[3] - __s2[3]); | 0 |
916 | utmp_buf->ut_lineTRUE | never evaluated | FALSE | never evaluated |
never executed: __result = (((const unsigned char *) (const char *) ( utmp_buf->ut_line ))[3] - __s2[3]); | 0 |
917 | ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
918 | ttyname_bTRUE | never evaluated | FALSE | never evaluated |
| 0 |
919 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
920 | utmp_buf->ut_lineTRUE | never evaluated | FALSE | never evaluated |
| 0 |
921 | )))); }) : strncmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
922 | ttyname_bTRUE | never evaluated | FALSE | never evaluated |
| 0 |
923 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
924 | utmp_buf->ut_lineTRUE | never evaluated | FALSE | never evaluated |
| 0 |
925 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
926 | sizeof (utmp_buf->ut_line)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
927 | ))) TRUE | never evaluated | FALSE | never evaluated |
| 0 |
928 | == 0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
929 | ) | - |
930 | { | - |
931 | if (need_usersTRUE | evaluated 4 times by 1 test | FALSE | never evaluated |
&& (((TRUE | evaluated 4 times by 1 test | FALSE | never evaluated |
utmp_buf)->TRUE | evaluated 4 times by 1 test | FALSE | never evaluated |
| 0-4 |
932 | ut_userTRUE | evaluated 4 times by 1 test | FALSE | never evaluated |
| 0-4 |
933 | )[0]TRUE | evaluated 4 times by 1 test | FALSE | never evaluated |
&& (((TRUE | evaluated 1 time by 1 test | FALSE | evaluated 3 times by 1 test |
utmp_buf)->ut_type == (TRUE | evaluated 1 time by 1 test | FALSE | evaluated 3 times by 1 test |
| 0-4 |
934 | 7TRUE | evaluated 1 time by 1 test | FALSE | evaluated 3 times by 1 test |
| 1-3 |
935 | ))TRUE | evaluated 1 time by 1 test | FALSE | evaluated 3 times by 1 test |
|| (0 && ((dead code: ((utmp_buf)->ut_tv.tv_sec) != 0 utmp_buf)->ut_tv.tv_sec) != 0dead code: ((utmp_buf)->ut_tv.tv_sec) != 0 )))) | - |
936 | print_user (utmp_buf, boottime);executed 1 time by 1 test: print_user (utmp_buf, boottime); | 1 |
937 | else if (need_runlevelTRUE | never evaluated | FALSE | evaluated 3 times by 1 test |
&& ((TRUE | never evaluated | FALSE | never evaluated |
utmp_buf)->ut_type == (TRUE | never evaluated | FALSE | never evaluated |
| 0-3 |
938 | 1TRUE | never evaluated | FALSE | never evaluated |
| 0 |
939 | ))TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
940 | print_runlevel (utmp_buf); never executed: print_runlevel (utmp_buf); | 0 |
941 | else if (need_boottimeTRUE | never evaluated | FALSE | evaluated 3 times by 1 test |
&& ((TRUE | never evaluated | FALSE | never evaluated |
utmp_buf)->ut_type == (TRUE | never evaluated | FALSE | never evaluated |
| 0-3 |
942 | 2TRUE | never evaluated | FALSE | never evaluated |
| 0 |
943 | ))TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
944 | print_boottime (utmp_buf); never executed: print_boottime (utmp_buf); | 0 |
945 | | - |
946 | | - |
947 | | - |
948 | else if (need_clockchangeTRUE | never evaluated | FALSE | evaluated 3 times by 1 test |
&& ((TRUE | never evaluated | FALSE | never evaluated |
utmp_buf)->ut_type == (TRUE | never evaluated | FALSE | never evaluated |
| 0-3 |
949 | 3TRUE | never evaluated | FALSE | never evaluated |
| 0 |
950 | ))TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
951 | print_clockchange (utmp_buf); never executed: print_clockchange (utmp_buf); | 0 |
952 | else if (need_initspawnTRUE | never evaluated | FALSE | evaluated 3 times by 1 test |
&& ((TRUE | never evaluated | FALSE | never evaluated |
utmp_buf)->ut_type == (TRUE | never evaluated | FALSE | never evaluated |
| 0-3 |
953 | 5TRUE | never evaluated | FALSE | never evaluated |
| 0 |
954 | ))TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
955 | print_initspawn (utmp_buf); never executed: print_initspawn (utmp_buf); | 0 |
956 | else if (need_loginTRUE | never evaluated | FALSE | evaluated 3 times by 1 test |
&& ((TRUE | never evaluated | FALSE | never evaluated |
utmp_buf)->ut_type == (TRUE | never evaluated | FALSE | never evaluated |
| 0-3 |
957 | 6TRUE | never evaluated | FALSE | never evaluated |
| 0 |
958 | ))TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
959 | print_login (utmp_buf); never executed: print_login (utmp_buf); | 0 |
960 | else if (need_deadprocsTRUE | never evaluated | FALSE | evaluated 3 times by 1 test |
&& ((TRUE | never evaluated | FALSE | never evaluated |
utmp_buf)->ut_type == (TRUE | never evaluated | FALSE | never evaluated |
| 0-3 |
961 | 8TRUE | never evaluated | FALSE | never evaluated |
| 0 |
962 | ))TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
963 | print_deadprocs (utmp_buf); never executed: print_deadprocs (utmp_buf); | 0 |
964 | }executed 4 times by 1 test: end of block | 4 |
965 | | - |
966 | if (((TRUE | evaluated 1 time by 1 test | FALSE | evaluated 3 times by 1 test |
utmp_buf)->ut_type == (TRUE | evaluated 1 time by 1 test | FALSE | evaluated 3 times by 1 test |
| 1-3 |
967 | 2TRUE | evaluated 1 time by 1 test | FALSE | evaluated 3 times by 1 test |
| 1-3 |
968 | ))TRUE | evaluated 1 time by 1 test | FALSE | evaluated 3 times by 1 test |
) | 1-3 |
969 | boottime = ((utmp_buf)->ut_tv.tv_sec);executed 1 time by 1 test: boottime = ((utmp_buf)->ut_tv.tv_sec); | 1 |
970 | | - |
971 | utmp_buf++; | - |
972 | }executed 4 times by 1 test: end of block | 4 |
973 | }executed 1 time by 1 test: end of block | 1 |
974 | | - |
975 | | - |
976 | | - |
977 | static void | - |
978 | who (const char *filename, int options) | - |
979 | { | - |
980 | size_t n_users; | - |
981 | STRUCT_UTMP *utmp_buf; | - |
982 | | - |
983 | if (read_utmp (filename, &n_users, &utmp_buf, options) != 0TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
) | 0-1 |
984 | (( never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ...(0, shell_escape_quoting_style, filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); !!sizeof (struct { _Static_assert (never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ...(0, shell_escape_quoting_style, filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 |
985 | 1 never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ...(0, shell_escape_quoting_style, filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 |
986 | , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ...(0, shell_escape_quoting_style, filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 |
987 | 1 never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ...(0, shell_escape_quoting_style, filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 |
988 | , never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ...(0, shell_escape_quoting_style, filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 |
989 | (*__errno_location ()) never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ...(0, shell_escape_quoting_style, filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 |
990 | , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), (( never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ...(0, shell_escape_quoting_style, filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 |
991 | 0 never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ...(0, shell_escape_quoting_style, filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 |
992 | ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ...(0, shell_escape_quoting_style, filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 |
993 | 1 never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ...(0, shell_escape_quoting_style, filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 |
994 | , never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ...(0, shell_escape_quoting_style, filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 |
995 | (*__errno_location ()) never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ...(0, shell_escape_quoting_style, filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 |
996 | , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), (( never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ...(0, shell_escape_quoting_style, filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 |
997 | 0 never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ...(0, shell_escape_quoting_style, filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 |
998 | ) ? (void) 0 : __builtin_unreachable ())))); never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ...(0, shell_escape_quoting_style, filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 |
999 | | - |
1000 | if (short_listTRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
) | 0-1 |
1001 | list_entries_who (n_users, utmp_buf); never executed: list_entries_who (n_users, utmp_buf); | 0 |
1002 | else | - |
1003 | scan_entries (n_users, utmp_buf);executed 1 time by 1 test: scan_entries (n_users, utmp_buf); | 1 |
1004 | | - |
1005 | free (utmp_buf); | - |
1006 | }executed 1 time by 1 test: end of block | 1 |
1007 | | - |
1008 | void | - |
1009 | usage (int status) | - |
1010 | { | - |
1011 | if (status != TRUE | evaluated 3 times by 1 test | FALSE | evaluated 32 times by 1 test |
| 3-32 |
1012 | 0TRUE | evaluated 3 times by 1 test | FALSE | evaluated 32 times by 1 test |
| 3-32 |
1013 | ) | - |
1014 | do { fprintf ( | - |
1015 | stderr | - |
1016 | , | - |
1017 | dcgettext (((void *)0), | - |
1018 | "Try '%s --help' for more information.\n" | - |
1019 | , 5) | - |
1020 | , program_name); }executed 3 times by 1 test: end of block while (0); | 3 |
1021 | else | - |
1022 | { | - |
1023 | printf ( | - |
1024 | dcgettext (((void *)0), | - |
1025 | "Usage: %s [OPTION]... [ FILE | ARG1 ARG2 ]\n" | - |
1026 | , 5) | - |
1027 | , program_name); | - |
1028 | fputs_unlocked ( | - |
1029 | dcgettext (((void *)0), | - |
1030 | "Print information about users who are currently logged in.\n" | - |
1031 | , 5) | - |
1032 | , | - |
1033 | stdout | - |
1034 | ) | - |
1035 | | - |
1036 | ; | - |
1037 | fputs_unlocked ( | - |
1038 | dcgettext (((void *)0), | - |
1039 | "\n -a, --all same as -b -d --login -p -r -t -T -u\n -b, --boot time of last system boot\n -d, --dead print dead processes\n -H, --heading print line of column headings\n" | - |
1040 | , 5) | - |
1041 | , | - |
1042 | stdout | - |
1043 | ) | - |
1044 | | - |
1045 | | - |
1046 | | - |
1047 | | - |
1048 | | - |
1049 | ; | - |
1050 | fputs_unlocked ( | - |
1051 | dcgettext (((void *)0), | - |
1052 | " -l, --login print system login processes\n" | - |
1053 | , 5) | - |
1054 | , | - |
1055 | stdout | - |
1056 | ) | - |
1057 | | - |
1058 | ; | - |
1059 | fputs_unlocked ( | - |
1060 | dcgettext (((void *)0), | - |
1061 | " --lookup attempt to canonicalize hostnames via DNS\n -m only hostname and user associated with stdin\n -p, --process print active processes spawned by init\n" | - |
1062 | , 5) | - |
1063 | , | - |
1064 | stdout | - |
1065 | ) | - |
1066 | | - |
1067 | | - |
1068 | | - |
1069 | ; | - |
1070 | fputs_unlocked ( | - |
1071 | dcgettext (((void *)0), | - |
1072 | " -q, --count all login names and number of users logged on\n -r, --runlevel print current runlevel\n -s, --short print only name, line, and time (default)\n -t, --time print last system clock change\n" | - |
1073 | , 5) | - |
1074 | , | - |
1075 | stdout | - |
1076 | ) | - |
1077 | | - |
1078 | | - |
1079 | | - |
1080 | | - |
1081 | ; | - |
1082 | fputs_unlocked ( | - |
1083 | dcgettext (((void *)0), | - |
1084 | " -T, -w, --mesg add user's message status as +, - or ?\n -u, --users list users logged in\n --message same as -T\n --writable same as -T\n" | - |
1085 | , 5) | - |
1086 | , | - |
1087 | stdout | - |
1088 | ) | - |
1089 | | - |
1090 | | - |
1091 | | - |
1092 | | - |
1093 | ; | - |
1094 | fputs_unlocked ( | - |
1095 | dcgettext (((void *)0), | - |
1096 | " --help display this help and exit\n" | - |
1097 | , 5) | - |
1098 | , | - |
1099 | stdout | - |
1100 | ); | - |
1101 | fputs_unlocked ( | - |
1102 | dcgettext (((void *)0), | - |
1103 | " --version output version information and exit\n" | - |
1104 | , 5) | - |
1105 | , | - |
1106 | stdout | - |
1107 | ); | - |
1108 | printf ( | - |
1109 | dcgettext (((void *)0), | - |
1110 | "\nIf FILE is not specified, use %s. %s as FILE is common.\nIf ARG1 ARG2 given, -m presumed: 'am i' or 'mom likes' are usual.\n" | - |
1111 | , 5) | - |
1112 | | - |
1113 | | - |
1114 | | - |
1115 | | - |
1116 | , | - |
1117 | "/var/run/utmp" | - |
1118 | , | - |
1119 | "/var/log/wtmp" | - |
1120 | ); | - |
1121 | emit_ancillary_info ("who"); | - |
1122 | }executed 32 times by 1 test: end of block | 32 |
1123 | exit (status);executed 35 times by 1 test: exit (status); | 35 |
1124 | } | - |
1125 | | - |
1126 | int | - |
1127 | main (int argc, char **argv) | - |
1128 | { | - |
1129 | int optc; | - |
1130 | | - |
1131 | _Bool | - |
1132 | assumptions = | - |
1133 | 1 | - |
1134 | ; | - |
1135 | | - |
1136 | ; | - |
1137 | set_program_name (argv[0]); | - |
1138 | setlocale ( | - |
1139 | 6 | - |
1140 | , ""); | - |
1141 | bindtextdomain ("coreutils", "/usr/local/share/locale"); | - |
1142 | textdomain ("coreutils"); | - |
1143 | | - |
1144 | atexit (close_stdout); | - |
1145 | | - |
1146 | while ((TRUE | evaluated 67 times by 1 test | FALSE | evaluated 1 time by 1 test |
optc = getopt_long (argc, argv, "abdlmpqrstuwHT", longopts, TRUE | evaluated 67 times by 1 test | FALSE | evaluated 1 time by 1 test |
| 1-67 |
1147 | ((void *)0)TRUE | evaluated 67 times by 1 test | FALSE | evaluated 1 time by 1 test |
| 1-67 |
1148 | ))TRUE | evaluated 67 times by 1 test | FALSE | evaluated 1 time by 1 test |
| 1-67 |
1149 | != -1TRUE | evaluated 67 times by 1 test | FALSE | evaluated 1 time by 1 test |
) | 1-67 |
1150 | { | - |
1151 | switch (optc) | - |
1152 | { | - |
1153 | caseexecuted 2 times by 1 test: case 'a': 'a':executed 2 times by 1 test: case 'a': | 2 |
1154 | need_boottime = | - |
1155 | 1 | - |
1156 | ; | - |
1157 | need_deadprocs = | - |
1158 | 1 | - |
1159 | ; | - |
1160 | need_login = | - |
1161 | 1 | - |
1162 | ; | - |
1163 | need_initspawn = | - |
1164 | 1 | - |
1165 | ; | - |
1166 | need_runlevel = | - |
1167 | 1 | - |
1168 | ; | - |
1169 | need_clockchange = | - |
1170 | 1 | - |
1171 | ; | - |
1172 | need_users = | - |
1173 | 1 | - |
1174 | ; | - |
1175 | include_mesg = | - |
1176 | 1 | - |
1177 | ; | - |
1178 | include_idle = | - |
1179 | 1 | - |
1180 | ; | - |
1181 | include_exit = | - |
1182 | 1 | - |
1183 | ; | - |
1184 | assumptions = | - |
1185 | 0 | - |
1186 | ; | - |
1187 | break;executed 2 times by 1 test: break; | 2 |
1188 | | - |
1189 | caseexecuted 2 times by 1 test: case 'b': 'b':executed 2 times by 1 test: case 'b': | 2 |
1190 | need_boottime = | - |
1191 | 1 | - |
1192 | ; | - |
1193 | assumptions = | - |
1194 | 0 | - |
1195 | ; | - |
1196 | break;executed 2 times by 1 test: break; | 2 |
1197 | | - |
1198 | caseexecuted 2 times by 1 test: case 'd': 'd':executed 2 times by 1 test: case 'd': | 2 |
1199 | need_deadprocs = | - |
1200 | 1 | - |
1201 | ; | - |
1202 | include_idle = | - |
1203 | 1 | - |
1204 | ; | - |
1205 | include_exit = | - |
1206 | 1 | - |
1207 | ; | - |
1208 | assumptions = | - |
1209 | 0 | - |
1210 | ; | - |
1211 | break;executed 2 times by 1 test: break; | 2 |
1212 | | - |
1213 | caseexecuted 2 times by 1 test: case 'H': 'H':executed 2 times by 1 test: case 'H': | 2 |
1214 | include_heading = | - |
1215 | 1 | - |
1216 | ; | - |
1217 | break;executed 2 times by 1 test: break; | 2 |
1218 | | - |
1219 | caseexecuted 2 times by 1 test: case 'l': 'l':executed 2 times by 1 test: case 'l': | 2 |
1220 | need_login = | - |
1221 | 1 | - |
1222 | ; | - |
1223 | include_idle = | - |
1224 | 1 | - |
1225 | ; | - |
1226 | assumptions = | - |
1227 | 0 | - |
1228 | ; | - |
1229 | break;executed 2 times by 1 test: break; | 2 |
1230 | | - |
1231 | caseexecuted 1 time by 1 test: case 'm': 'm':executed 1 time by 1 test: case 'm': | 1 |
1232 | my_line_only = | - |
1233 | 1 | - |
1234 | ; | - |
1235 | break;executed 1 time by 1 test: break; | 1 |
1236 | | - |
1237 | caseexecuted 2 times by 1 test: case 'p': 'p':executed 2 times by 1 test: case 'p': | 2 |
1238 | need_initspawn = | - |
1239 | 1 | - |
1240 | ; | - |
1241 | assumptions = | - |
1242 | 0 | - |
1243 | ; | - |
1244 | break;executed 2 times by 1 test: break; | 2 |
1245 | | - |
1246 | caseexecuted 2 times by 1 test: case 'q': 'q':executed 2 times by 1 test: case 'q': | 2 |
1247 | short_list = | - |
1248 | 1 | - |
1249 | ; | - |
1250 | break;executed 2 times by 1 test: break; | 2 |
1251 | | - |
1252 | caseexecuted 2 times by 1 test: case 'r': 'r':executed 2 times by 1 test: case 'r': | 2 |
1253 | need_runlevel = | - |
1254 | 1 | - |
1255 | ; | - |
1256 | include_idle = | - |
1257 | 1 | - |
1258 | ; | - |
1259 | assumptions = | - |
1260 | 0 | - |
1261 | ; | - |
1262 | break;executed 2 times by 1 test: break; | 2 |
1263 | | - |
1264 | caseexecuted 2 times by 1 test: case 's': 's':executed 2 times by 1 test: case 's': | 2 |
1265 | short_output = | - |
1266 | 1 | - |
1267 | ; | - |
1268 | break;executed 2 times by 1 test: break; | 2 |
1269 | | - |
1270 | caseexecuted 2 times by 1 test: case 't': 't':executed 2 times by 1 test: case 't': | 2 |
1271 | need_clockchange = | - |
1272 | 1 | - |
1273 | ; | - |
1274 | assumptions = | - |
1275 | 0 | - |
1276 | ; | - |
1277 | break;executed 2 times by 1 test: break; | 2 |
1278 | | - |
1279 | caseexecuted 4 times by 1 test: case 'T': 'T':executed 4 times by 1 test: case 'T': | 4 |
1280 | caseexecuted 1 time by 1 test: case 'w': 'w':executed 1 time by 1 test: case 'w': | 1 |
1281 | include_mesg = | - |
1282 | 1 | - |
1283 | ; | - |
1284 | break;executed 5 times by 1 test: break; | 5 |
1285 | | - |
1286 | caseexecuted 2 times by 1 test: case 'u': 'u':executed 2 times by 1 test: case 'u': | 2 |
1287 | need_users = | - |
1288 | 1 | - |
1289 | ; | - |
1290 | include_idle = | - |
1291 | 1 | - |
1292 | ; | - |
1293 | assumptions = | - |
1294 | 0 | - |
1295 | ; | - |
1296 | break;executed 2 times by 1 test: break; | 2 |
1297 | | - |
1298 | caseexecuted 1 time by 1 test: case LOOKUP_OPTION: LOOKUP_OPTION:executed 1 time by 1 test: case LOOKUP_OPTION: | 1 |
1299 | do_lookup = | - |
1300 | 1 | - |
1301 | ; | - |
1302 | break;executed 1 time by 1 test: break; | 1 |
1303 | | - |
1304 | caseexecuted 32 times by 1 test: case GETOPT_HELP_CHAR: GETOPT_HELP_CHAR:executed 32 times by 1 test: case GETOPT_HELP_CHAR: usage ( | 32 |
1305 | 0 | - |
1306 | ); break; never executed: break; ; | 0 |
1307 | | - |
1308 | caseexecuted 3 times by 1 test: case GETOPT_VERSION_CHAR: GETOPT_VERSION_CHAR:executed 3 times by 1 test: case GETOPT_VERSION_CHAR: version_etc ( | 3 |
1309 | stdout | - |
1310 | , "who", "GNU coreutils", Version, ("Joseph Arceneaux"), ("David MacKenzie"), ("Michael Stone"), (char *) | - |
1311 | ((void *)0) | - |
1312 | ); exit (executed 3 times by 1 test: exit ( 0 ); | 3 |
1313 | 0executed 3 times by 1 test: exit ( 0 ); | 3 |
1314 | );executed 3 times by 1 test: exit ( 0 ); break;never executed: break; ; | 0-3 |
1315 | | - |
1316 | defaultexecuted 3 times by 1 test: default: :executed 3 times by 1 test: default: | 3 |
1317 | usage ( | - |
1318 | 1 | - |
1319 | ); | - |
1320 | } never executed: end of block | 0 |
1321 | } | - |
1322 | | - |
1323 | if (assumptionsTRUE | evaluated 1 time by 1 test | FALSE | never evaluated |
) | 0-1 |
1324 | { | - |
1325 | need_users = | - |
1326 | 1 | - |
1327 | ; | - |
1328 | short_output = | - |
1329 | 1 | - |
1330 | ; | - |
1331 | }executed 1 time by 1 test: end of block | 1 |
1332 | | - |
1333 | if (include_exitTRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
) | 0-1 |
1334 | { | - |
1335 | short_output = | - |
1336 | 0 | - |
1337 | ; | - |
1338 | } never executed: end of block | 0 |
1339 | | - |
1340 | if (hard_locale (TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
| 0-1 |
1341 | 2TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
| 0-1 |
1342 | )TRUE | never evaluated | FALSE | evaluated 1 time by 1 test |
) | 0-1 |
1343 | { | - |
1344 | time_format = "%Y-%m-%d %H:%M"; | - |
1345 | time_format_width = 4 + 1 + 2 + 1 + 2 + 1 + 2 + 1 + 2; | - |
1346 | } never executed: end of block | 0 |
1347 | else | - |
1348 | { | - |
1349 | time_format = "%b %e %H:%M"; | - |
1350 | time_format_width = 3 + 1 + 2 + 1 + 2 + 1 + 2; | - |
1351 | }executed 1 time by 1 test: end of block | 1 |
1352 | | - |
1353 | switch (argc - optind) | - |
1354 | { | - |
1355 | case never executed: case 2: 2:never executed: case 2: | 0 |
1356 | my_line_only = | - |
1357 | 1 | - |
1358 | ; | - |
1359 | ((void) 0); | - |
1360 | case never executed: case -1: -1:never executed: case -1: code before this statement never executed: case -1: | 0 |
1361 | caseexecuted 1 time by 1 test: case 0: 0:executed 1 time by 1 test: case 0: | 1 |
1362 | who ( | - |
1363 | "/var/run/utmp" | - |
1364 | , READ_UTMP_CHECK_PIDS); | - |
1365 | break;executed 1 time by 1 test: break; | 1 |
1366 | | - |
1367 | case never executed: case 1: 1:never executed: case 1: | 0 |
1368 | who (argv[optind], 0); | - |
1369 | break; never executed: break; | 0 |
1370 | | - |
1371 | default never executed: default: :never executed: default: | 0 |
1372 | error (0, 0, | - |
1373 | dcgettext (((void *)0), | - |
1374 | "extra operand %s" | - |
1375 | , 5) | - |
1376 | , quote (argv[optind + 2])); | - |
1377 | usage ( | - |
1378 | 1 | - |
1379 | ); | - |
1380 | } never executed: end of block | 0 |
1381 | | - |
1382 | returnexecuted 1 time by 1 test: return 0 ; executed 1 time by 1 test: return 0 ; | 1 |
1383 | 0executed 1 time by 1 test: return 0 ; | 1 |
1384 | ;executed 1 time by 1 test: return 0 ; | 1 |
1385 | } | - |
| | |