From cc6ef83bbed1ac5cfcd42a9848153d62a155a57c Mon Sep 17 00:00:00 2001 From: freesource Date: Mon, 30 Jul 2001 06:40:32 +0000 Subject: [PATCH] Adds a little error checking to make sure all important fields are filled in. --- gBootRoot | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/gBootRoot b/gBootRoot index 1050c1b..a52e82b 100644 --- a/gBootRoot +++ b/gBootRoot @@ -1071,18 +1071,35 @@ sub uml_box { # xterm -e linux ubd#=root_fs # root=/dev/ubd# my $pid; + if ($entry_advanced[8] && + $entry_advanced[10]) { unless ($pid = fork) { unless (fork) { if ($pid == 0) { sys("$entry_advanced[8] $entry_advanced[5] $entry_advanced[9] $entry_advanced[10]"); Gtk->_exit($pid); - } + } } } waitpid($pid,0); + } + else { + if (!$entry_advanced[8]) { + error_window("gBootRoot Error: " . + "Enter a xterm, and executable " . + "option."); + return; + } + if (!$entry_advanced[10]) { + error_window("gBootRoot Error: " . + "Enter the ubd?=Root_Filesystem " . + "and its location."); + return; + } + } } );