]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
udev-rules: rename variable "filename" -> "path"
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 6 Apr 2023 23:36:15 +0000 (08:36 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 7 Apr 2023 18:38:19 +0000 (03:38 +0900)
src/udev/udev-rules.c

index 30f3ab6c0c3f47b3153a3fd64b6f8dff03a73de8..b410216396e95ede6675220b7122d2a048b34565 100644 (file)
@@ -2575,7 +2575,7 @@ static int udev_rule_apply_token_to_event(
 
                 p = skip_leading_chars(buf, NULL);
                 while (!isempty(p)) {
-                        char filename[UDEV_PATH_SIZE], *next;
+                        char path[UDEV_PATH_SIZE], *next;
 
                         next = strchr(p, ' ');
                         if (next) {
@@ -2583,19 +2583,19 @@ static int udev_rule_apply_token_to_event(
                                 next = skip_leading_chars(next, NULL);
                         }
 
-                        strscpyl_full(filename, sizeof(filename), &truncated, "/dev/", p, NULL);
+                        strscpyl_full(path, sizeof(path), &truncated, "/dev/", p, NULL);
                         if (truncated)
                                 continue;
 
                         if (token->op == OP_REMOVE) {
-                                device_remove_devlink(dev, filename);
-                                log_event_debug(dev, token, "Dropped SYMLINK '%s'", p);
+                                device_remove_devlink(dev, path);
+                                log_event_debug(dev, token, "Dropped SYMLINK '%s'", path);
                         } else {
-                                r = device_add_devlink(dev, filename);
+                                r = device_add_devlink(dev, path);
                                 if (r < 0)
-                                        return log_event_error_errno(dev, token, r, "Failed to add devlink '%s': %m", filename);
+                                        return log_event_error_errno(dev, token, r, "Failed to add devlink '%s': %m", path);
 
-                                log_event_debug(dev, token, "Added SYMLINK '%s'", p);
+                                log_event_debug(dev, token, "Added SYMLINK '%s'", path);
                         }
 
                         p = next;