Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 76181 - radeontool fails with "mmap error" message
Summary: radeontool fails with "mmap error" message
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Mobile Herd (OBSOLETE)
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2004-12-30 15:37 UTC by Vincenzo Romano
Modified: 2005-01-20 04:23 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info output (emerge--info,2.01 KB, text/plain)
2005-01-08 09:28 UTC, Vincenzo Romano
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vincenzo Romano 2004-12-30 15:37:42 UTC
Even running "radeontool --help" gives back the "mmap error" message.

Reproducible: Always
Steps to Reproduce:
1. radeontool --help


Actual Results:  
mmap error



Expected Results:  
The help about command line arguments.

The following patch fixes the problem to me:
--- radeontool.c        2004-12-31 00:32:43.476822439 +0100
+++ radeontool.c.orig   2004-12-31 00:31:55.265222292 +0100
@@ -107,8 +107,7 @@
         mem_fd,
         base
     );
-    if( (void*) device_mem == MAP_FAILED ) {
-    //if ((long)device_mem < 0) {
+    if ((long)device_mem < 0) {
         if(debug)
             fprintf(stderr,"mmap returned %d\n",(int)device_mem);
         fatal("mmap error \n");
Comment 1 Vincenzo Romano 2004-12-30 15:39:16 UTC
Ooops: I reversed the filenames in the diff  command!
--- radeontool.c.orig   2004-12-31 00:31:55.265222292 +0100
+++ radeontool.c        2004-12-31 00:32:43.476822439 +0100
@@ -107,7 +107,8 @@
         mem_fd,
         base
     );
-    if ((long)device_mem < 0) {
+    if( (void*) device_mem == MAP_FAILED ) {
+    //if ((long)device_mem < 0) {
         if(debug)
             fprintf(stderr,"mmap returned %d\n",(int)device_mem);
         fatal("mmap error \n");

Sorry for the inconvenience!
Comment 2 Henrik Brix Andersen 2005-01-02 14:12:17 UTC
Please attach the output of 'emerge --info'.
Comment 3 Henrik Brix Andersen 2005-01-04 03:45:51 UTC
This bug report is awaiting feedback from the reporter.
Comment 4 Vincenzo Romano 2005-01-08 09:28:41 UTC
Created attachment 47946 [details]
emerge --info output

Sorry for the delay;: I was far from my email.
In any case it seems more a thinko in the mmap() return check than an
environment issue.
Comment 5 Henrik Brix Andersen 2005-01-08 09:42:28 UTC
Thank you for reporting back.
Comment 6 Henrik Brix Andersen 2005-01-20 04:23:00 UTC
Thank you for reporting this. I have fixed this in app-laptop/radeontool-1.5-r1 and submitted the patch upstream.