*/
static int get_cgroup_mount(const char *subsystem, char *mnt)
{
- struct mntent *mntent, mntent_r;
+ struct mntent mntent_r;
FILE *file = NULL;
int ret, err = -1;
return -1;
}
- while ((mntent = getmntent_r(file, &mntent_r, buf, sizeof(buf)))) {
+ while ((getmntent_r(file, &mntent_r, buf, sizeof(buf)))) {
if (strcmp(mntent_r.mnt_type, "cgroup") != 0)
continue;
static int create_lxcgroups(const char *lxcgroup)
{
FILE *file = NULL;
- struct mntent *mntent, mntent_r;
+ struct mntent mntent_r;
int ret, retv = -1;
char path[MAXPATHLEN];
return -1;
}
- while ((mntent = getmntent_r(file, &mntent_r, buf, sizeof(buf)))) {
+ while ((getmntent_r(file, &mntent_r, buf, sizeof(buf)))) {
if (strcmp(mntent_r.mnt_type, "cgroup"))
continue;
char *retpath, path[MAXPATHLEN];
char tail[12];
FILE *file = NULL;
- struct mntent *mntent, mntent_r;
+ struct mntent mntent_r;
char buf[LARGE_MAXPATHLEN] = {0};
else
*tail = '\0';
- while ((mntent = getmntent_r(file, &mntent_r, buf, sizeof(buf)))) {
+ while ((getmntent_r(file, &mntent_r, buf, sizeof(buf)))) {
if (strcmp(mntent_r.mnt_type, "cgroup"))
continue;
{
char path[MAXPATHLEN];
FILE *file = NULL, *fout;
- struct mntent *mntent, mntent_r;
+ struct mntent mntent_r;
int ret, retv = -1;
char buf[LARGE_MAXPATHLEN] = {0};
return -1;
}
- while ((mntent = getmntent_r(file, &mntent_r, buf, sizeof(buf)))) {
+ while ((getmntent_r(file, &mntent_r, buf, sizeof(buf)))) {
if (strcmp(mntent_r.mnt_type, "cgroup"))
continue;
if (!mount_has_subsystem(&mntent_r))
*/
int lxc_cgroup_destroy(const char *cgpath)
{
- struct mntent *mntent, mntent_r;
+ struct mntent mntent_r;
FILE *file = NULL;
int err, retv = 0;
return -1;
}
- while ((mntent = getmntent_r(file, &mntent_r, buf, sizeof(buf)))) {
+ while ((getmntent_r(file, &mntent_r, buf, sizeof(buf)))) {
if (strcmp(mntent_r.mnt_type, "cgroup"))
continue;
if (!mount_has_subsystem(&mntent_r))