Patchwork [10/10] Fix incorrect comparision in get_params

login
register
mail settings
Submitter Anton Blanchard
Date April 11, 2010, 4:06 a.m.
Message ID <20100411040657.GG11751@kryten>
Download mbox | patch
Permalink /patch/57976/
State Changes Requested
Headers show

Comments

Anton Blanchard - April 11, 2010, 4:06 a.m.
We were comparing the first character of manualinitrd with a string. Not sure
how this ever worked.

Signed-off-by: Anton Blanchard <anton@samba.org>
---

Patch

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