Age | Commit message (Collapse) | Author |
|
samples/fanotify/fs-monitor.c:22:9: error: unknown type name '__s32'
22 | __s32 error;
| ^~~~~
samples/fanotify/fs-monitor.c:23:9: error: unknown type name '__u32'
23 | __u32 error_count;
| ^~~~~
samples/fanotify/fs-monitor.c: In function 'handle_notifications':
samples/fanotify/fs-monitor.c:98:50: error: 'fsid_t' has no member named 'val';
did you mean '__val'?
98 | fid->fsid.val[0],
fid->fsid.val[1]);
| ^~~
| __val
samples/fanotify/fs-monitor.c:98:68: error: 'fsid_t' has no member named 'val';
did you mean '__val'?
98 | fid->fsid.val[0],
fid->fsid.val[1]);
| ^~~
| __val
This is due to sys/fanotify.h on musl does not include
linux/fanotify.h[0] unlike glibc which includes it. This also results in
fsid not being of type __kernel_fsid_t, rather the libc's definition of
it which does not have val, but instead __val.
[0]: https://git.musl-libc.org/cgit/musl/tree/include/sys/fanotify.h
Signed-off-by: Brahmajit Das <listout@listout.xyz>
Signed-off-by: Jan Kara <jack@suse.cz>
Link: https://patch.msgid.link/20250630103011.27484-1-listout@listout.xyz
|
|
Commit 5451093081db ("samples: Add fs error monitoring example") added a
new sample program, but didn't teach git to ignore the new generated
files, causing unnecessary noise from 'git status' after a full build.
Add the 'fs-monitor' sample executable to the .gitignore for this
subdirectory to silence it all again.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
|
'sys/types.h' included in 'samples/fanotify/fs-monitor.c'
is duplicated.It is also included on 15 line.
Link: https://lore.kernel.org/r/20211101075152.35780-1-zhang.mingyu@zte.com.cn
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Zhang Mingyu <zhang.mingyu@zte.com.cn>
Signed-off-by: Jan Kara <jack@suse.cz>
|
|
The fsnotify sample code generates the following warning on powerpc:
samples/fanotify/fs-monitor.c: In function 'handle_notifications':
samples/fanotify/fs-monitor.c:68:36: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 2 has type '__u64' {aka 'long unsigned int'} [-Wformat=]
68 | printf("unexpected FAN MARK: %llx\n", event->mask);
| ~~~^ ~~~~~~~~~~~
| | |
| | __u64 {aka long unsigned int}
| long long unsigned int
| %lx
Fix the problem by explicitely typing the argument to proper type.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Jan Kara <jack@suse.cz>
|
|
Introduce an example of a FAN_FS_ERROR fanotify user to track filesystem
errors.
Link: https://lore.kernel.org/r/20211025192746.66445-31-krisman@collabora.com
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.com>
Signed-off-by: Jan Kara <jack@suse.cz>
|