|
Bugzilla – Full Text Bug Listing |
| Summary: | gfxboot could be more big-endian-friendly | ||
|---|---|---|---|
| Product: | [openSUSE] SUSE Linux 10.1 | Reporter: | Colin Watson <cjwatson> |
| Component: | Installation | Assignee: | Steffen Winterfeldt <snwint> |
| Status: | RESOLVED FIXED | QA Contact: | Klaus Kämpf <kkaempf> |
| Severity: | Enhancement | ||
| Priority: | P5 - None | ||
| Version: | Alpha 4 | ||
| Target Milestone: | --- | ||
| Hardware: | BigEndian | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Found By: | Other | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
| Attachments: |
make syslinux detect byte-swapped cpio archives
make gfxboot detect byte-swapped cpio archives fix little-endian assumptions in mkbootmsg |
||
|
Description
Colin Watson
2005-12-19 10:58:53 UTC
Created attachment 61349 [details]
make syslinux detect byte-swapped cpio archives
Created attachment 61350 [details]
make gfxboot detect byte-swapped cpio archives
Created attachment 61351 [details]
fix little-endian assumptions in mkbootmsg
I'll give it a try when I'm back from vacation next year. I'm not convinced about the unsigned char casts, though. isspace() expects an int and won't work on multibyte-sequences anyway, so I don't see a gain in that cast. isspace() does take an int, yes, but the documentation says: These functions check whether c, which must have the value of an unsigned char or EOF, falls into a certain character class according to the current locale. It's basically always correct in C to cast chars to unsigned char before passing them to the ctype functions; it's a common C mistake to fail to do this (http://www.greenend.org.uk/rjk/2001/02/cfu.html#ctypechar). If you rely on C's normal integer promotion rules to promote a signed char to an int, then you'll get incorrect results if you happen to pass character 255 because that's (signed char) -1 and thus will be sign-extended to (int) -1 which is EOF; furthermore, if you pass anything which is a negative signed char other than EOF, the result is undefined. I probably should have separated that from this patch, though, since it affects Linux/i386 more than Linux/powerpc (the latter defaults to unsigned char). I fully agree with you. All I'm saying is it will not make difference in this case. Applied big-endian patches. Will be in gfxboot-3.2.8. |