]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
udevadm-settle: rename arg_timeout -> arg_timeout_usec
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 27 Aug 2022 16:04:56 +0000 (01:04 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 29 Aug 2022 04:40:54 +0000 (13:40 +0900)
src/udev/udevadm-settle.c

index 1bb047f44228057524038dadec0cd5d32684296b..b61875a6e72dc85c6267ef909016b27b48607e99 100644 (file)
@@ -29,7 +29,7 @@
 #include "util.h"
 #include "virt.h"
 
-static usec_t arg_timeout = 120 * USEC_PER_SEC;
+static usec_t arg_timeout_usec = 120 * USEC_PER_SEC;
 static const char *arg_exists = NULL;
 
 static int help(void) {
@@ -61,7 +61,7 @@ static int parse_argv(int argc, char *argv[]) {
         while ((c = getopt_long(argc, argv, "t:E:Vhs:e:q", options, NULL)) >= 0) {
                 switch (c) {
                 case 't':
-                        r = parse_sec(optarg, &arg_timeout);
+                        r = parse_sec(optarg, &arg_timeout_usec);
                         if (r < 0)
                                 return log_error_errno(r, "Failed to parse timeout value '%s': %m", optarg);
                         break;
@@ -174,7 +174,7 @@ int settle_main(int argc, char *argv[], void *userdata) {
 
         (void) emit_deprecation_warning();
 
-        deadline = now(CLOCK_MONOTONIC) + arg_timeout;
+        deadline = now(CLOCK_MONOTONIC) + arg_timeout_usec;
 
         if (getuid() == 0) {
                 _cleanup_(udev_ctrl_unrefp) UdevCtrl *uctrl = NULL;
@@ -191,7 +191,7 @@ int settle_main(int argc, char *argv[], void *userdata) {
                         return 0;
                 }
 
-                r = udev_ctrl_wait(uctrl, MAX(5 * USEC_PER_SEC, arg_timeout));
+                r = udev_ctrl_wait(uctrl, MAX(5 * USEC_PER_SEC, arg_timeout_usec));
                 if (r < 0)
                         return log_error_errno(r, "Failed to wait for daemon to reply: %m");
         } else {