is_{temporary,network}_fs() looked like they are incorrectly casting an error
to true, but actually the return type is misdeclared.
return 0;
}
-int fs_in_group(const struct statfs *s, FilesystemGroups fs_group) {
+bool fs_in_group(const struct statfs *s, FilesystemGroups fs_group) {
const char *fs;
int r;
const statfs_f_type_t *magic;
r = fs_type_from_string(fs, &magic);
- if (r == 0) {
+ if (r >= 0)
for (size_t i = 0; i < FILESYSTEM_MAGIC_MAX; i++) {
if (magic[i] == 0)
break;
if (is_fs_type(s, magic[i]))
return true;
}
- }
}
return false;
const char *fs_type_to_string(statfs_f_type_t magic);
int fs_type_from_string(const char *name, const statfs_f_type_t **ret);
-int fs_in_group(const struct statfs *s, enum FilesystemGroups fs_group);
+bool fs_in_group(const struct statfs *s, enum FilesystemGroups fs_group);
/* gperf prototypes */
const struct FilesystemMagic* filesystems_gperf_lookup(const char *key, GPERF_LEN_TYPE length);