diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-07-13 10:57:06 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-07-13 10:57:06 +0000 |
commit | b765a6db5fc0b679751f7aabf507f090d1a3db40 (patch) | |
tree | a6820e5e5c2906ae0326ca17a0192da73c7f44f3 /inotify-info.cpp | |
parent | Adding upstream version 0.0.2. (diff) | |
download | inotify-info-b765a6db5fc0b679751f7aabf507f090d1a3db40.tar.xz inotify-info-b765a6db5fc0b679751f7aabf507f090d1a3db40.zip |
Adding upstream version 0.0.3.upstream/0.0.3upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'inotify-info.cpp')
-rw-r--r-- | inotify-info.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/inotify-info.cpp b/inotify-info.cpp index ae5e61e..7706e84 100644 --- a/inotify-info.cpp +++ b/inotify-info.cpp @@ -389,7 +389,7 @@ struct statx mystatx(const char* filename, unsigned int mask = 0) int flags = AT_NO_AUTOMOUNT | AT_SYMLINK_NOFOLLOW | AT_STATX_DONT_SYNC; if (statx(0, filename, flags, mask, &statxbuf) == -1) { - printf("ERROR: statx-ino( %s ) failed. Errno: %d\n", filename, errno); + printf("ERROR: statx-ino( %s ) failed. Errno: %d (%s)\n", filename, errno, strerror(errno)); memset(&statxbuf, 0, sizeof(statxbuf)); } @@ -418,7 +418,7 @@ static dev_t stat_get_dev_t(const char* filename) int ret = stat(filename, &statbuf); if (ret == -1) { - printf("ERROR: stat-dev_t( %s ) failed. Errno: %d\n", filename, errno); + printf("ERROR: stat-dev_t( %s ) failed. Errno: %d (%s)\n", filename, errno, strerror(errno)); return 0; } return statbuf.st_dev; @@ -430,7 +430,7 @@ static uint64_t stat_get_ino(const char* filename) int ret = stat(filename, &statbuf); if (ret == -1) { - printf("ERROR: stat-ino( %s ) failed. Errno: %d\n", filename, errno); + printf("ERROR: stat-ino( %s ) failed. Errno: %d (%s)\n", filename, errno, strerror(errno)); return 0; } @@ -543,7 +543,7 @@ int thread_info_t::parse_dirqueue_entry() } if (spew_error) { - printf("ERROR: sys_getdents64 failed on '%s': %d errno:%d\n", path, ret, errno); + printf("ERROR: sys_getdents64 failed on '%s': %d errno: %d (%s)\n", path, ret, errno, strerror(errno)); } break; } @@ -631,7 +631,7 @@ static bool init_inotify_proclist(std::vector<procinfo_t>& inotify_proclist) DIR* dir_proc = opendir("/proc"); if (!dir_proc) { - printf("ERROR: opendir /proc failed: %d\n", errno); + printf("ERROR: opendir /proc failed: %d (%s)\n", errno, strerror(errno)); return false; } |