Commit 656f990b authored by root's avatar root Committed by Divya Laxetti
Browse files

docker changes

parent 39e23fc9
......@@ -253,8 +253,17 @@ 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 unavilable in this mode. Please run in the privileged mode.");
serror("Failed to open %s", PROCFS_PATH "/sys/vm/nr_hugepages");
fprintf(f, "%d\n", nr);
Supports Markdown
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