Bug#406853: updated patch for 5.8.16 take 2

Thibaut VARENE T-Bone at parisc-linux.org
Sun Mar 4 23:59:26 CET 2007


Hi,

The attached patch is an update over the previous one
(http://bugs.debian.org/406853#35 - sending to boinc_dev this time). It's
relatively ugly, unfortunately it's not easy to deal with proc/cpuinfo
without being so.

This patch does the following:
- Address a regression by witch all alpha and mips machines would have
been assigned a fixed string for vendor or model
- Add the necessary glue for hppa, sparc, ppc and ia64 (working around
for this particular arch a cpuinfo format change in 2.6.19), and modifying
the code in some places to avoid collecting unwanted garbage
- Add a default init value for host.m_cache to '-1' in order to avoid
random cache values for system on which cache info is unavailable

This patch doesn't fix the bug I reported in a previous mail, by which
host.p_model is too small to fit all parsed information.

The patch is relatively self-explanatory, I added a couple comments where
necessary, and people can find various cpuinfo files for testing purposes
here: http://www.pateam.org/archive/tmp/boinc/

The patch has been tested (thanks to the attached test program - which
doesn't do strip_whitespace(), btw) on a range of cpuinfo files coming
from:

ia64 (rx4610, rx2600, zx2000)
ppc (powermac g3 oldworld, powermac g5, CHRP pegasos 2)
alpha (AlphaServer DS10)
sparc (UltraSparc 30)
hppa (A500, B180, rp3440, J6000)

This patch doesn't pretend to be a perfect solution, it's merely trying
to point out potential workarounds. Let me know if this is any useful.

HTH

T-Bone

PS: Please CC-me in replies.

-- 
Thibaut VARENE
http://www.parisc-linux.org/~varenet/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hostinfo_unix-test.c
Type: text/x-csrc
Size: 5740 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/pkg-boinc-devel/attachments/20070304/f964f2a6/hostinfo_unix-test.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: take2-ia64-hppa-ppc-sparc-hostinfo_unix.C.patch
Type: text/x-patch
Size: 5575 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/pkg-boinc-devel/attachments/20070304/f964f2a6/take2-ia64-hppa-ppc-sparc-hostinfo_unix.C.bin


More information about the pkg-boinc-devel mailing list