From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tommy McCabe Subject: Re: Huh?? [PATCH] Date: Mon, 19 Jul 2004 18:58:04 -0700 (PDT) Sender: linux-8086-owner@vger.kernel.org Message-ID: <20040720015804.29565.qmail@web51301.mail.yahoo.com> References: <20040720013827.95321.qmail@web51306.mail.yahoo.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="0-998456551-1090288684=:29479" Return-path: In-Reply-To: <20040720013827.95321.qmail@web51306.mail.yahoo.com> List-Id: To: linux-8086@vger.kernel.org --0-998456551-1090288684=:29479 Content-Type: text/plain; charset=us-ascii Content-Id: Content-Disposition: inline --- Tommy McCabe wrote: > What the heck is if ((num = sys_execve("/bin/init", > args, 18))) supposed to mean? num is an > uninitialized > variable which could equal anything. > I found out what it means- it's supposed to set num equal to sys_execve and then evaluate if that statement is equal to 0. This, for some reason, is compiled wrong and causes ELKS to hang at "Loading init" at boot. The patch not only makes the intent clearer but fixes the error. > > __________________________________ > Do you Yahoo!? > Vote for the stars of Yahoo!'s next ad campaign! > http://advision.webevents.yahoo.com/yahoo/votelifeengine/ > > - > To unsubscribe from this list: send the line > "unsubscribe linux-8086" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at > http://vger.kernel.org/majordomo-info.html > __________________________________ Do you Yahoo!? Vote for the stars of Yahoo!'s next ad campaign! http://advision.webevents.yahoo.com/yahoo/votelifeengine/ --0-998456551-1090288684=:29479 Content-Type: text/x-diff; name="init.diff" Content-Description: init.diff Content-Disposition: inline; filename="init.diff" --- ./elkscomp/elks/init/main.c 2004-05-31 09:49:25.000000000 -0400 +++ ./elkscurr/elks/init/main.c 2004-07-19 21:44:20.000000000 -0400 @@ -98,8 +98,11 @@ mount_root(); printk("Loading init\n"); - - if ((num = sys_execve("/bin/init", args, 18))) { + + num = sys_execve("/bin/init", args, 18); + + if (num != 0) + { printk("sys_execve(\"/bin/init\",args,18) => %d.\n",num); --0-998456551-1090288684=:29479--