https://github.com/freebsd/freebsd-src/pull/1221 (commit) is not needed as table_do_modify_record() copies errno into the return value.
Current code grabs errno from a random failed syscall. E.g. in https://lists.freebsd.org/archives/freebsd-current/2025-October/009048.html it gets an Inappropriate ioctl for device error from a isatty() call way up in the calling stack.
The fix is to remove copying completely in table_modify_record()