[PATCH:libpciaccess] Solaris: Give better error on realloc failure

Alan Coopersmith alan.coopersmith at oracle.com
Thu Oct 6 21:11:25 PDT 2011


On 10/ 5/11 01:19 AM, Mark Kettenis wrote:
>> From: Alan Coopersmith<alan.coopersmith at oracle.com>
>> Date: Tue,  4 Oct 2011 22:53:20 -0700
>>
>> commit a18460b385ae03 converted from a fixed maximum number of devices
>> to dynamically growing the list via realloc, but didn't update the
>> error message shown on failure.
>
> Hmm, I hate libraries that print messages on stderr like this.  But
> printing half-truths is even worse.

I suppose we could add an Error Handler api to libpciaccess to allow
callers to specify a function to pass a message to - and it wouldn't
be a complete waste, since 50% of the callers I know of would use it.
(scanpci would just leave it with fprintf(stderr), but Xorg would be
  better served passing it to the log API so it's captured in the log.)

That's a different patch though.

-- 
	-Alan Coopersmith-        alan.coopersmith at oracle.com
	 Oracle Solaris Platform Engineering: X Window System



More information about the xorg-devel mailing list