Using the same logic as in DPDK's EAL, get the DPDK runtime directory based on the file-prefix and user
(fp)
| 74 | |
| 75 | |
| 76 | def get_dpdk_runtime_dir(fp): |
| 77 | """ Using the same logic as in DPDK's EAL, get the DPDK runtime directory |
| 78 | based on the file-prefix and user """ |
| 79 | run_dir = os.environ.get('RUNTIME_DIRECTORY') |
| 80 | if not run_dir: |
| 81 | if (os.getuid() == 0): |
| 82 | run_dir = '/var/run' |
| 83 | else: |
| 84 | run_dir = os.environ.get('XDG_RUNTIME_DIR', '/tmp') |
| 85 | return os.path.join(run_dir, 'dpdk', fp) |
| 86 | |
| 87 | |
| 88 | def list_fp(): |
no outgoing calls
no test coverage detected