Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 717675 Details for
Bug 928809
LRMI_common_init() returns NULL for the success case
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Separate success/failure indicator from the returned pointer
libx86-return-error.patch (text/plain), 2.39 KB, created by
Zoltan Boszormenyi
on 2013-03-28 13:55:48 UTC
(
hide
)
Description:
Separate success/failure indicator from the returned pointer
Filename:
MIME Type:
Creator:
Zoltan Boszormenyi
Created:
2013-03-28 13:55:48 UTC
Size:
2.39 KB
patch
obsolete
>diff -durpN libx86-1.1.orig/lrmi.c libx86-1.1/lrmi.c >--- libx86-1.1.orig/lrmi.c 2013-03-28 09:41:55.115651473 +0100 >+++ libx86-1.1/lrmi.c 2013-03-28 13:14:57.000000000 +0100 >@@ -136,7 +136,7 @@ LRMI_init(void) > if (context.ready) > return 1; > >- if (!LRMI_common_init(0)) >+ if (!LRMI_common_init(0, NULL)) > return 0; > > /* >diff -durpN libx86-1.1.orig/thunk.c libx86-1.1/thunk.c >--- libx86-1.1.orig/thunk.c 2013-03-28 09:41:55.116651480 +0100 >+++ libx86-1.1/thunk.c 2013-03-28 13:15:56.000000000 +0100 >@@ -139,9 +139,7 @@ int LRMI_init() { > int i; > X86EMU_intrFuncs intFuncs[256]; > >- mmap_addr = LRMI_common_init(1); >- >- if (!mmap_addr) >+ if (!LRMI_common_init(1, &mmap_addr)) > return 0; > > X86EMU_pioFuncs pioFuncs = { >diff -durpN libx86-1.1.orig/x86-common.c libx86-1.1/x86-common.c >--- libx86-1.1.orig/x86-common.c 2013-03-28 09:41:55.116651480 +0100 >+++ libx86-1.1/x86-common.c 2013-03-28 13:21:32.000000000 +0100 >@@ -205,15 +205,15 @@ get_int_off(int i) > return *(unsigned short *)(i * 4); > } > >-void *LRMI_common_init(int high_page) >+int LRMI_common_init(int high_page, void **mem_addr) > { > void *m, *offset; > int fd_mem; > > if (!real_mem_init(high_page)) >- return NULL; >+ return 0; > >- offset = mem_info.offset - REAL_MEM_BASE; >+ offset = mem_info.offset - (long)REAL_MEM_BASE; > > /* > Map the Interrupt Vectors (0x0 - 0x400) + BIOS data (0x400 - 0x502) >@@ -224,7 +224,7 @@ void *LRMI_common_init(int high_page) > if (fd_mem == -1) { > real_mem_deinit(); > perror("open /dev/mem"); >- return NULL; >+ return 0; > } > > m = mmap(offset, 0x502, >@@ -235,7 +235,7 @@ void *LRMI_common_init(int high_page) > close(fd_mem); > real_mem_deinit(); > perror("mmap /dev/mem"); >- return NULL; >+ return 0; > } > > m = mmap(offset+0xa0000, 0x100000 - 0xa0000, >@@ -247,10 +247,13 @@ void *LRMI_common_init(int high_page) > close(fd_mem); > real_mem_deinit(); > perror("mmap /dev/mem"); >- return NULL; >+ return 0; > } > > close(fd_mem); > >- return offset; >+ if (mem_addr) >+ *mem_addr = offset; >+ >+ return 1; > } >diff -durpN libx86-1.1.orig/x86-common.h libx86-1.1/x86-common.h >--- libx86-1.1.orig/x86-common.h 2013-03-28 09:41:55.117651487 +0100 >+++ libx86-1.1/x86-common.h 2013-03-28 13:12:27.000000000 +0100 >@@ -40,4 +40,4 @@ OTHER DEALINGS IN THE SOFTWARE. > > void *LRMI_alloc_real(int size); > void LRMI_free_real(void *m); >-void *LRMI_common_init(int high_page); >+int LRMI_common_init(int high_page, void **mem_addr);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 928809
: 717675