]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
storagetm: fix use of wrong stat element 30700/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 2 Jan 2024 20:19:00 +0000 (05:19 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 2 Jan 2024 20:19:00 +0000 (05:19 +0900)
src/storagetm/storagetm.c

index c8948ec03895de697a3db04ba3b046ffa3a29758..1ab2260ce03a815c06ec0d8c1e43f733daac3ad0 100644 (file)
@@ -381,7 +381,7 @@ static int nvme_subsystem_add(const char *node, int consumed_fd, sd_device *devi
                 return log_error_errno(errno, "Failed to fstat '%s': %m", node);
         if (S_ISBLK(st.st_mode)) {
                 if (!device) {
-                        r = sd_device_new_from_devnum(&allocated_device, 'b', st.st_dev);
+                        r = sd_device_new_from_devnum(&allocated_device, 'b', st.st_rdev);
                         if (r < 0)
                                 return log_error_errno(r, "Failed to get device information for device '%s': %m", node);