Module Name: src Committed By: martin Date: Tue Aug 19 13:30:32 UTC 2014
Modified Files: src/usr.sbin/sysinst: main.c Log Message: if chdir() fails, try chdir / To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/sysinst/main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.sbin/sysinst/main.c diff -u src/usr.sbin/sysinst/main.c:1.4 src/usr.sbin/sysinst/main.c:1.5 --- src/usr.sbin/sysinst/main.c:1.4 Tue Aug 19 13:04:45 2014 +++ src/usr.sbin/sysinst/main.c Tue Aug 19 13:30:32 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.4 2014/08/19 13:04:45 martin Exp $ */ +/* $NetBSD: main.c,v 1.5 2014/08/19 13:30:32 martin Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -392,7 +392,8 @@ toplevel(void) */ char *home = getenv("HOME"); if (home != NULL) - chdir(home); + if (chdir(home) != 0) + (void)chdir("/"); unwind_mounts(); /* Display banner message in (english, francais, deutsch..) */