warnings: Add explict casts to silence many compiler warnings about sign comparisions. Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Be explicit in order of evaluation in the reiserfs code GCC Has helpfully pointed out that we're doing some strange things: second/fs_reiserfs.c: In function ‘block_read’: second/fs_reiserfs.c:219: warning: operation on ‘journal_table’ may be undefined second/fs_reiserfs.c:219: warning: operation on ‘journal_table’ may be undefined second/fs_reiserfs.c:219: warning: operation on ‘journal_table’ may be undefined second/fs_reiserfs.c: In function ‘next_key’: second/fs_reiserfs.c:619: warning: operation on ‘depth’ may be undefined Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Use explicit casts when dumping config data GCC pointes out that we're in a gray area second/cfg.c: In function ‘cfg_reset’: second/cfg.c:437: warning: format ‘%s’ expects type ‘char *’, but argument 3 has type ‘void *’ second/cfg.c:442: warning: format ‘%s’ expects type ‘char *’, but argument 3 has type ‘void *’ Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Add/Correct libgcc function prototypes Add a prototype for ffs() from libgcc. Instead of using log2 in reisrfs which has a different prototype to the one libgcc, call the function reiser_log2() Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Save arguments as well as image name for CAS reboot We were saving the image name that the user had typed (or had been selected by default) in the "boot-last-label" property, but we were losing any extra arguments that the user had typed after the image name. On a pSeries machine, if the firmware decides to do a reboot at the client-architecture-support call, we were then rebooting to the right image but without any extra arguments that the user typed. This fixes the problem by saving the arguments in boot-last-label, separated from the image name by a space. When we use the value of boot-last-label, we now call word_split to separate it into the image name and arguments again. Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Treat iSCSI targets as block devices. Currently iSCSI targets are treated as network devices, this doesn't always work firmware is capable of treating them like block devices which seems more reliable. Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Avoid stack smash in parseing the vendor specific options. For yaboot we only really care about DHCP options that are alos IPv4 addresses. Limit the memcpy() to 32bits. Also we don't use the DHCP_DNS tag so remove it from the enum. Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Link yaboot at 1MB Give ourselves another 1MB of available space by moving yaboot down to 1MB. With load-base at 0x4000, our yaboot image would have to be 1MB-0x4000 before we should encounter problems (because firmware would have issues relocating us from 0x4000 to 1MB). Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Allocate kernel and ramdisk as low as possible We currently start the search for free memory for the kernel at 12MB. This made sense back when firmware (real-base) was always 12MB, but it doesn't now it is often at 32MB. In light of this and now we have fixed the initrd load issues, just try and allocate the kernel as low as possible. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>