eal: do not create runtime dir in --no-shconf mode
authorAnatoly Burakov <anatoly.burakov@intel.com>
Fri, 13 Jul 2018 12:48:01 +0000 (13:48 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Fri, 13 Jul 2018 13:33:51 +0000 (15:33 +0200)
Now that the rest of the EAL is adjusted to not create any shared
files, prevent runtime directory from ever being created.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
lib/librte_eal/bsdapp/eal/eal.c
lib/librte_eal/linuxapp/eal/eal.c

index f70f7ae..73cdf07 100644 (file)
@@ -601,7 +601,8 @@ rte_eal_init(int argc, char **argv)
        }
 
        /* create runtime data directory */
-       if (eal_create_runtime_dir() < 0) {
+       if (internal_config.no_shconf == 0 &&
+                       eal_create_runtime_dir() < 0) {
                rte_eal_init_alert("Cannot create runtime directory\n");
                rte_errno = EACCES;
                return -1;
index 3c0449c..d75ae9d 100644 (file)
@@ -832,7 +832,8 @@ rte_eal_init(int argc, char **argv)
        }
 
        /* create runtime data directory */
-       if (eal_create_runtime_dir() < 0) {
+       if (internal_config.no_shconf == 0 &&
+                       eal_create_runtime_dir() < 0) {
                rte_eal_init_alert("Cannot create runtime directory\n");
                rte_errno = EACCES;
                return -1;