Commit 6092e2cc authored by Steffen Vogel's avatar Steffen Vogel 🎅🏼

fix typo and add an example for running in privileged mode

parent 656f990b
...@@ -255,8 +255,10 @@ int kernel_set_nr_hugepages(int nr) ...@@ -255,8 +255,10 @@ int kernel_set_nr_hugepages(int nr)
f = fopen(PROCFS_PATH "/sys/vm/nr_hugepages", "w"); f = fopen(PROCFS_PATH "/sys/vm/nr_hugepages", "w");
if (!f){ if (!f){
if (access("/.dockerenv", F_OK) != -1) if (access("/.dockerenv", F_OK) != -1) {
warning("This functionality is unavilable in this mode. Please run in the privileged mode."); warning("This functionality is unavailable in this mode. Please run the Docker container in the privileged mode:");
warning(" $ docker run --privilged ...");
else else
serror("Failed to open %s", PROCFS_PATH "/sys/vm/nr_hugepages"); serror("Failed to open %s", PROCFS_PATH "/sys/vm/nr_hugepages");
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment