File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed
Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change 33#include <sys/mount.h>
44
55#ifdef __FreeBSD__
6+ #include "util/stringUtils.h"
7+
68static void detectFsInfo (struct statfs * fs , FFDisk * disk )
79{
8- if (
9- ffStrbufStartsWithS (& disk -> mountpoint , "/boot" ) ||
10- ffStrbufStartsWithS (& disk -> mountpoint , "/dev" ) ||
11- ffStrbufStartsWithS (& disk -> mountpoint , "/var" ) ||
12- ffStrbufStartsWithS (& disk -> mountpoint , "/tmp" ) ||
13- ffStrbufStartsWithS (& disk -> mountpoint , "/proc" ) ||
14- ffStrbufStartsWithS (& disk -> mountpoint , "/zroot" ) ||
15- ffStrbufStartsWithS (& disk -> mountpoint , "/compat/linux/" )
16- )
10+ if (ffStrbufEqualS (& disk -> filesystem , "zfs" ))
11+ {
12+ disk -> type = !ffStrStartsWith (fs -> f_mntfromname , "zroot/" ) || ffStrStartsWith (fs -> f_mntfromname , "zroot/ROOT/" )
13+ ? FF_DISK_TYPE_REGULAR_BIT
14+ : FF_DISK_TYPE_SUBVOLUME_BIT ;
15+ }
16+ else if (!ffStrStartsWith (fs -> f_mntfromname , "/dev/" ))
1717 disk -> type = FF_DISK_TYPE_HIDDEN_BIT ;
18- else if (( fs -> f_flags & MNT_NOSUID ) || !(fs -> f_flags & MNT_LOCAL ))
18+ else if (!(fs -> f_flags & MNT_LOCAL ))
1919 disk -> type = FF_DISK_TYPE_EXTERNAL_BIT ;
2020 else
2121 disk -> type = FF_DISK_TYPE_REGULAR_BIT ;
You can’t perform that action at this time.
0 commit comments