projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7a87630
)
test-btrfs-physical-offset: log correct errno
author
Mike Yuan
<me@yhndnzj.com>
Sat, 30 Sep 2023 08:40:22 +0000
(16:40 +0800)
committer
Mike Yuan
<me@yhndnzj.com>
Fri, 20 Oct 2023 15:22:28 +0000
(23:22 +0800)
src/test/test-btrfs-physical-offset.c
patch
|
blob
|
history
diff --git
a/src/test/test-btrfs-physical-offset.c
b/src/test/test-btrfs-physical-offset.c
index bcc6252381cea282a611d6be1930857defc6da8e..379ab311003f766614f3198b4e2b9fa3362e559c 100644
(file)
--- 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 <errno.h>
#include <fcntl.h>
#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;
}