From d12babb5746fdb20bcf3d6370041fef295b1373b Mon Sep 17 00:00:00 2001 From: Mike Yuan Date: Sat, 30 Sep 2023 16:40:22 +0800 Subject: [PATCH] test-btrfs-physical-offset: log correct errno --- src/test/test-btrfs-physical-offset.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/test/test-btrfs-physical-offset.c b/src/test/test-btrfs-physical-offset.c index bcc6252381c..379ab311003 100644 --- a/src/test/test-btrfs-physical-offset.c +++ b/src/test/test-btrfs-physical-offset.c @@ -1,5 +1,6 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ +#include #include #include "btrfs-util.h" @@ -18,7 +19,7 @@ int main(int argc, char *argv[]) { fd = open(argv[1], O_RDONLY|O_CLOEXEC|O_NOCTTY); if (fd < 0) { - log_error_errno(fd, "Failed to open '%s': %m", argv[1]); + log_error_errno(errno, "Failed to open '%s': %m", argv[1]); return EXIT_FAILURE; } -- 2.47.3