From 175e9328bf9d403c70a0fd3721d1839538558422 Mon Sep 17 00:00:00 2001 From: aszlig Date: Tue, 3 Oct 2017 23:10:21 +0200 Subject: pkgs/sandbox: Implement a path cache First of all this is to bring down the amount of syscalls we're doing but it's also useful to avoid errors when we try to mount a path over an already mounted path. Signed-off-by: aszlig --- pkgs/games/build-support/build-sandbox/src/path-cache.h | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 pkgs/games/build-support/build-sandbox/src/path-cache.h (limited to 'pkgs/games/build-support/build-sandbox/src/path-cache.h') diff --git a/pkgs/games/build-support/build-sandbox/src/path-cache.h b/pkgs/games/build-support/build-sandbox/src/path-cache.h new file mode 100644 index 00000000..368f8d17 --- /dev/null +++ b/pkgs/games/build-support/build-sandbox/src/path-cache.h @@ -0,0 +1,10 @@ +#ifndef _PATH_CACHE_H +#define _PATH_CACHE_H + +typedef void *path_cache; + +path_cache new_path_cache(void); +void free_path_cache(path_cache pc); +bool cache_path(path_cache pc, const char *path); + +#endif -- cgit 1.4.1