The function mnt_fs_is_swaparea() does not return TRUE for entries
from /proc/swaps. This is pretty strange.
Signed-off-by: Karel Zak <kzak@redhat.com>
/* necessary for /proc/mounts only, the /proc/self/mountinfo
* parser sets the flag properly
*/
- if (filename && strcmp(filename, _PATH_PROC_MOUNTS) == 0)
+ if (tb->fmt == MNT_FMT_SWAPS)
+ flags = MNT_FS_SWAP;
+ else if (filename && strcmp(filename, _PATH_PROC_MOUNTS) == 0)
flags = MNT_FS_KERNEL;
do {