From 5fadadd17258fcbdce49a53f230509f091bcf1b6 Mon Sep 17 00:00:00 2001
From: Nikko He
Date: Fri, 5 Sep 2008 09:40:28 +0800
Subject: 6655443 format -e cores when auto-configure is selected in a
multi-disk session
---
usr/src/cmd/format/menu_command.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
(limited to 'usr/src')
diff --git a/usr/src/cmd/format/menu_command.c b/usr/src/cmd/format/menu_command.c
index 19d547380a..e0bfc0b40a 100644
--- a/usr/src/cmd/format/menu_command.c
+++ b/usr/src/cmd/format/menu_command.c
@@ -19,12 +19,10 @@
* CDDL HEADER END
*/
/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* This file contains functions that implement the command menu commands.
*/
@@ -459,7 +457,10 @@ c_type()
}
}
enter_critical();
- free(cur_disk->disk_type);
+ if (delete_disk_type(cur_disk->disk_type) != 0) {
+ fmt_print("Autoconfiguration failed.\n");
+ return (-1);
+ }
cur_disk->disk_type = tptr;
cur_disk->disk_parts = tptr->dtype_plist;
init_globals(cur_disk);
--
cgit v1.2.3