Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/coreutils/src/src/uptime.c |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | - | |||||||||||||||||||
2 | - | |||||||||||||||||||
3 | - | |||||||||||||||||||
4 | - | |||||||||||||||||||
5 | - | |||||||||||||||||||
6 | - | |||||||||||||||||||
7 | - | |||||||||||||||||||
8 | - | |||||||||||||||||||
9 | - | |||||||||||||||||||
10 | - | |||||||||||||||||||
11 | static struct option const long_options[] = | - | ||||||||||||||||||
12 | { | - | ||||||||||||||||||
13 | { | - | ||||||||||||||||||
14 | ((void *)0) | - | ||||||||||||||||||
15 | , 0, | - | ||||||||||||||||||
16 | ((void *)0) | - | ||||||||||||||||||
17 | , 0} | - | ||||||||||||||||||
18 | }; | - | ||||||||||||||||||
19 | - | |||||||||||||||||||
20 | static void | - | ||||||||||||||||||
21 | print_uptime (size_t n, const STRUCT_UTMP *this) | - | ||||||||||||||||||
22 | { | - | ||||||||||||||||||
23 | size_t entries = 0; | - | ||||||||||||||||||
24 | time_t boot_time = 0; | - | ||||||||||||||||||
25 | time_t time_now; | - | ||||||||||||||||||
26 | time_t uptime = 0; | - | ||||||||||||||||||
27 | long int updays; | - | ||||||||||||||||||
28 | int uphours; | - | ||||||||||||||||||
29 | int upmins; | - | ||||||||||||||||||
30 | struct tm *tmn; | - | ||||||||||||||||||
31 | double avg[3]; | - | ||||||||||||||||||
32 | int loads; | - | ||||||||||||||||||
33 | - | |||||||||||||||||||
34 | FILE *fp; | - | ||||||||||||||||||
35 | - | |||||||||||||||||||
36 | fp = fopen ("/proc/uptime", "r"); | - | ||||||||||||||||||
37 | if (fp !=
| 0 | ||||||||||||||||||
38 | ((void *)0)
| 0 | ||||||||||||||||||
39 | ) | - | ||||||||||||||||||
40 | { | - | ||||||||||||||||||
41 | char buf[ | - | ||||||||||||||||||
42 | 8192 | - | ||||||||||||||||||
43 | ]; | - | ||||||||||||||||||
44 | char *b = fgets_unlocked (buf, | - | ||||||||||||||||||
45 | 8192 | - | ||||||||||||||||||
46 | ,fp); | - | ||||||||||||||||||
47 | if (b == buf
| 0 | ||||||||||||||||||
48 | { | - | ||||||||||||||||||
49 | char *end_ptr; | - | ||||||||||||||||||
50 | double upsecs = c_strtod (buf, &end_ptr); | - | ||||||||||||||||||
51 | if (buf != end_ptr
| 0 | ||||||||||||||||||
52 | uptime = (0 <= upsecs
never executed: uptime = (0 <= upsecs && upsecs < ((time_t) (! (! ((time_t) 0 < (time_t) -1)) ? (time_t) -1 : ((((time_t) 1 << ((sizeof (time_t) * 8) - 2)) - 1) * 2 + 1))) ? upsecs : -1); | 0 | ||||||||||||||||||
53 | ? upsecs : -1); never executed: uptime = (0 <= upsecs && upsecs < ((time_t) (! (! ((time_t) 0 < (time_t) -1)) ? (time_t) -1 : ((((time_t) 1 << ((sizeof (time_t) * 8) - 2)) - 1) * 2 + 1))) ? upsecs : -1); | 0 | ||||||||||||||||||
54 | } never executed: end of block | 0 | ||||||||||||||||||
55 | - | |||||||||||||||||||
56 | - | |||||||||||||||||||
57 | rpl_fclose | - | ||||||||||||||||||
58 | (fp); | - | ||||||||||||||||||
59 | } never executed: end of block | 0 | ||||||||||||||||||
60 | while (n--
| 0 | ||||||||||||||||||
61 | { | - | ||||||||||||||||||
62 | entries += (((
| 0 | ||||||||||||||||||
63 | ut_user
| 0 | ||||||||||||||||||
64 | )[0]
| 0 | ||||||||||||||||||
65 | 7
| 0 | ||||||||||||||||||
66 | ))
dead code: this)->ut_tv.tv_sec) != 0((this)->ut_tv.tv_sec) != 0 dead code: )));((this)->ut_tv.tv_sec) != 0 | - | ||||||||||||||||||
67 | if (((
| 0 | ||||||||||||||||||
68 | 2
| 0 | ||||||||||||||||||
69 | ))
| 0 | ||||||||||||||||||
70 | boot_time = ((this)->ut_tv.tv_sec); never executed: boot_time = ((this)->ut_tv.tv_sec); | 0 | ||||||||||||||||||
71 | ++this; | - | ||||||||||||||||||
72 | } never executed: end of block | 0 | ||||||||||||||||||
73 | - | |||||||||||||||||||
74 | - | |||||||||||||||||||
75 | - | |||||||||||||||||||
76 | - | |||||||||||||||||||
77 | - | |||||||||||||||||||
78 | time_now = time ( | - | ||||||||||||||||||
79 | ((void *)0) | - | ||||||||||||||||||
80 | ); | - | ||||||||||||||||||
81 | - | |||||||||||||||||||
82 | if (uptime == 0
| 0 | ||||||||||||||||||
83 | - | |||||||||||||||||||
84 | { | - | ||||||||||||||||||
85 | if (boot_time == 0
| 0 | ||||||||||||||||||
86 | (( never executed: !!sizeof (struct { _Static_assert (((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"couldn't get boot time\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "couldn't get boot time" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "couldn't get boot time" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"couldn't get boot time\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "couldn't get boot time" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "couldn't get boot time" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
87 | 1 never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"couldn't get boot time\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "couldn't get boot time" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "couldn't get boot time" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
88 | , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"couldn't get boot time\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"couldn't get boot time\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "couldn't get boot time" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "couldn't get boot time" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
89 | 1 never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"couldn't get boot time\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "couldn't get boot time" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "couldn't get boot time" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
90 | , never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"couldn't get boot time\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "couldn't get boot time" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "couldn't get boot time" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
91 | (*__errno_location ()) never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"couldn't get boot time\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "couldn't get boot time" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "couldn't get boot time" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
92 | , never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"couldn't get boot time\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "couldn't get boot time" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "couldn't get boot time" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
93 | dcgettext (((void *)0), never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"couldn't get boot time\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "couldn't get boot time" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "couldn't get boot time" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
94 | "couldn't get boot time" never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"couldn't get boot time\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "couldn't get boot time" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "couldn't get boot time" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
95 | , 5) never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"couldn't get boot time\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "couldn't get boot time" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "couldn't get boot time" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
96 | ), (( never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"couldn't get boot time\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "couldn't get boot time" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "couldn't get boot time" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
97 | 0 never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"couldn't get boot time\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "couldn't get boot time" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "couldn't get boot time" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
98 | ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"couldn't get boot time\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "couldn't get boot time" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "couldn't get boot time" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
99 | 1 never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"couldn't get boot time\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "couldn't get boot time" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "couldn't get boot time" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
100 | , never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"couldn't get boot time\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "couldn't get boot time" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "couldn't get boot time" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
101 | (*__errno_location ()) never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"couldn't get boot time\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "couldn't get boot time" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "couldn't get boot time" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
102 | , never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"couldn't get boot time\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "couldn't get boot time" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "couldn't get boot time" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
103 | dcgettext (((void *)0), never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"couldn't get boot time\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "couldn't get boot time" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "couldn't get boot time" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
104 | "couldn't get boot time" never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"couldn't get boot time\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "couldn't get boot time" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "couldn't get boot time" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
105 | , 5) never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"couldn't get boot time\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "couldn't get boot time" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "couldn't get boot time" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
106 | ), (( never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"couldn't get boot time\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "couldn't get boot time" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "couldn't get boot time" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
107 | 0 never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"couldn't get boot time\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "couldn't get boot time" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "couldn't get boot time" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
108 | ) ? (void) 0 : __builtin_unreachable ())))); never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"couldn't get boot time\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "couldn't get boot time" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "couldn't get boot time" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
109 | uptime = time_now - boot_time; | - | ||||||||||||||||||
110 | } never executed: end of block | 0 | ||||||||||||||||||
111 | updays = uptime / 86400; | - | ||||||||||||||||||
112 | uphours = (uptime - (updays * 86400)) / 3600; | - | ||||||||||||||||||
113 | upmins = (uptime - (updays * 86400) - (uphours * 3600)) / 60; | - | ||||||||||||||||||
114 | tmn = localtime (&time_now); | - | ||||||||||||||||||
115 | - | |||||||||||||||||||
116 | - | |||||||||||||||||||
117 | if (tmn
| 0 | ||||||||||||||||||
118 | - | |||||||||||||||||||
119 | fprintftime ( never executed: fprintftime ( stdout , dcgettext (((void *)0), " %H:%M:%S " , 5) , tmn, 0, 0); | 0 | ||||||||||||||||||
120 | stdout never executed: fprintftime ( stdout , dcgettext (((void *)0), " %H:%M:%S " , 5) , tmn, 0, 0); | 0 | ||||||||||||||||||
121 | , never executed: fprintftime ( stdout , dcgettext (((void *)0), " %H:%M:%S " , 5) , tmn, 0, 0); | 0 | ||||||||||||||||||
122 | dcgettext (((void *)0), never executed: fprintftime ( stdout , dcgettext (((void *)0), " %H:%M:%S " , 5) , tmn, 0, 0); | 0 | ||||||||||||||||||
123 | " %H:%M:%S " never executed: fprintftime ( stdout , dcgettext (((void *)0), " %H:%M:%S " , 5) , tmn, 0, 0); | 0 | ||||||||||||||||||
124 | , 5) never executed: fprintftime ( stdout , dcgettext (((void *)0), " %H:%M:%S " , 5) , tmn, 0, 0); | 0 | ||||||||||||||||||
125 | , tmn, 0, 0); never executed: fprintftime ( stdout , dcgettext (((void *)0), " %H:%M:%S " , 5) , tmn, 0, 0); | 0 | ||||||||||||||||||
126 | else | - | ||||||||||||||||||
127 | printf ( never executed: printf ( dcgettext (((void *)0), " ??:???? " , 5) ); | 0 | ||||||||||||||||||
128 | dcgettext (((void *)0), never executed: printf ( dcgettext (((void *)0), " ??:???? " , 5) ); | 0 | ||||||||||||||||||
129 | " ??:???? " never executed: printf ( dcgettext (((void *)0), " ??:???? " , 5) ); | 0 | ||||||||||||||||||
130 | , 5) never executed: printf ( dcgettext (((void *)0), " ??:???? " , 5) ); | 0 | ||||||||||||||||||
131 | ); never executed: printf ( dcgettext (((void *)0), " ??:???? " , 5) ); | 0 | ||||||||||||||||||
132 | if (uptime == (time_t) -1
| 0 | ||||||||||||||||||
133 | printf ( never executed: printf ( dcgettext (((void *)0), "up ???? days ??:??, " , 5) ); | 0 | ||||||||||||||||||
134 | dcgettext (((void *)0), never executed: printf ( dcgettext (((void *)0), "up ???? days ??:??, " , 5) ); | 0 | ||||||||||||||||||
135 | "up ???? days ??:??, " never executed: printf ( dcgettext (((void *)0), "up ???? days ??:??, " , 5) ); | 0 | ||||||||||||||||||
136 | , 5) never executed: printf ( dcgettext (((void *)0), "up ???? days ??:??, " , 5) ); | 0 | ||||||||||||||||||
137 | ); never executed: printf ( dcgettext (((void *)0), "up ???? days ??:??, " , 5) ); | 0 | ||||||||||||||||||
138 | else | - | ||||||||||||||||||
139 | { | - | ||||||||||||||||||
140 | if (0 < updays
| 0 | ||||||||||||||||||
141 | printf ( never executed: printf ( dcngettext (((void *)0), "up %ld day %2d:%02d, " , "up %ld days %2d:%02d, " , select_plural (updays) , 5) , updays, uphours, upmins); | 0 | ||||||||||||||||||
142 | dcngettext (((void *)0), never executed: printf ( dcngettext (((void *)0), "up %ld day %2d:%02d, " , "up %ld days %2d:%02d, " , select_plural (updays) , 5) , updays, uphours, upmins); | 0 | ||||||||||||||||||
143 | "up %ld day %2d:%02d, " never executed: printf ( dcngettext (((void *)0), "up %ld day %2d:%02d, " , "up %ld days %2d:%02d, " , select_plural (updays) , 5) , updays, uphours, upmins); | 0 | ||||||||||||||||||
144 | , never executed: printf ( dcngettext (((void *)0), "up %ld day %2d:%02d, " , "up %ld days %2d:%02d, " , select_plural (updays) , 5) , updays, uphours, upmins); | 0 | ||||||||||||||||||
145 | "up %ld days %2d:%02d, " never executed: printf ( dcngettext (((void *)0), "up %ld day %2d:%02d, " , "up %ld days %2d:%02d, " , select_plural (updays) , 5) , updays, uphours, upmins); | 0 | ||||||||||||||||||
146 | , never executed: printf ( dcngettext (((void *)0), "up %ld day %2d:%02d, " , "up %ld days %2d:%02d, " , select_plural (updays) , 5) , updays, uphours, upmins); | 0 | ||||||||||||||||||
147 | select_plural (updays) never executed: printf ( dcngettext (((void *)0), "up %ld day %2d:%02d, " , "up %ld days %2d:%02d, " , select_plural (updays) , 5) , updays, uphours, upmins); | 0 | ||||||||||||||||||
148 | , 5) never executed: printf ( dcngettext (((void *)0), "up %ld day %2d:%02d, " , "up %ld days %2d:%02d, " , select_plural (updays) , 5) , updays, uphours, upmins); | 0 | ||||||||||||||||||
149 | 0 | |||||||||||||||||||
150 | never executed: printf ( dcngettext (((void *)0), "up %ld day %2d:%02d, " , "up %ld days %2d:%02d, " , select_plural (updays) , 5) , updays, uphours, upmins); | 0 | ||||||||||||||||||
151 | , never executed: printf ( dcngettext (((void *)0), "up %ld day %2d:%02d, " , "up %ld days %2d:%02d, " , select_plural (updays) , 5) , updays, uphours, upmins); | 0 | ||||||||||||||||||
152 | updays, uphours, upmins); never executed: printf ( dcngettext (((void *)0), "up %ld day %2d:%02d, " , "up %ld days %2d:%02d, " , select_plural (updays) , 5) , updays, uphours, upmins); | 0 | ||||||||||||||||||
153 | else | - | ||||||||||||||||||
154 | printf ( never executed: printf ( dcgettext (((void *)0), "up %2d:%02d, " , 5) , uphours, upmins); | 0 | ||||||||||||||||||
155 | dcgettext (((void *)0), never executed: printf ( dcgettext (((void *)0), "up %2d:%02d, " , 5) , uphours, upmins); | 0 | ||||||||||||||||||
156 | "up %2d:%02d, " never executed: printf ( dcgettext (((void *)0), "up %2d:%02d, " , 5) , uphours, upmins); | 0 | ||||||||||||||||||
157 | , 5) never executed: printf ( dcgettext (((void *)0), "up %2d:%02d, " , 5) , uphours, upmins); | 0 | ||||||||||||||||||
158 | , uphours, upmins); never executed: printf ( dcgettext (((void *)0), "up %2d:%02d, " , 5) , uphours, upmins); | 0 | ||||||||||||||||||
159 | } | - | ||||||||||||||||||
160 | printf ( | - | ||||||||||||||||||
161 | dcngettext (((void *)0), | - | ||||||||||||||||||
162 | "%lu user" | - | ||||||||||||||||||
163 | , | - | ||||||||||||||||||
164 | "%lu users" | - | ||||||||||||||||||
165 | , | - | ||||||||||||||||||
166 | select_plural (entries) | - | ||||||||||||||||||
167 | , 5) | - | ||||||||||||||||||
168 | , | - | ||||||||||||||||||
169 | (unsigned long int) entries); | - | ||||||||||||||||||
170 | - | |||||||||||||||||||
171 | loads = getloadavg (avg, 3); | - | ||||||||||||||||||
172 | - | |||||||||||||||||||
173 | if (loads == -1
| 0 | ||||||||||||||||||
174 | putchar_unlocked ('\n'); never executed: putchar_unlocked ('\n'); | 0 | ||||||||||||||||||
175 | else | - | ||||||||||||||||||
176 | { | - | ||||||||||||||||||
177 | if (loads > 0
| 0 | ||||||||||||||||||
178 | printf ( never executed: printf ( dcgettext (((void *)0), ", load average: %.2f" , 5) , avg[0]); | 0 | ||||||||||||||||||
179 | dcgettext (((void *)0), never executed: printf ( dcgettext (((void *)0), ", load average: %.2f" , 5) , avg[0]); | 0 | ||||||||||||||||||
180 | ", load average: %.2f" never executed: printf ( dcgettext (((void *)0), ", load average: %.2f" , 5) , avg[0]); | 0 | ||||||||||||||||||
181 | , 5) never executed: printf ( dcgettext (((void *)0), ", load average: %.2f" , 5) , avg[0]); | 0 | ||||||||||||||||||
182 | , avg[0]); never executed: printf ( dcgettext (((void *)0), ", load average: %.2f" , 5) , avg[0]); | 0 | ||||||||||||||||||
183 | if (loads > 1
| 0 | ||||||||||||||||||
184 | printf (", %.2f", avg[1]); never executed: printf (", %.2f", avg[1]); | 0 | ||||||||||||||||||
185 | if (loads > 2
| 0 | ||||||||||||||||||
186 | printf (", %.2f", avg[2]); never executed: printf (", %.2f", avg[2]); | 0 | ||||||||||||||||||
187 | if (loads > 0
| 0 | ||||||||||||||||||
188 | putchar_unlocked ('\n'); never executed: putchar_unlocked ('\n'); | 0 | ||||||||||||||||||
189 | } never executed: end of block | 0 | ||||||||||||||||||
190 | } | - | ||||||||||||||||||
191 | - | |||||||||||||||||||
192 | - | |||||||||||||||||||
193 | - | |||||||||||||||||||
194 | - | |||||||||||||||||||
195 | - | |||||||||||||||||||
196 | static void | - | ||||||||||||||||||
197 | uptime (const char *filename, int options) | - | ||||||||||||||||||
198 | { | - | ||||||||||||||||||
199 | size_t n_users; | - | ||||||||||||||||||
200 | STRUCT_UTMP *utmp_buf = | - | ||||||||||||||||||
201 | ((void *)0) | - | ||||||||||||||||||
202 | ; | - | ||||||||||||||||||
203 | - | |||||||||||||||||||
204 | - | |||||||||||||||||||
205 | if (read_utmp (filename, &n_users, &utmp_buf, options) != 0
| 0 | ||||||||||||||||||
206 | (( never executed: !!sizeof (struct { _Static_assert (((!!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 ())))); 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 | ||||||||||||||||||
207 | 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 | ||||||||||||||||||
208 | , "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 | ||||||||||||||||||
209 | 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 | ||||||||||||||||||
210 | , 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 | ||||||||||||||||||
211 | (*__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 | ||||||||||||||||||
212 | , "%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 | ||||||||||||||||||
213 | 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 | ||||||||||||||||||
214 | ) ? (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 | ||||||||||||||||||
215 | 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 | ||||||||||||||||||
216 | , 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 | ||||||||||||||||||
217 | (*__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 | ||||||||||||||||||
218 | , "%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 | ||||||||||||||||||
219 | 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 | ||||||||||||||||||
220 | ) ? (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 | ||||||||||||||||||
221 | - | |||||||||||||||||||
222 | - | |||||||||||||||||||
223 | print_uptime (n_users, utmp_buf); | - | ||||||||||||||||||
224 | - | |||||||||||||||||||
225 | ; | - | ||||||||||||||||||
226 | } never executed: end of block | 0 | ||||||||||||||||||
227 | - | |||||||||||||||||||
228 | void | - | ||||||||||||||||||
229 | usage (int status) | - | ||||||||||||||||||
230 | { | - | ||||||||||||||||||
231 | if (status !=
| 3 | ||||||||||||||||||
232 | 0
| 3 | ||||||||||||||||||
233 | ) | - | ||||||||||||||||||
234 | do { fprintf ( | - | ||||||||||||||||||
235 | stderr | - | ||||||||||||||||||
236 | , | - | ||||||||||||||||||
237 | dcgettext (((void *)0), | - | ||||||||||||||||||
238 | "Try '%s --help' for more information.\n" | - | ||||||||||||||||||
239 | , 5) | - | ||||||||||||||||||
240 | , program_name); } executed 3 times by 1 test: while (0);end of block Executed by:
| 3 | ||||||||||||||||||
241 | else | - | ||||||||||||||||||
242 | { | - | ||||||||||||||||||
243 | printf ( | - | ||||||||||||||||||
244 | dcgettext (((void *)0), | - | ||||||||||||||||||
245 | "Usage: %s [OPTION]... [FILE]\n" | - | ||||||||||||||||||
246 | , 5) | - | ||||||||||||||||||
247 | , program_name); | - | ||||||||||||||||||
248 | printf ( | - | ||||||||||||||||||
249 | dcgettext (((void *)0), | - | ||||||||||||||||||
250 | "Print the current time, the length of time the system has been up,\nthe number of users on the system, and the average number of jobs\nin the run queue over the last 1, 5 and 15 minutes." | - | ||||||||||||||||||
251 | , 5) | - | ||||||||||||||||||
252 | - | |||||||||||||||||||
253 | - | |||||||||||||||||||
254 | - | |||||||||||||||||||
255 | ); | - | ||||||||||||||||||
256 | - | |||||||||||||||||||
257 | - | |||||||||||||||||||
258 | - | |||||||||||||||||||
259 | - | |||||||||||||||||||
260 | - | |||||||||||||||||||
261 | printf ( | - | ||||||||||||||||||
262 | dcgettext (((void *)0), | - | ||||||||||||||||||
263 | " Processes in\nan uninterruptible sleep state also contribute to the load average.\n" | - | ||||||||||||||||||
264 | , 5) | - | ||||||||||||||||||
265 | - | |||||||||||||||||||
266 | - | |||||||||||||||||||
267 | ); | - | ||||||||||||||||||
268 | - | |||||||||||||||||||
269 | - | |||||||||||||||||||
270 | - | |||||||||||||||||||
271 | printf ( | - | ||||||||||||||||||
272 | dcgettext (((void *)0), | - | ||||||||||||||||||
273 | "If FILE is not specified, use %s. %s as FILE is common.\n\n" | - | ||||||||||||||||||
274 | , 5) | - | ||||||||||||||||||
275 | - | |||||||||||||||||||
276 | - | |||||||||||||||||||
277 | , | - | ||||||||||||||||||
278 | - | |||||||||||||||||||
279 | "/var/run/utmp" | - | ||||||||||||||||||
280 | , | - | ||||||||||||||||||
281 | "/var/log/wtmp" | - | ||||||||||||||||||
282 | ); | - | ||||||||||||||||||
283 | fputs_unlocked ( | - | ||||||||||||||||||
284 | dcgettext (((void *)0), | - | ||||||||||||||||||
285 | " --help display this help and exit\n" | - | ||||||||||||||||||
286 | , 5) | - | ||||||||||||||||||
287 | , | - | ||||||||||||||||||
288 | stdout | - | ||||||||||||||||||
289 | ); | - | ||||||||||||||||||
290 | fputs_unlocked ( | - | ||||||||||||||||||
291 | dcgettext (((void *)0), | - | ||||||||||||||||||
292 | " --version output version information and exit\n" | - | ||||||||||||||||||
293 | , 5) | - | ||||||||||||||||||
294 | , | - | ||||||||||||||||||
295 | stdout | - | ||||||||||||||||||
296 | ); | - | ||||||||||||||||||
297 | emit_ancillary_info ("uptime"); | - | ||||||||||||||||||
298 | } executed 3 times by 1 test: end of block Executed by:
| 3 | ||||||||||||||||||
299 | exit (status); executed 6 times by 1 test: exit (status); Executed by:
| 6 | ||||||||||||||||||
300 | } | - | ||||||||||||||||||
301 | - | |||||||||||||||||||
302 | int | - | ||||||||||||||||||
303 | main (int argc, char **argv) | - | ||||||||||||||||||
304 | { | - | ||||||||||||||||||
305 | ; | - | ||||||||||||||||||
306 | set_program_name (argv[0]); | - | ||||||||||||||||||
307 | setlocale ( | - | ||||||||||||||||||
308 | 6 | - | ||||||||||||||||||
309 | , ""); | - | ||||||||||||||||||
310 | bindtextdomain ("coreutils", "/usr/local/share/locale"); | - | ||||||||||||||||||
311 | textdomain ("coreutils"); | - | ||||||||||||||||||
312 | - | |||||||||||||||||||
313 | atexit (close_stdout); | - | ||||||||||||||||||
314 | - | |||||||||||||||||||
315 | parse_long_options (argc, argv, "uptime", "GNU coreutils", Version, | - | ||||||||||||||||||
316 | usage, ("Joseph Arceneaux"), ("David MacKenzie"), ("Kaveh Ghazi"), (char const *) | - | ||||||||||||||||||
317 | ((void *)0) | - | ||||||||||||||||||
318 | ); | - | ||||||||||||||||||
319 | if (getopt_long (argc, argv, "", long_options,
| 0-3 | ||||||||||||||||||
320 | ((void *)0)
| 0-3 | ||||||||||||||||||
321 | ) != -1
| 0-3 | ||||||||||||||||||
322 | usage ( executed 3 times by 1 test: usage ( 1 ); Executed by:
| 3 | ||||||||||||||||||
323 | 1 executed 3 times by 1 test: usage ( 1 ); Executed by:
| 3 | ||||||||||||||||||
324 | ); executed 3 times by 1 test: usage ( 1 ); Executed by:
| 3 | ||||||||||||||||||
325 | - | |||||||||||||||||||
326 | switch (argc - optind) | - | ||||||||||||||||||
327 | { | - | ||||||||||||||||||
328 | case never executed: 0:case 0: never executed: case 0: | 0 | ||||||||||||||||||
329 | uptime ( | - | ||||||||||||||||||
330 | "/var/run/utmp" | - | ||||||||||||||||||
331 | , READ_UTMP_CHECK_PIDS); | - | ||||||||||||||||||
332 | break; never executed: break; | 0 | ||||||||||||||||||
333 | - | |||||||||||||||||||
334 | case never executed: 1:case 1: never executed: case 1: | 0 | ||||||||||||||||||
335 | uptime (argv[optind], 0); | - | ||||||||||||||||||
336 | break; never executed: break; | 0 | ||||||||||||||||||
337 | - | |||||||||||||||||||
338 | default never executed: :default: never executed: default: | 0 | ||||||||||||||||||
339 | error (0, 0, | - | ||||||||||||||||||
340 | dcgettext (((void *)0), | - | ||||||||||||||||||
341 | "extra operand %s" | - | ||||||||||||||||||
342 | , 5) | - | ||||||||||||||||||
343 | , quote (argv[optind + 1])); | - | ||||||||||||||||||
344 | usage ( | - | ||||||||||||||||||
345 | 1 | - | ||||||||||||||||||
346 | ); | - | ||||||||||||||||||
347 | } never executed: end of block | 0 | ||||||||||||||||||
348 | - | |||||||||||||||||||
349 | return never executed: return 0 ; never executed: return 0 ; | 0 | ||||||||||||||||||
350 | 0 never executed: return 0 ; | 0 | ||||||||||||||||||
351 | ; never executed: return 0 ; | 0 | ||||||||||||||||||
352 | } | - | ||||||||||||||||||
Switch to Source code | Preprocessed file |