Lines Matching refs:buf
968 char *buf = calloc(strlen(name) + 32, 1);
969 if (!buf)
971 snprintf(buf, strlen(name) + 32, "%s-%u", name, suffix);
972 current_component = lxc_string_replace("%n", buf, p_eff);
973 free(buf);
1867 char *buf = cgroup_to_absolute_path(mp, path, NULL);
1868 if (!buf)
1873 if (!dir_exists(buf))
1877 r = userns_exec_1(conf, rmdir_wrapper, buf);
1879 r = cgroup_rmdir(buf);
1881 r = rmdir(buf);
1883 r = mkdir_p(buf, 0777);
1885 free(buf);
1906 char *buf;
1933 buf = calloc(len + 1, 1);
1934 if (!buf)
1936 rv = snprintf(buf, len + 1, "%s%s%s", mp->mount_point, path, suffix ? suffix : "");
1938 free(buf);
1943 return buf;
2163 char buf[2];
2173 r = lxc_read_from_file(cc_path, buf, 1);
2174 if (r < 1 || buf[0] != '1') {
2203 r = lxc_read_from_file(cc_path, buf, 1);
2204 if (r == 1 && buf[0] == '1') {
2217 static int cgroup_read_from_file(const char *fn, char buf[], size_t bufsize)
2219 int ret = lxc_read_from_file(fn, buf, bufsize);
2227 buf[bufsize-1] = '\0';
2234 buf[ret] = '\0';