diff options
Diffstat (limited to 'udev_rules.c')
-rw-r--r-- | udev_rules.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/udev_rules.c b/udev_rules.c index 55a079be87..f4ee11a56c 100644 --- a/udev_rules.c +++ b/udev_rules.c @@ -1412,7 +1412,10 @@ int udev_rules_get_name(struct udev_rules *rules, struct udevice *udev) if (!udev->mode_final && rule->mode.operation != KEY_OP_UNSET) { if (rule->mode.operation == KEY_OP_ASSIGN_FINAL) udev->mode_final = 1; - udev->mode = strtol(key_val(rule, &rule->mode), NULL, 8); + char buf[20]; + strlcpy(buf, key_val(rule, &rule->mode), sizeof(buf)); + udev_rules_apply_format(udev, buf, sizeof(buf)); + udev->mode = strtol(buf, NULL, 8); dbg("applied mode=%#o to '%s'\n", udev->mode, udev->dev->kernel); } if (!udev->owner_final && rule->owner.operation != KEY_OP_UNSET) { |