Files
Maevi 3126d71478 treewide: remove exec bit from files that don't need it
find . -type f -executable ! -name '*.sh' -exec grep -L '^#!' {} \; | xargs chmod a-x
2026-01-16 15:42:35 +01:00

25 lines
537 B
C

#include <stdio.h>
#include <string.h>
#include <unistd.h>
static const char from[] = "/usr/lib/ext/dell/omreg.cfg";
static const char to[] = "@to@";
int access_wrapper(const char *fn, int mode)
{
if (!strcmp(fn, from)) {
printf("access_wrapper.c: Replacing path '%s' with '%s'\n", from, to);
fn = to;
}
return access(fn, mode);
}
FILE* fopen_wrapper(const char* fn, const char* mode)
{
if (!strcmp(fn, from)) {
printf("fopen_wrapper.c: Replacing path '%s' with '%s'\n", from, to);
fn = to;
}
return fopen(fn, mode);
}