mirror of
https://github.com/ish-app/ish.git
synced 2026-01-25 14:06:40 +00:00
Handle calling ioctl on files that don't support ioctl in ptraceomatic
This commit is contained in:
parent
fc185f9550
commit
fb2d8ca810
@ -303,7 +303,7 @@ static void step_tracing(struct cpu_state *cpu, struct tlb *tlb, int pid, int se
|
||||
break;
|
||||
case 54: { // ioctl (god help us)
|
||||
struct fd *fd = f_get(cpu->ebx);
|
||||
if (fd) {
|
||||
if (fd && fd->ops->ioctl_size) {
|
||||
ssize_t ioctl_size = fd->ops->ioctl_size(fd, cpu->ecx);
|
||||
if (ioctl_size >= 0)
|
||||
pt_copy(pid, regs.rdx, ioctl_size);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user