]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
loop-util: fix LoopDevice.devno assigned by loop_device_open()
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 4 Sep 2022 17:39:16 +0000 (02:39 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 4 Sep 2022 18:29:06 +0000 (03:29 +0900)
src/shared/loop-util.c

index 90451415ff95148956280ed345778facb02e49e8..c376244cb7a2dba93b12f2d48ef59e3880b111b0 100644 (file)
@@ -851,7 +851,7 @@ int loop_device_open(
                 .nr = nr,
                 .node = TAKE_PTR(p),
                 .relinquished = true, /* It's not ours, don't try to destroy it when this object is freed */
-                .devno = st.st_dev,
+                .devno = st.st_rdev,
                 .diskseq = diskseq,
                 .uevent_seqnum_not_before = UINT64_MAX,
                 .timestamp_not_before = USEC_INFINITY,