Lines Matching refs:fs
42 _cleanup_free_ char *fs = NULL; in cg_enumerate_items() local
48 r = cg_get_path(controller, path, item, &fs); in cg_enumerate_items()
52 f = fopen(fs, "re"); in cg_enumerate_items()
181 _cleanup_free_ char *fs = NULL; in cg_enumerate_subgroups() local
189 r = cg_get_path(controller, path, NULL, &fs); in cg_enumerate_subgroups()
193 d = opendir(fs); in cg_enumerate_subgroups()
584 int cg_get_path_and_check(const char *controller, const char *path, const char *suffix, char **fs) { in cg_get_path_and_check() argument
588 assert(fs); in cg_get_path_and_check()
608 return cg_get_path(controller, path, suffix, fs); in cg_get_path_and_check()
612 _cleanup_free_ char *fs = NULL; in cg_set_xattr() local
619 r = cg_get_path(controller, path, NULL, &fs); in cg_set_xattr()
623 return RET_NERRNO(setxattr(fs, name, value, size, flags)); in cg_set_xattr()
627 _cleanup_free_ char *fs = NULL; in cg_get_xattr() local
634 r = cg_get_path(controller, path, NULL, &fs); in cg_get_xattr()
638 n = getxattr(fs, name, value, size); in cg_get_xattr()
646 _cleanup_free_ char *fs = NULL; in cg_get_xattr_malloc() local
652 r = cg_get_path(controller, path, NULL, &fs); in cg_get_xattr_malloc()
656 r = lgetxattr_malloc(fs, name, ret); in cg_get_xattr_malloc()
678 _cleanup_free_ char *fs = NULL; in cg_remove_xattr() local
684 r = cg_get_path(controller, path, NULL, &fs); in cg_remove_xattr()
688 return RET_NERRNO(removexattr(fs, name)); in cg_remove_xattr()
693 const char *fs, *controller_str = NULL; /* avoid false maybe-uninitialized warning */ in cg_pid_get_path() local
715 fs = procfs_file_alloca(pid, "cgroup"); in cg_pid_get_path()
716 r = fopen_unlocked(fs, "re", &f); in cg_pid_get_path()
776 _cleanup_free_ char *fs = NULL, *contents = NULL; in cg_install_release_agent() local
788 r = cg_get_path(controller, NULL, "release_agent", &fs); in cg_install_release_agent()
792 r = read_one_line_file(fs, &contents); in cg_install_release_agent()
798 r = write_string_file(fs, agent, WRITE_STRING_FILE_DISABLE_BUFFER); in cg_install_release_agent()
804 fs = mfree(fs); in cg_install_release_agent()
805 r = cg_get_path(controller, NULL, "notify_on_release", &fs); in cg_install_release_agent()
810 r = read_one_line_file(fs, &contents); in cg_install_release_agent()
816 r = write_string_file(fs, "1", WRITE_STRING_FILE_DISABLE_BUFFER); in cg_install_release_agent()
830 _cleanup_free_ char *fs = NULL; in cg_uninstall_release_agent() local
839 r = cg_get_path(controller, NULL, "notify_on_release", &fs); in cg_uninstall_release_agent()
843 r = write_string_file(fs, "0", WRITE_STRING_FILE_DISABLE_BUFFER); in cg_uninstall_release_agent()
847 fs = mfree(fs); in cg_uninstall_release_agent()
849 r = cg_get_path(controller, NULL, "release_agent", &fs); in cg_uninstall_release_agent()
853 r = write_string_file(fs, "", WRITE_STRING_FILE_DISABLE_BUFFER); in cg_uninstall_release_agent()
1692 _cleanup_free_ char *fs = NULL, *contents = NULL; in cg_is_threaded() local
1696 r = cg_get_path(controller, path, "cgroup.type", &fs); in cg_is_threaded()
1700 r = read_full_virtual_file(fs, &contents, NULL); in cg_is_threaded()
2093 struct statfs fs; in cg_unified_cached() local
2105 if (statfs("/sys/fs/cgroup/", &fs) < 0) in cg_unified_cached()
2108 if (F_TYPE_EQUAL(fs.f_type, CGROUP2_SUPER_MAGIC)) { in cg_unified_cached()
2111 } else if (F_TYPE_EQUAL(fs.f_type, TMPFS_MAGIC)) { in cg_unified_cached()
2112 if (statfs("/sys/fs/cgroup/unified/", &fs) == 0 && in cg_unified_cached()
2113 F_TYPE_EQUAL(fs.f_type, CGROUP2_SUPER_MAGIC)) { in cg_unified_cached()
2118 if (statfs("/sys/fs/cgroup/systemd/", &fs) < 0) { in cg_unified_cached()
2127 if (F_TYPE_EQUAL(fs.f_type, CGROUP2_SUPER_MAGIC)) { in cg_unified_cached()
2131 } else if (F_TYPE_EQUAL(fs.f_type, CGROUP_SUPER_MAGIC)) { in cg_unified_cached()
2136 (unsigned long long) fs.f_type); in cg_unified_cached()
2140 } else if (F_TYPE_EQUAL(fs.f_type, SYSFS_MAGIC)) { in cg_unified_cached()
2146 (unsigned long long)fs.f_type); in cg_unified_cached()