Add support for SerialPortLib that maps into POSIX StdIn and StdOut. Add a device path text to lib as a holding point waiting on getting it reviewed for other packages. Some minor fixes. Also map the FV as writable, so the Variable store becomes writable.
I plan to try and make only the Variable store and logs writable, and make the executable/compressed FV read only in a future checkin. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11760 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -354,18 +354,19 @@ MapFile (
|
||||
VOID *res;
|
||||
UINTN FileSize;
|
||||
|
||||
fd = open (FileName, O_RDONLY);
|
||||
fd = open (FileName, O_RDWR);
|
||||
if (fd < 0) {
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
FileSize = lseek (fd, 0, SEEK_END);
|
||||
|
||||
|
||||
res = MapMemory (fd, FileSize, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_PRIVATE);
|
||||
res = MapMemory (fd, FileSize, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_SHARED);
|
||||
|
||||
close (fd);
|
||||
|
||||
if (res == MAP_FAILED) {
|
||||
if (res == NULL) {
|
||||
perror ("MapFile() Failed");
|
||||
return EFI_DEVICE_ERROR;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user