diff options
| author | Karel Zak <kzak@redhat.com> | 2025-07-16 13:52:07 +0200 |
|---|---|---|
| committer | Karel Zak <kzak@redhat.com> | 2025-08-06 15:03:29 +0200 |
| commit | 8c76b852717fc35fc07b4805239cf7b51f3d39d9 (patch) | |
| tree | 9655e63d63793e54d04053f9001c0b208b231a55 /libmount/src/tab_parse.c | |
| parent | f9c62adb72da799d230acdfce1fd5369e127c68f (diff) | |
| download | util-linux-8c76b852717fc35fc07b4805239cf7b51f3d39d9.tar.gz | |
libmount: add mnt_fs_is_{moved,attached,detached} functions
Let's use these simple functions to report what the last operation or
status detected by the library means to the filesystem. It will be
used by the fanotify monitor as well.
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libmount/src/tab_parse.c')
| -rw-r--r-- | libmount/src/tab_parse.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libmount/src/tab_parse.c b/libmount/src/tab_parse.c index 3dd8538802..bd15ad9098 100644 --- a/libmount/src/tab_parse.c +++ b/libmount/src/tab_parse.c @@ -188,6 +188,7 @@ static int mnt_parse_mountinfo_line(struct libmnt_fs *fs, const char *s) char *p; fs->flags |= MNT_FS_KERNEL; + mnt_fs_mark_attached(fs); /* (1) id */ s = next_s32(s, &fs->id, &rc); @@ -755,9 +756,9 @@ int mnt_table_parse_stream(struct libmnt_table *tb, FILE *f, const char *filenam * parser sets the flag properly */ if (tb->fmt == MNT_FMT_SWAPS) - flags = MNT_FS_SWAP; + flags = MNT_FS_SWAP | MNT_FS_STATUS_ATTACH; else if (filename && strcmp(filename, _PATH_PROC_MOUNTS) == 0) - flags = MNT_FS_KERNEL; + flags = MNT_FS_KERNEL | MNT_FS_STATUS_ATTACH; do { struct libmnt_fs *fs; |
