Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/sysinst if chdir() fails, try chdir /
details: https://anonhg.NetBSD.org/src/rev/b0c031c27732
branches: trunk
changeset: 331685:b0c031c27732
user: martin <martin%NetBSD.org@localhost>
date: Tue Aug 19 13:30:32 2014 +0000
description:
if chdir() fails, try chdir /
diffstat:
usr.sbin/sysinst/main.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (19 lines):
diff -r 89dcf1f63844 -r b0c031c27732 usr.sbin/sysinst/main.c
--- a/usr.sbin/sysinst/main.c Tue Aug 19 13:26:27 2014 +0000
+++ b/usr.sbin/sysinst/main.c Tue Aug 19 13:30:32 2014 +0000
@@ -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 @@
*/
char *home = getenv("HOME");
if (home != NULL)
- chdir(home);
+ if (chdir(home) != 0)
+ (void)chdir("/");
unwind_mounts();
/* Display banner message in (english, francais, deutsch..) */
Home |
Main Index |
Thread Index |
Old Index