--- a/usr/src/cmd/fs.d/ufs/newfs/newfs.c Wed May 05 12:10:59 2010 +0800
+++ b/usr/src/cmd/fs.d/ufs/newfs/newfs.c Wed May 05 08:52:13 2010 +0100
@@ -713,6 +713,7 @@
{
struct dk_geom g;
struct dk_cinfo ci;
+ struct dk_minfo info;
diskaddr_t actual_size;
int fd;
@@ -741,6 +742,18 @@
isremovable = 0;
}
+ /* If removable check if a floppy disk */
+ if (isremovable) {
+ if (ioctl(fd, DKIOCGMEDIAINFO, &info)) {
+ dprintf(("DeBuG newfs : Unable to get media"
+ " info from %s.\n", disk));
+ } else {
+ if (info.dki_media_type == DK_FLOPPY) {
+ isremovable = 0;
+ }
+ }
+ }
+
if (ioctl(fd, DKIOCHOTPLUGGABLE, &ishotpluggable)) {
dprintf(("DeBuG newfs : Unable to determine if %s is"
" Hotpluggable Media. Proceeding with system"