mirror of
https://github.com/ipxe/ipxe
synced 2026-01-03 02:13:23 +03:00
[i386] Change semantics of __from_data16 and __from_text16
__from_data16 and __from_text16 now take a pointer to a
.data16/.text16 variable, and return the real-mode offset within the
appropriate segment. This matches the use case for every occurrence
of these macros, and prevents potential future bugs such as that fixed
in commit d51d80f. (The bug arose essentially because "&pointer" is
still syntactically valid.)
This commit is contained in:
@@ -196,8 +196,7 @@ PXENV_EXIT_t pxenv_get_cached_info ( struct s_PXENV_GET_CACHED_INFO
|
||||
* fill it in.
|
||||
*/
|
||||
get_cached_info->Buffer.segment = rm_ds;
|
||||
get_cached_info->Buffer.offset =
|
||||
( unsigned ) ( & __from_data16 ( *info ) );
|
||||
get_cached_info->Buffer.offset = __from_data16 ( info );
|
||||
get_cached_info->BufferSize = sizeof ( *info );
|
||||
DBG ( " returning %04x:%04x+%04x['%x']",
|
||||
get_cached_info->Buffer.segment,
|
||||
|
||||
Reference in New Issue
Block a user