If mounting the fixit floppy fails in the first place, warn the user
but make a second attempt using MNT_FORCE, just in case it has been unclean from a previous crash. That's dangerous, but far better than keeping the despaired user standing in the rain... (Experienced admins can still fsck it then, and remount. Others will either totally crash, or incidentally succeed, without much further help possible...) Btw., mount(2) misses the description of MNT_FORCE for the mount syscall.
This commit is contained in:
parent
eeb54742f4
commit
35b3921b16
@ -4,7 +4,7 @@
|
||||
* This is probably the last program in the `sysinstall' line - the next
|
||||
* generation being essentially a complete rewrite.
|
||||
*
|
||||
* $Id: install.c,v 1.136 1996/11/07 15:45:59 jkh Exp $
|
||||
* $Id: install.c,v 1.137 1996/11/08 05:38:27 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -266,6 +266,10 @@ installFixitFloppy(dialogMenuItem *self)
|
||||
msgConfirm("Please insert a writable fixit floppy and press return");
|
||||
if (mount(MOUNT_UFS, "/mnt2", 0, (caddr_t)&args) != -1)
|
||||
break;
|
||||
msgConfirm("An attempt to mount the fixit floppy failed, maybe the filesystem\n"
|
||||
"is unclean. Trying a forcible mount as a last resort...");
|
||||
if (mount(MOUNT_UFS, "/mnt2", MNT_FORCE, (caddr_t)&args) != -1)
|
||||
break;
|
||||
if (msgYesNo("Unable to mount the fixit floppy - do you want to try again?") != 0)
|
||||
return DITEM_FAILURE;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
* This is probably the last program in the `sysinstall' line - the next
|
||||
* generation being essentially a complete rewrite.
|
||||
*
|
||||
* $Id: install.c,v 1.136 1996/11/07 15:45:59 jkh Exp $
|
||||
* $Id: install.c,v 1.137 1996/11/08 05:38:27 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -266,6 +266,10 @@ installFixitFloppy(dialogMenuItem *self)
|
||||
msgConfirm("Please insert a writable fixit floppy and press return");
|
||||
if (mount(MOUNT_UFS, "/mnt2", 0, (caddr_t)&args) != -1)
|
||||
break;
|
||||
msgConfirm("An attempt to mount the fixit floppy failed, maybe the filesystem\n"
|
||||
"is unclean. Trying a forcible mount as a last resort...");
|
||||
if (mount(MOUNT_UFS, "/mnt2", MNT_FORCE, (caddr_t)&args) != -1)
|
||||
break;
|
||||
if (msgYesNo("Unable to mount the fixit floppy - do you want to try again?") != 0)
|
||||
return DITEM_FAILURE;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
* This is probably the last program in the `sysinstall' line - the next
|
||||
* generation being essentially a complete rewrite.
|
||||
*
|
||||
* $Id: install.c,v 1.136 1996/11/07 15:45:59 jkh Exp $
|
||||
* $Id: install.c,v 1.137 1996/11/08 05:38:27 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -266,6 +266,10 @@ installFixitFloppy(dialogMenuItem *self)
|
||||
msgConfirm("Please insert a writable fixit floppy and press return");
|
||||
if (mount(MOUNT_UFS, "/mnt2", 0, (caddr_t)&args) != -1)
|
||||
break;
|
||||
msgConfirm("An attempt to mount the fixit floppy failed, maybe the filesystem\n"
|
||||
"is unclean. Trying a forcible mount as a last resort...");
|
||||
if (mount(MOUNT_UFS, "/mnt2", MNT_FORCE, (caddr_t)&args) != -1)
|
||||
break;
|
||||
if (msgYesNo("Unable to mount the fixit floppy - do you want to try again?") != 0)
|
||||
return DITEM_FAILURE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user