commands/setpci: Honor write mask argument
In the case that one passes a write mask with ":" the write_mask is obtained from grub_strtoul() and then promptly overwritten by 0xffffffff three lines later. This appears to have been so since the initial version of setpci in 2009. I'm surprised no one else has hit this issue in the past 12 years... Signed-off-by: Wouter van Kesteren <woutershep@gmail.com> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
parent
1ea4e5ef09
commit
e8b98cc66b
@ -311,7 +311,6 @@ grub_cmd_setpci (grub_extcmd_context_t ctxt, int argc, char **argv)
|
||||
write_mask = grub_strtoul (ptr, &ptr, 16);
|
||||
if (grub_errno)
|
||||
return grub_errno;
|
||||
write_mask = 0xffffffff;
|
||||
}
|
||||
regwrite &= write_mask;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user