From patchwork Sun Apr 11 04:06:57 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [10/10] Fix incorrect comparision in get_params Date: Sat, 10 Apr 2010 18:06:57 -0000 From: Anton Blanchard X-Patchwork-Id: 57976 Message-Id: <20100411040657.GG11751@kryten> To: yaboot-devel@lists.ozlabs.org We were comparing the first character of manualinitrd with a string. Not sure how this ever worked. Signed-off-by: Anton Blanchard --- Index: yaboot/second/yaboot.c =================================================================== --- yaboot.orig/second/yaboot.c 2010-04-11 12:05:09.000000000 +1000 +++ yaboot/second/yaboot.c 2010-04-11 12:06:28.000000000 +1000 @@ -981,7 +981,7 @@ int get_params(struct boot_param_t* para /* check if user seted to use a initrd file from boot console */ if (!definitrd && p != manualinitrd) { - if (manualinitrd[0] != "/" && (prom_get_devtype(defdevice_bak) != FILE_DEVICE_NET)) { + if (manualinitrd[0] != '/' && (prom_get_devtype(defdevice_bak) != FILE_DEVICE_NET)) { strcpy(initrdpath, "/"); strcat(initrdpath, manualinitrd); } else