Bug 39745
Summary: | Xconfigurator --kickstart fails to read video memory size | ||
---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | Fred Feirtag <ffeirtag> |
Component: | Xconfigurator | Assignee: | Mike A. Harris <mharris> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | David Lawrence <dkl> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.1 | CC: | edoutreleau, genoma, redhat.com |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | i386 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2004-01-10 15:23:51 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Fred Feirtag
2001-05-09 00:17:56 UTC
The patch I previously entered works, but the following patch is more correct. Overall, even if the problem of having X report with an unexpected colon character is not widespread among all possible video cards, the search pattern used in processing the "kB" of video memory string should EXACTLY match the search of the prior grep--anything else would seem to introduce unnecessary risk. The card I have with X reporting: (--) ATI(0): 8192 kB of SDRAM (1:1) detected. is (lspci) 01:00.0 VGA compatible controller: ATI Technologies Inc 3D Rage Pro AGP 1X/2X (rev 5c) Revised suggested patch: --- Xconfigurator.c Thu May 10 19:20:14 2001 +++ Xconfigurator.c.fixed Thu May 10 19:20:04 2001 @@ -3170,13 +3170,15 @@ f = fopen(tfilenm3, "r"); if (fgets(buf, 8192, f)) { - char *s, *t, *e; + char *s, *e; int vram; - s = strrchr(buf, ':'); - for (s=s+1; *s && !isdigit(*s); s++); - for (t=s; *t && isdigit(*t); t++); - *t = '\0'; + /* locate sentinal, as found in prior grep */ + s = strstr(buf, "kB of S"); + /* enter null byte(s) after size string to make it ASCIZ */ + for (; *(s-1) && ! isdigit(*(s-1)); s--, *s = '\0'); + /* locate the beginning of the size string */ + for (; *(s-1) && isdigit(*(s-1)); s--); vram = strtol(s, &e, 10); if (e != s && *e == 0 && vram > 0) { Hmm, thanks for bringing this to our attention, and doubly so for the patch! I will fix this matter next time I am digging into Xconfigurator. Thanks, again! *** Bug 53598 has been marked as a duplicate of this bug. *** *** Bug 65487 has been marked as a duplicate of this bug. *** *** Bug 64695 has been marked as a duplicate of this bug. *** Bug #64695 has an alternative patch attached also: http://bugzilla.redhat.com/bugzilla/attachment.cgi?id=70164&action=view Xconfigurator never ended up getting any erratum, and is now no longer supported, as all versions of Red Hat Linux which shipped with Xconfigurator are discontinued at the end of December 2003. Since Red Hat Linux 8.0 however, we have replaced Xconfigurator with a new tool "redhat-config-xfree86", which will be renamed soon to "system-config-x" or something similar, so this problem is solved in our current OS releases due to Xconfigurator's obsolescence now. Closing as CURRENTRELEASE. |