diff options
author | Lennart Poettering <lennart@poettering.net> | 2017-09-29 14:23:17 +0200 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2017-11-22 08:25:28 +0100 |
commit | c821caff64158792756f7e020c29af11a703685f (patch) | |
tree | e4d551923b4849f05f21083dba84a0c5855b73e4 /src/basic/mount-util.c | |
parent | 6c78120a2db66990f872fa03dd14dd77d452e57d (diff) |
dissect: split list of discard-supporting fs out into mount-util.c
Let's manage the list of file systems that do a specific thing at one
place, following similar naming.
No functional changes.
Diffstat (limited to 'src/basic/mount-util.c')
-rw-r--r-- | src/basic/mount-util.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/basic/mount-util.c b/src/basic/mount-util.c index d8850bf83..6e6596d57 100644 --- a/src/basic/mount-util.c +++ b/src/basic/mount-util.c @@ -591,6 +591,18 @@ bool fstype_is_ro(const char *fstype) { return nulstr_contains(table, fstype); } +bool fstype_can_discard(const char *fstype) { + + static const char table[] = + "btrfs\0" + "ext4\0" + "vfat\0" + "xfs\0" + ; + + return nulstr_contains(table, fstype); +} + int repeat_unmount(const char *path, int flags) { bool done = false; |