Re: [Qemu-devel] [PATCH v2] add resolutions via command-line

2016-09-20 Thread Benjamin Herrenschmidt
On Tue, 2016-09-20 at 09:51 -0400, G 3 wrote: > > The malloc() function used in this driver is used to allocate a > very   > small amount of space at most. We are realistically talking under > 2k.   > Running out of space is highly unlikely. I'm sure the user could do   > something evil to try to

Re: [Qemu-devel] [PATCH v2] add resolutions via command-line

2016-09-20 Thread Benjamin Herrenschmidt
On Tue, 2016-09-20 at 09:51 -0400, G 3 wrote: >  > > Is it worth renaming this to make it obvious that it is your > > (non-optimal) replacement, intentionally because you don't want to > > use > > the libc version? > > I originally thought about adding a prefix to all my functions. Ben   > what do

Re: [Qemu-devel] [PATCH v2] add resolutions via command-line

2016-09-20 Thread G 3
On Sep 20, 2016, at 9:37 AM, Eric Blake wrote: On 09/19/2016 11:28 PM, G 3 wrote: Add the ability to add resolutions from the command-line. This patch works by looking for a property called 'resolutions' in the options node of OpenBIOS. If it is found all the resolutions are parsed and loaded.

Re: [Qemu-devel] [PATCH v2] add resolutions via command-line

2016-09-20 Thread Eric Blake
On 09/19/2016 11:28 PM, G 3 wrote: > Add the ability to add resolutions from the command-line. This patch > works by > looking for a property called 'resolutions' in the options node of > OpenBIOS. > If it is found all the resolutions are parsed and loaded. > > +/* strlen() implementation */ > +s

Re: [Qemu-devel] [PATCH v2] add resolutions via command-line

2016-09-20 Thread G 3
On Sep 20, 2016, at 5:01 AM, Benjamin Herrenschmidt wrote: On Tue, 2016-09-20 at 00:28 -0400, G 3 wrote: + RegEntryID *entry_id; + OSErr err; + OSStatus os_status = noErr; + Boolean is_done; + void *value; + RegPropertyValueSize property_size = -1; + i

Re: [Qemu-devel] [PATCH v2] add resolutions via command-line

2016-09-20 Thread Benjamin Herrenschmidt
Also .. your patch was all HTML and email-damaged... On Tue, 2016-09-20 at 19:01 +1000, Benjamin Herrenschmidt wrote: > On Tue, 2016-09-20 at 00:28 -0400, G 3 wrote: > > > + RegEntryID *entry_id; > > + OSErr err; > > + OSStatus os_status = noErr; > > + Boolean is_done; > > + void *value

Re: [Qemu-devel] [PATCH v2] add resolutions via command-line

2016-09-20 Thread Benjamin Herrenschmidt
On Tue, 2016-09-20 at 00:28 -0400, G 3 wrote: > + RegEntryID *entry_id; > + OSErr err; > + OSStatus os_status = noErr; > + Boolean is_done; > + void *value; > + RegPropertyValueSize property_size = -1; > + int index, res_set_count; > + char *set_str; > + > + #def

[Qemu-devel] [PATCH v2] add resolutions via command-line

2016-09-19 Thread G 3
Add the ability to add resolutions from the command-line. This patch works by looking for a property called 'resolutions' in the options node of OpenBIOS. If it is found all the resolutions are parsed and loaded. Example command-line: -prom-env resolutions=512x342,640x480,800x600,1024x600,12