changeset 13644:e48bbfe444bf

2433 mount: allow relative path Reviewed by: Garrett D'Amore <garrett@damore.org> Reviewed by: Gary Mills <gary_mills@fastmail.fm> Approved by: Gordon Ross <gwr@nexenta.com>
author Dan Kruchinin <dan.kruchinin@nexenta.com>
date Wed, 21 Mar 2012 19:44:57 +0200
parents 837d1b6404bf
children 1cef92b663d9
files usr/src/cmd/fs.d/mount.c
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/cmd/fs.d/mount.c	Thu Mar 22 15:26:42 2012 -0400
+++ b/usr/src/cmd/fs.d/mount.c	Wed Mar 21 19:44:57 2012 +0200
@@ -26,6 +26,9 @@
  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
+/*
+ * Copyright 2012 Nexenta Systems, Inc.  All rights reserved.
+ */
 
 #include	<stdio.h>
 #include	<stdio_ext.h>
@@ -503,9 +506,6 @@
 	}
 
 out:
-	if (check_fields(fstype, mountp))
-		exit(1);
-
 	if (realpath(mountp, realdir) == NULL) {
 		(void) fprintf(stderr, "mount: ");
 		perror(mountp);
@@ -515,6 +515,9 @@
 	if ((mountp = strdup(realdir)) == NULL)
 		nomem();
 
+	if (check_fields(fstype, mountp))
+		exit(1);
+
 	/* create the new arg list, and end the list with a null pointer */
 	ii = 2;
 	if (cflg)