Commit 04c94c4f authored by Steffen Vogel's avatar Steffen Vogel 🎅🏼

Merge branch 'develop' of git.rwth-aachen.de:acs/public/villas/VILLAScommon into develop

parents d5e0a290 38e66114
......@@ -253,8 +253,15 @@ int kernel_set_nr_hugepages(int nr)
FILE *f;
f = fopen(PROCFS_PATH "/sys/vm/nr_hugepages", "w");
if (!f)
serror("Failed to open %s", PROCFS_PATH "/sys/vm/nr_hugepages");
if (!f) {
if (access("/.dockerenv", F_OK) != -1) {
warning("This functionality is unavailable in this mode. Please run the Docker container in the privileged mode:");
warning(" $ docker run --privilged ...");
}
else
serror("Failed to open %s", PROCFS_PATH "/sys/vm/nr_hugepages");
}
fprintf(f, "%d\n", nr);
fclose(f);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment