Skip to content

Commit

Permalink
Add support for SIOCGMIIREG ioctl.
Browse files Browse the repository at this point in the history
  • Loading branch information
bernhardu authored and rocallahan committed May 2, 2024
1 parent f0e3bc3 commit 5c06010
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/record_syscall.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1713,6 +1713,7 @@ static Switchable prepare_ioctl(RecordTask* t,
case SIOCGIFMETRIC:
case SIOCGIFMAP:
case SIOCGMIIPHY:
case SIOCGMIIREG:
syscall_state.reg_parameter<typename Arch::ifreq>(3);
syscall_state.after_syscall_action(record_page_below_stack_ptr);
return PREVENT_SWITCH;
Expand Down
4 changes: 4 additions & 0 deletions src/test/sioc.c
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,10 @@ int main(void) {
atomic_printf("flags is %d\n", req->ifr_ifru.ifru_flags);
}

if (GENERIC_REQUEST_BY_NAME(SIOCGMIIREG)) {
atomic_printf("flags is %d\n", req->ifr_ifru.ifru_flags);
}

atomic_puts("EXIT-SUCCESS");
return 0;
}

0 comments on commit 5c06010

Please sign in to comment.