summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Wiederhake <BenWiederhake.GitHub@gmx.de>2021-11-21 03:35:20 +0100
committerAndreas Kling <kling@serenityos.org>2021-11-21 13:52:25 +0100
commitd5c687b50f9eca74079ce49314e3da96963b57c6 (patch)
tree45c61aaa0880c4de759d7d9788ac5b68cad3996e
parent253d62cb18e6afed31ddc5ff5459c6d73c124a06 (diff)
downloadserenity-d5c687b50f9eca74079ce49314e3da96963b57c6.zip
kcov-example: Print helpful error if kcov feature is missing
-rw-r--r--Userland/Utilities/kcov-example.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/Userland/Utilities/kcov-example.cpp b/Userland/Utilities/kcov-example.cpp
index 577a8c4435..b8d45a1aaf 100644
--- a/Userland/Utilities/kcov-example.cpp
+++ b/Userland/Utilities/kcov-example.cpp
@@ -21,6 +21,7 @@ int main(void)
int fd = open("/dev/kcov0", O_RDWR);
if (fd == -1) {
perror("open");
+ fprintf(stderr, "Could not open /dev/kcov0 - is ENABLE_KERNEL_COVERAGE_COLLECTION enabled?\n");
return 1;
}
if (ioctl(fd, KCOV_SETBUFSIZE, num_entries) == -1) {