discover-image: pass the right fd to fd_getcrtime()
authorLennart Poettering <lennart@poettering.net>
Wed, 18 Aug 2021 20:41:08 +0000 (22:41 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 13 Jan 2022 09:40:42 +0000 (10:40 +0100)
(cherry picked from commit 12a7f04a2b9135a4751dba71e2f688525d7c93e7)
(cherry picked from commit 64b025686f36ae4385811be6f81d5f7d94da3437)

src/shared/discover-image.c

index 79c4c70a41cf88028074f3d722e08f803f70ccd2..6ca403b9a602907c76186311f87d39bf87a91b7c 100644 (file)
@@ -303,7 +303,7 @@ static int image_make(
                 }
 
                 /* Get directory creation time (not available everywhere, but that's OK */
-                (void) fd_getcrtime(dfd, &crtime);
+                (void) fd_getcrtime(fd, &crtime);
 
                 /* If the IMMUTABLE bit is set, we consider the directory read-only. Since the ioctl is not
                  * supported everywhere we ignore failures. */