mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-22 22:36:00 +00:00
perf: cache the Steam client's SD library listings in the process
This commit is contained in:
1 parent
e9a7ef5f44
commit
371e87fa31
5 files changed
+547
-1
No files matched your search
@@ -30,6 +30,8 @@
|
||||
#include <sys/socket.h>
|
||||
#include <unistd.h>
|
||||
|
||||
void bl_dircache_created(const char *path) __attribute__((visibility("hidden")));
|
||||
|
||||
#define LINK_FILE "/etc/droiddeck-net"
|
||||
#define LO_NAME "lo"
|
||||
#define LO_INDEX 1
|
||||
@@ -499,6 +501,7 @@ static FILE *open_stream(const char *symbol, const char *path, const char *mode)
|
||||
return copy;
|
||||
}
|
||||
FILE *f = ((fopen_fn) dlsym(RTLD_NEXT, symbol))(path, mode);
|
||||
if (f && mode != NULL && mode[0] != 'r') bl_dircache_created(path);
|
||||
if (f || path == NULL || mode == NULL || mode[0] != 'r') return f;
|
||||
int saved = errno;
|
||||
const char *table = denied_table(path);
|
||||
|
||||
Reference in new issue
Block a user