Commit a25fc201 authored by Mike Hibler's avatar Mike Hibler

Fix all instances of calling tmcc() with a BOOTERRNO argument of -1 which

previously would get interpreted as a (non-existent) '1' command line
argument to the tmcc binary.
parent 57f3bb77
......@@ -109,6 +109,7 @@ sub BootFatal($)
("datafile" => $BOOTLOG, "timeout" => 5));
}
# XXX "--" ensures that -1 is not interpreted as a tmcc cmdline arg
if (tmcc(TMCCCMD_BOOTERRNO, "-- -1") < 0) {
print "Error sending boot errno to Emulab Control!\n";
}
......
......@@ -179,7 +179,8 @@ sub BootFatal($$)
print "Error sending TBFAILED to Emulab Control!\n";
}
if (tmcc(TMCCCMD_BOOTERRNO, $code, undef, %TMCCTIMEOUT) < 0) {
# XXX "--" ensures that code < 0 is not interpreted as a tmcc cmdline arg
if (tmcc(TMCCCMD_BOOTERRNO, "-- $code", undef, %TMCCTIMEOUT) < 0) {
print "Error sending boot errno to Emulab Control!\n";
}
......
#!/usr/bin/perl -w
#
# EMULAB-COPYRIGHT
# Copyright (c) 2004 University of Utah and the Flux Group.
# Copyright (c) 2004, 2008 University of Utah and the Flux Group.
# All rights reserved.
#
use English;
......@@ -86,7 +86,8 @@ sub BootFatal($)
{
my ($msg) = @_;
if (tmcc(TMCCCMD_BOOTERRNO, "-1") < 0) {
# XXX "--" ensures that -1 is not interpreted as a tmcc cmdline arg
if (tmcc(TMCCCMD_BOOTERRNO, "-- -1") < 0) {
print "Error sending boot errno to Emulab Control!\n";
}
......
......@@ -126,6 +126,7 @@ sub setjailoptions();
sub startproxy($);
sub mysystem($);
sub cleanup();
sub startproxy($);
#
# Parse command arguments. Once we return from getopts, all that should be
......
......@@ -157,7 +157,8 @@ sub BootFatal($)
{
my ($msg) = @_;
if (tmcc(TMCCCMD_BOOTERRNO(), "-1") < 0) {
# XXX "--" ensures that -1 is not interpreted as a tmcc cmdline arg
if (tmcc(TMCCCMD_BOOTERRNO(), "-- -1") < 0) {
print "Error sending boot errno to Emulab Control!\n";
}
......
......@@ -157,7 +157,8 @@ sub BootFatal($)
{
my ($msg) = @_;
if (tmcc(TMCCCMD_BOOTERRNO(), "-1") < 0) {
# XXX "--" ensures that -1 is not interpreted as a tmcc cmdline arg
if (tmcc(TMCCCMD_BOOTERRNO(), "-- -1") < 0) {
print "Error sending boot errno to Emulab Control!\n";
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment