From b34c876a618c5d02b7d25231f3e0b8768b7af1dd Mon Sep 17 00:00:00 2001 From: "Jordan K. Hubbard" Date: Wed, 10 May 1995 08:03:21 +0000 Subject: [PATCH] Make sure that mountpoints start with a /. --- release/sysinstall/disks.c | 8 ++++++-- usr.sbin/sade/disks.c | 8 ++++++-- usr.sbin/sysinstall/disks.c | 8 ++++++-- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/release/sysinstall/disks.c b/release/sysinstall/disks.c index 77337bafd41a..729bb80cc2a4 100644 --- a/release/sysinstall/disks.c +++ b/release/sysinstall/disks.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: disks.c,v 1.12 1995/05/08 10:20:49 jkh Exp $ + * $Id: disks.c,v 1.13 1995/05/08 18:41:37 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -218,7 +218,11 @@ get_mountpoint(struct chunk *c) "Please specify a mount point for the partition"); if (val) { if (check_conflict(val)) { - msgConfirm("You already have a mountpoint for %s assigned!", val); + msgConfirm("You already have a mount point for %s assigned!", val); + return NULL; + } + else if (*val != '/') { + msgConfirm("Mount point must start with a / character"); return NULL; } else if (!strcmp(val, "/")) { diff --git a/usr.sbin/sade/disks.c b/usr.sbin/sade/disks.c index 77337bafd41a..729bb80cc2a4 100644 --- a/usr.sbin/sade/disks.c +++ b/usr.sbin/sade/disks.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: disks.c,v 1.12 1995/05/08 10:20:49 jkh Exp $ + * $Id: disks.c,v 1.13 1995/05/08 18:41:37 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -218,7 +218,11 @@ get_mountpoint(struct chunk *c) "Please specify a mount point for the partition"); if (val) { if (check_conflict(val)) { - msgConfirm("You already have a mountpoint for %s assigned!", val); + msgConfirm("You already have a mount point for %s assigned!", val); + return NULL; + } + else if (*val != '/') { + msgConfirm("Mount point must start with a / character"); return NULL; } else if (!strcmp(val, "/")) { diff --git a/usr.sbin/sysinstall/disks.c b/usr.sbin/sysinstall/disks.c index 77337bafd41a..729bb80cc2a4 100644 --- a/usr.sbin/sysinstall/disks.c +++ b/usr.sbin/sysinstall/disks.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: disks.c,v 1.12 1995/05/08 10:20:49 jkh Exp $ + * $Id: disks.c,v 1.13 1995/05/08 18:41:37 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -218,7 +218,11 @@ get_mountpoint(struct chunk *c) "Please specify a mount point for the partition"); if (val) { if (check_conflict(val)) { - msgConfirm("You already have a mountpoint for %s assigned!", val); + msgConfirm("You already have a mount point for %s assigned!", val); + return NULL; + } + else if (*val != '/') { + msgConfirm("Mount point must start with a / character"); return NULL; } else if (!strcmp(val, "/")) {