portx64: pd-extract setups: a few bug fixes and changed how lists are copied

- moved ptrmarkers out of ext_file_bg to common
- function to get ailist length
This commit is contained in:
Raf committed 2024-08-04 18:26:09 +08:00
1 parent 844d6c7ec8
commit 373f08ca3e
4 files changed
+58 -36

No files matched your search

+16
View File
@@ -814,3 +814,19 @@ u32 chraiGetCommandLength(u8 *ailist, u32 aioffset)
return 1;
}
// used by ext_setup
u32 chraiGetAilistLength(u8* list)
{
if (!list) return 0;
u8* cmd = list;
while (true) {
u8 type = cmd[1];
cmd += chraiGetCommandLength(cmd, 0);
if (type == AICMD_END) break;
}
return (u32)(cmd - list);
}