[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:
@@ -42,11 +42,9 @@ PXENV_EXIT_t undi_loader ( struct s_UNDI_LOADER *undi_loader ) {
|
||||
|
||||
/* Fill in UNDI loader structure */
|
||||
undi_loader->PXEptr.segment = rm_cs;
|
||||
undi_loader->PXEptr.offset =
|
||||
( ( unsigned ) & __from_text16 ( ppxe ) );
|
||||
undi_loader->PXEptr.offset = __from_text16 ( &ppxe );
|
||||
undi_loader->PXENVptr.segment = rm_cs;
|
||||
undi_loader->PXENVptr.offset =
|
||||
( ( unsigned ) & __from_text16 ( pxenv ) );
|
||||
undi_loader->PXENVptr.offset = __from_text16 ( &pxenv );
|
||||
|
||||
undi_loader->Status = PXENV_STATUS_SUCCESS;
|
||||
return PXENV_EXIT_SUCCESS;
|
||||
|
||||
Reference in New Issue
Block a user