diff options
author | Mike Yuan <me@yhndnzj.com> | 2024-07-21 16:59:19 +0200 |
---|---|---|
committer | Mike Yuan <me@yhndnzj.com> | 2024-07-21 22:48:52 +0200 |
commit | 777f69006b33b3bffc316dc612ca68c9d296ed4a (patch) | |
tree | 9833618f4f1a606131d1ec5ea535632b6f185c43 | |
parent | core/device: minor refactors (diff) | |
download | systemd-777f69006b33b3bffc316dc612ca68c9d296ed4a.tar.xz systemd-777f69006b33b3bffc316dc612ca68c9d296ed4a.zip |
core/device: prefix DEVICE_FOUND_MASK with '_'
In accordance to our usual style for special enum values.
-rw-r--r-- | src/core/device.c | 6 | ||||
-rw-r--r-- | src/core/device.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/core/device.c b/src/core/device.c index f8ded6c838..4b62477d2c 100644 --- a/src/core/device.c +++ b/src/core/device.c @@ -332,7 +332,7 @@ static void device_catchup(Unit *u) { Device *d = ASSERT_PTR(DEVICE(u)); /* Second, let's update the state with the enumerated state */ - device_update_found_one(d, d->enumerated_found, DEVICE_FOUND_MASK); + device_update_found_one(d, d->enumerated_found, _DEVICE_FOUND_MASK); } static const struct { @@ -1097,7 +1097,7 @@ static void device_remove_old_on_move(Manager *m, sd_device *dev) { if (!syspath_old) return (void) log_oom(); - device_update_found_by_sysfs(m, syspath_old, DEVICE_NOT_FOUND, DEVICE_FOUND_MASK); + device_update_found_by_sysfs(m, syspath_old, DEVICE_NOT_FOUND, _DEVICE_FOUND_MASK); } static int device_dispatch_io(sd_device_monitor *monitor, sd_device *dev, void *userdata) { @@ -1177,7 +1177,7 @@ static int device_dispatch_io(sd_device_monitor *monitor, sd_device *dev, void * /* If we get notified that a device was removed by udev, then it's completely gone, hence * unset all found bits. Note this affects all .device units still point to the removed * device. */ - device_update_found_by_sysfs(m, sysfs, DEVICE_NOT_FOUND, DEVICE_FOUND_MASK); + device_update_found_by_sysfs(m, sysfs, DEVICE_NOT_FOUND, _DEVICE_FOUND_MASK); /* These devices are found and ready now, set the udev found bit. Note, this is also necessary to do * on remove uevent, as some devlinks may be updated and now point to other device nodes. */ diff --git a/src/core/device.h b/src/core/device.h index 9dd6fb57c2..4eb656777a 100644 --- a/src/core/device.h +++ b/src/core/device.h @@ -14,7 +14,7 @@ typedef enum DeviceFound { DEVICE_FOUND_UDEV = 1 << 0, /* The device has shown up in the udev database */ DEVICE_FOUND_MOUNT = 1 << 1, /* The device has shown up in /proc/self/mountinfo */ DEVICE_FOUND_SWAP = 1 << 2, /* The device has shown up in /proc/swaps */ - DEVICE_FOUND_MASK = DEVICE_FOUND_UDEV|DEVICE_FOUND_MOUNT|DEVICE_FOUND_SWAP, + _DEVICE_FOUND_MASK = DEVICE_FOUND_UDEV|DEVICE_FOUND_MOUNT|DEVICE_FOUND_SWAP, } DeviceFound; struct Device { |