Eli Zaretskii (eliz@gnu.org) [via djgpp@delorie.com]
2024-04-21 19:13:28 UTC
Reply
PermalinkDate: Sun, 21 Apr 2024 12:24:44 +0200
Hello, I have there a change for __djgpp_map_physical_memory function,
it is improving setting errno in the same way as was done already for
the function __djgpp_set_page_attributes.
Thanks, I have a couple of minor comments below.Hello, I have there a change for __djgpp_map_physical_memory function,
it is improving setting errno in the same way as was done already for
the function __djgpp_set_page_attributes.
+ /* Base address of the memory handle must be page aligned too. */
+ if (d->address & 0xfff)
+ {
+ errno = EFAULT;
I think this should be EINVAL. An unaligned address is not really+ if (d->address & 0xfff)
+ {
+ errno = EFAULT;
"bad address", it's just that it's not valid for this function.
+ case 0x8023: /* Invalid handle (in ESI) */
+ case 0x8025: /* Invalid linear address (specified range is not within specified block or EBX/EDX is not page-aligned) */
+ errno = EFAULT;
These two should also be EINVAL, IMO.+ case 0x8025: /* Invalid linear address (specified range is not within specified block or EBX/EDX is not page-aligned) */
+ errno = EFAULT;