Mercurial > archived > louis > perso > liblxcstats
diff utils.c @ 7:8339ab15527d
Add running/stopped containers global statistics and refactor some things
author | Louis Opter <louis@dotcloud.com> |
---|---|
date | Sat, 01 Jan 2011 17:46:40 +0100 |
parents | 50215911acb3 |
children | 3a1977ecccc7 |
line wrap: on
line diff
--- a/utils.c Sat Jan 01 16:18:17 2011 +0100 +++ b/utils.c Sat Jan 01 17:46:40 2011 +0100 @@ -29,15 +29,12 @@ } int -_lxcst_isdir(const struct _lxcst_controller *hdl, const struct dirent *d) +_lxcst_isdir(const char *path) { struct stat sb; - char buf[PATH_MAX]; - _lxcst_join_path(buf, sizeof(buf), hdl->cgroup_dir, d->d_name); - - if (stat(buf, &sb) == -1) { - warn("can't stat file: %s", buf); + if (stat(path, &sb) == -1) { + warn("can't stat path: %s", path); return (0); }