[Rpm-maint] [PATCH] - Added support for ppc64p7 arch (Power7 and higher optimized)
Phil Knirsch
pknirsch at redhat.com
Fri Apr 13 10:25:20 UTC 2012
On 04/12/2012 11:48 AM, Panu Matilainen wrote:
> On 04/11/2012 12:58 PM, Phil Knirsch wrote:
>> Attached is the updated version of the ppc64p7 support patch. I've got
>> rid of the AUXV env reading and doing it properly now via reading and
>> parsing /proc/self/auxv. Additionally the patch now checks if the
>> AT_PLATFORM is power7 or higher via a sscanf(), allowing future power
>> architectures to benefit from it as well.
>
> The patch leaks file descriptors, the fd it opens is never closed.
> In the cosmetics department you might want to split the long if with
> sscanf() into two separate if's (or otherwise reformat) to avoid the
> large line-wrap which is easily avoidable.
>
> Other than that, looks okay to me.
>
> - Panu -
Alright, latest version attached. I've basically extracted the auxv
parsing into a separate function, added a static struct that stores the
info, fixed the fd closing problem and using the struct now in the
defaultMachine().
Thanks & regards, Phil
--
Philipp Knirsch | Tel.: +49-711-96437-470
Supervisor Core Services | Fax.: +49-711-96437-111
Red Hat GmbH | Email: Phil Knirsch <pknirsch at redhat.com>
Hauptstaetterstr. 58 | Web: http://www.redhat.com/
D-70178 Stuttgart, Germany
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Added-support-for-ppc64p7-arch-Power7-and-higher-opt.patch
Type: text/x-patch
Size: 4283 bytes
Desc: not available
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20120413/3b41302e/attachment.bin>
More information about the Rpm-maint
mailing list