From: Mike Frysinger Date: Wed, 9 Sep 2009 10:54:38 -0400 Subject: [U-Boot] [PATCH] tools/netconsole: make a bit more robust and use ncb when possible In-Reply-To: <20090909143244.83D34832E8DE@gemini.denx.de> References: <1231493902-7043-1-git-send-email-vapier@gentoo.org> <200909091015.05454.vapier@gentoo.org> <20090909143244.83D34832E8DE@gemini.denx.de> Message-ID: <200909091054.39922.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wednesday 09 September 2009 10:32:44 Wolfgang Denk wrote: > Mike Frysinger wrote: > > > 2) "use ncb when possible" > > > > > > Here I really dislike the implementation of "when possible", which > > > makes silent and undocumented assumptions about from which directory > > > the script has to be run. I guess the "when possible" would almost > > > always turn out to be false, so we might omit the patch alltogether, > > > especially since it's also documented in "doc/README.NetConsole". > > > > > > If we add it, we should follow standard UNIX philosophy and assume > > > that you set your PATH accordingly to reach the tools you want to use. > > > > since ncb is compiled whenever netconsole is enabled, and people > > typically use this script with netconsole enabled, "when possible" tends > > to be line up fairly often. also, the broadcast aspect is pretty useful. > > i guess i could > > Agreed. But the code is based on the assumption that your current > directory when attaching to the console of a target is the U-Boot > source directory. For me, this is definitely not always the case. I > might as well have /tftpboot or solilar as cwd. it takes multiple steps. first, the cwd and then based on argv0. so even if you're in a different place, if the script lives in the source tree when you execute it, it'll work fine. > > make it search PATH, but the idea was to have things "just work" rather > > than forcing people to install random utils into their PATH. > > I rather have people intentionally install tools to some directory in > their PATH or set PATH intentionally to some tool directory rather > than have tools suddenly and mysteriously break just because I run > them from a different location. if they're both installed into the same place, then it'll still work. i can add a PATH search in place of the cwd one as the argv0+PATH should handle both cases fine. -mike -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: This is a digitally signed message part. Url : http://lists.denx.de/pipermail/u-boot/attachments/20090909/e0e07d43/attachment.pgp