chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sd-device: don't retry loading uevent/db files more than once
[elogind.git]
/
src
/
libelogind
/
sd-device
/
sd-device.c
diff --git
a/src/libelogind/sd-device/sd-device.c
b/src/libelogind/sd-device/sd-device.c
index 9ef851a6bbfcd6ed53839fbc3ecab28b548b3c17..691b9c63273175786b4c726df00aa4eb16d34143 100644
(file)
--- a/
src/libelogind/sd-device/sd-device.c
+++ b/
src/libelogind/sd-device/sd-device.c
@@
-500,6
+500,8
@@
int device_read_uevent_file(sd_device *device) {
if (device->uevent_loaded || device->sealed)
return 0;
if (device->uevent_loaded || device->sealed)
return 0;
+ device->uevent_loaded = true;
+
r = sd_device_get_syspath(device, &syspath);
if (r < 0)
return r;
r = sd_device_get_syspath(device, &syspath);
if (r < 0)
return r;
@@
-570,8
+572,6
@@
int device_read_uevent_file(sd_device *device) {
log_debug("sd-device: could not set 'MAJOR=%s' or 'MINOR=%s' from '%s': %s", major, minor, path, strerror(-r));
}
log_debug("sd-device: could not set 'MAJOR=%s' or 'MINOR=%s' from '%s': %s", major, minor, path, strerror(-r));
}
- device->uevent_loaded = true;
-
return 0;
}
return 0;
}
@@
-1243,6
+1243,8
@@
int device_read_db_aux(sd_device *device, bool force) {
if (device->db_loaded || (!force && device->sealed))
return 0;
if (device->db_loaded || (!force && device->sealed))
return 0;
+ device->db_loaded = true;
+
r = device_get_id_filename(device, &id);
if (r < 0)
return r;
r = device_get_id_filename(device, &id);
if (r < 0)
return r;
@@
-1311,8
+1313,6
@@
int device_read_db_aux(sd_device *device, bool force) {
}
}
}
}
- device->db_loaded = true;
-
return 0;
}
return 0;
}