changeset 3925:e4c224632211

6539541 is_dos_drive() fixed in HAL but not in fstyp 6539547 mkfs_pcfs should open device non-exclusively as do other mkfs'es
author artem
date Thu, 29 Mar 2007 17:22:07 -0700
parents 4a2c8e3e6786
children 1dfa4fd577c0
files usr/src/cmd/fs.d/pcfs/mkfs/mkfs.c usr/src/cmd/fstyp/fstyp.c
diffstat 2 files changed, 10 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/cmd/fs.d/pcfs/mkfs/mkfs.c	Thu Mar 29 14:09:44 2007 -0700
+++ b/usr/src/cmd/fs.d/pcfs/mkfs/mkfs.c	Thu Mar 29 17:22:07 2007 -0700
@@ -2,9 +2,8 @@
  * CDDL HEADER START
  *
  * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
  *
  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  * or http://www.opensolaris.org/os/licensing.
@@ -20,7 +19,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -2215,7 +2214,7 @@
 		    gettext("\n%s: device name must be a "
 			"character special device.\n"), actualdisk);
 		exit(2);
-	} else if ((fd = open(actualdisk, O_RDWR | O_EXCL)) < 0) {
+	} else if ((fd = open(actualdisk, O_RDWR)) < 0) {
 		perror(actualdisk);
 		exit(2);
 	}
@@ -2313,7 +2312,7 @@
 		    gettext("\n%s: device name must indicate a "
 			"character special device.\n"), actualdisk);
 		exit(2);
-	} else if ((fd = open(actualdisk, O_RDWR | O_EXCL)) < 0) {
+	} else if ((fd = open(actualdisk, O_RDWR)) < 0) {
 		perror(actualdisk);
 		exit(2);
 	}
--- a/usr/src/cmd/fstyp/fstyp.c	Thu Mar 29 14:09:44 2007 -0700
+++ b/usr/src/cmd/fstyp/fstyp.c	Thu Mar 29 17:22:07 2007 -0700
@@ -19,7 +19,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -420,8 +420,10 @@
 static boolean_t
 is_dos_drive(uchar_t type)
 {
-	return ((type == 1) || (type == 4) || (type == 5) || (type == 6) ||
-	    ((type >= 8) && (type <= 0xf)));
+	return ((type == DOSOS12) || (type == DOSOS16) ||
+	    (type == DOSHUGE) || (type == FDISK_WINDOWS) ||
+	    (type == FDISK_EXT_WIN) || (type == FDISK_FAT95) ||
+	    (type == DIAGPART));
 }
 
 static boolean_t