On Wednesday 05 April 2006 23:11, Mattia Dongili wrote: > On Tue, Apr 04, 2006 at 02:39:44AM +0200, Blaisorblade wrote: > > On Sunday 02 April 2006 21:54, Mattia Dongili wrote: > > [...] > > > Thanks for the patch, we'll possibly apply it, but we need to reimplement > > (or copy and fix from glibc) a two-phase execvp(). I've not done it > > because I've felt unconfortable with the idea but it's the better I could > > think of for now. > > Hmm. I see. > > > However, probably the patch can be merged anyway, or at least its idea... > > [...]
> > *) I'd agree with Geert, but you're indeed correct for that... > > *) Saying "19" gets a "NO" > I'm sorry... damn lazy programmers :) > > #define UML_LIB_PATH ":/usr/lib/uml" > what about a config option instead? CONFIG_UML_NET_PATH Don't think so, that's not supposed to be changed according to any config option or I can't see that. Unless on 64-bit system that's /usr/lib64/uml, and in that case it makes sense to have CONFIG_XXX = "/usr/lib/uml" (without :, add them only in the source, i.e. insulate details away). > > 19 -> strlen(UML_LIB_PATH) > > in snprintf, "PATH=%s:/usr/lib/uml" -> "PATH=%s" UML_LIB_PATH > > > > (using string literal concatenation) > here's an updated patch, I added a check for current PATH=="" to avoid > touching the PATH variable when empty (again, kind of keeping the same > behaviour of a clean execvp, I mean it makes no sense to append > /usr/lib/uml and not /bin:/usr/bin too). In that case, you should append both IMHO - empty PATH and no PATH should be treated the same way, I think. I'm not sure we need to cope with such strange settings, but doing it isn't bad. Btw, as a last note - we don't use sizeof(char), I don't know if that size is mandated by the C standard but anyway I've never seen anything like sizeof(char) in the Linux kernel. > Description: > append /usr/lib/uml to the existing PATH environment variable to let > execvp search uml_net in FHS compliant locations. > Signed-off-by: Mattia Dongili <[EMAIL PROTECTED]> -- Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!". Paolo Giarrusso, aka Blaisorblade (Skype ID "PaoloGiarrusso", ICQ 215621894) http://www.user-mode-linux.org/~blaisorblade ___________________________________ Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB http://mail.yahoo.it ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel