1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-05 13:18:20 +03:00

filesystem: add note about swap devices

This commit is contained in:
Peter Rajnoha 2024-09-19 13:40:09 +02:00
parent bd5ca83c43
commit 9d6a3ee547
No known key found for this signature in database
GPG Key ID: E776664036DF84AB

View File

@ -201,6 +201,13 @@ int fs_get_info(struct cmd_context *cmd, struct logical_volume *lv,
if (!include_mount)
return 1;
/*
* Note: used swap devices are not considered as mount points,
* hence they're not listed in /etc/mtab, we'd need to read the
* /proc/swaps instead. We don't need it at this moment though,
* but if we do once, read the /proc/swaps here if fsi->fstype == "swap".
*/
if (!(fme = setmntent("/etc/mtab", "r")))
return_0;