projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use CLOCK_MONOTONIC if we can
[fio.git]
/
cgroup.c
diff --git
a/cgroup.c
b/cgroup.c
index f36683aeacf311561c6ba768565361c547fcd9bf..de00d986eb05246b25e853c3af524149f1b53e22 100644
(file)
--- a/
cgroup.c
+++ b/
cgroup.c
@@
-22,7
+22,8
@@
struct cgroup_member {
static char *find_cgroup_mnt(struct thread_data *td)
{
char *mntpoint = NULL;
static char *find_cgroup_mnt(struct thread_data *td)
{
char *mntpoint = NULL;
- struct mntent *mnt;
+ struct mntent *mnt, dummy;
+ char buf[256] = {0};
FILE *f;
f = setmntent("/proc/mounts", "r");
FILE *f;
f = setmntent("/proc/mounts", "r");
@@
-31,7
+32,7
@@
static char *find_cgroup_mnt(struct thread_data *td)
return NULL;
}
return NULL;
}
- while ((mnt = getmntent
(f
)) != NULL) {
+ while ((mnt = getmntent
_r(f, &dummy, buf, sizeof(buf)
)) != NULL) {
if (!strcmp(mnt->mnt_type, "cgroup") &&
strstr(mnt->mnt_opts, "blkio"))
break;
if (!strcmp(mnt->mnt_type, "cgroup") &&
strstr(mnt->mnt_opts, "blkio"))
break;