mirror of
https://github.com/lindbergh-loader/lindbergh-loader.git
synced 2026-10-14 01:49:12 +03:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
be78a23a31 | ||
|
|
8942c510ec |
@@ -305,6 +305,15 @@ int open(const char *pathname, int flags, ...)
|
|||||||
|
|
||||||
int (*_open)(const char *pathname, int flags, ...) = dlsym(RTLD_NEXT, "open");
|
int (*_open)(const char *pathname, int flags, ...) = dlsym(RTLD_NEXT, "open");
|
||||||
|
|
||||||
|
// Attempt to open /dev/dsp and /dev/dsp1
|
||||||
|
if (strcmp(pathname, "/dev/dsp") == 0) {
|
||||||
|
int dspFileDescriptor = _open("/dev/dsp", flags, mode);
|
||||||
|
if(dspFileDescriptor != -1)
|
||||||
|
return dspFileDescriptor;
|
||||||
|
|
||||||
|
return _open("/dev/dsp1", flags, mode);
|
||||||
|
}
|
||||||
|
|
||||||
if (strcmp(pathname, "/dev/lbb") == 0)
|
if (strcmp(pathname, "/dev/lbb") == 0)
|
||||||
{
|
{
|
||||||
hooks[BASEBOARD] = _open(HOOK_FILE_NAME, flags, mode);
|
hooks[BASEBOARD] = _open(HOOK_FILE_NAME, flags, mode);
|
||||||
|
|||||||
Reference in New Issue
Block a user