diff options
author | 2020-08-14 11:04:59 +0200 | |
---|---|---|
committer | 2020-08-14 11:05:05 +0200 | |
commit | 8db532f305b84b7e7e83133709244d8b502033f3 (patch) | |
tree | 444ba52984e19d63c72a1767570195e9e4baee38 /src | |
parent | tests: fix false-positive match on modules (diff) | |
download | firejail-8db532f305b84b7e7e83133709244d8b502033f3.tar.gz firejail-8db532f305b84b7e7e83133709244d8b502033f3.tar.zst firejail-8db532f305b84b7e7e83133709244d8b502033f3.zip |
print errno if char device creation fails
on Ubuntu autopkgtest runs on armhf, /dev/zero creation fails.
Diffstat (limited to 'src')
-rw-r--r-- | src/firejail/fs_dev.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/firejail/fs_dev.c b/src/firejail/fs_dev.c index fbce72429..00edc5f88 100644 --- a/src/firejail/fs_dev.c +++ b/src/firejail/fs_dev.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <dirent.h> | 25 | #include <dirent.h> |
26 | #include <fcntl.h> | 26 | #include <fcntl.h> |
27 | #include <pwd.h> | 27 | #include <pwd.h> |
28 | #include <errno.h> | ||
28 | #ifndef _BSD_SOURCE | 29 | #ifndef _BSD_SOURCE |
29 | #define _BSD_SOURCE | 30 | #define _BSD_SOURCE |
30 | #endif | 31 | #endif |
@@ -148,7 +149,7 @@ static void create_char_dev(const char *path, mode_t mode, int major, int minor) | |||
148 | return; | 149 | return; |
149 | 150 | ||
150 | errexit: | 151 | errexit: |
151 | fprintf(stderr, "Error: cannot create %s device\n", path); | 152 | fprintf(stderr, "Error: cannot create %s device: %s\n", path, strerror(errno)); |
152 | exit(1); | 153 | exit(1); |
153 | } | 154 | } |
154 | 155 | ||