mirror of
https://github.com/Thesola10/umd-livepatch.git
synced 2025-04-20 06:23:22 +00:00
cleanup, add umdiff magic
This commit is contained in:
parent
8c8b71293d
commit
b058056f88
7
main.c
7
main.c
@ -70,6 +70,8 @@ int lp_catchUmdCallback(int cbid)
|
||||
Kprintf("Caught request to register UMD callback 0x%08x\n", cbid);
|
||||
vshCallbackId = cbid;
|
||||
sceKernelNotifyCallback(cbid, PSP_UMD_NOT_PRESENT);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -120,8 +122,9 @@ int lp_discChangeWatcher(SceSize argc, void *argp)
|
||||
REDIRECT_FUNCTION(fn_RegisterUmdCallback, lp_catchUmdCallback);
|
||||
}
|
||||
|
||||
|
||||
sceKernelSleepThreadCB();
|
||||
|
||||
return 1; // This should be unreachable
|
||||
}
|
||||
|
||||
int module_start(SceSize argc, void *argp)
|
||||
@ -164,6 +167,8 @@ int module_stop(void)
|
||||
sceUmdUnRegisterUMDCallBack(umdCallbackId);
|
||||
sceKernelDeleteCallback(umdCallbackId);
|
||||
|
||||
sceKernelDeleteThread(umdCallbackThread);
|
||||
|
||||
// put things back where we found them
|
||||
_sw((u32) &reserveRegisterUmdCallback, fn_RegisterUmdCallback);
|
||||
_sw((u32) &reserveRegisterUmdCallback + 4, fn_RegisterUmdCallback + 4);
|
||||
|
6
umdiff/umdiff.magic
Normal file
6
umdiff/umdiff.magic
Normal file
@ -0,0 +1,6 @@
|
||||
# umdiff: file(1) magic for UMDiff format
|
||||
# URL: https://github.com/thesola10/umd-livepatch
|
||||
0 string \x7fUMDiff UMDiff patch file
|
||||
>0x07 byte 0 v0,
|
||||
>>0x08 belong x %d commands,
|
||||
>>0x0c belong x data starts at offset %d
|
Loading…
x
Reference in New Issue
Block a user