util-lib: rename path_check_fstype to path_is_fs_type

This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2017-11-30 20:43:25 +01:00
parent a66fee2e97
commit 40fd52f28d
4 changed files with 11 additions and 11 deletions
+8 -8
View File
@@ -72,16 +72,16 @@ static void test_path_is_os_tree(void) {
assert_se(path_is_os_tree("/idontexist") == -ENOENT);
}
static void test_path_check_fstype(void) {
static void test_path_is_fs_type(void) {
/* run might not be a mount point in build chroots */
if (path_is_mount_point("/run", NULL, AT_SYMLINK_FOLLOW) > 0) {
assert_se(path_check_fstype("/run", TMPFS_MAGIC) > 0);
assert_se(path_check_fstype("/run", BTRFS_SUPER_MAGIC) == 0);
assert_se(path_is_fs_type("/run", TMPFS_MAGIC) > 0);
assert_se(path_is_fs_type("/run", BTRFS_SUPER_MAGIC) == 0);
}
assert_se(path_check_fstype("/proc", PROC_SUPER_MAGIC) > 0);
assert_se(path_check_fstype("/proc", BTRFS_SUPER_MAGIC) == 0);
assert_se(path_check_fstype("/proc", BTRFS_SUPER_MAGIC) == 0);
assert_se(path_check_fstype("/i-dont-exist", BTRFS_SUPER_MAGIC) == -ENOENT);
assert_se(path_is_fs_type("/proc", PROC_SUPER_MAGIC) > 0);
assert_se(path_is_fs_type("/proc", BTRFS_SUPER_MAGIC) == 0);
assert_se(path_is_fs_type("/proc", BTRFS_SUPER_MAGIC) == 0);
assert_se(path_is_fs_type("/i-dont-exist", BTRFS_SUPER_MAGIC) == -ENOENT);
}
static void test_path_is_temporary_fs(void) {
@@ -96,7 +96,7 @@ int main(int argc, char *argv[]) {
test_files_same();
test_is_symlink();
test_path_is_os_tree();
test_path_check_fstype();
test_path_is_fs_type();
test_path_is_temporary_fs();
return 0;