biome: 1.9.2 -> 1.9.3
[NixPkgs.git] / pkgs / tools / system / dell-command-configure / wrapper-lib.c
blobf93bcd58ab75173b40a658de0c28255c356f63b8
1 #include <stdio.h>
2 #include <string.h>
4 static const char from[] = "/usr/lib/ext/dell/omreg.cfg";
5 static const char to[] = "@to@";
7 int access_wrapper(const char *fn, int mode)
9 if (!strcmp(fn, from)) {
10 printf("access_wrapper.c: Replacing path '%s' with '%s'\n", from, to);
11 fn = to;
13 return access(fn, mode);
16 FILE* fopen_wrapper(const char* fn, const char* mode)
18 if (!strcmp(fn, from)) {
19 printf("fopen_wrapper.c: Replacing path '%s' with '%s'\n", from, to);
20 fn = to;
22 return fopen(fn, mode);