Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
b78db485
Commit
b78db485
authored
Jun 06, 2002
by
Leigh B. Stoller
Browse files
Fix up list option to avoid mere user confusion.
parent
9eb51878
Changes
1
Hide whitespace changes
Inline
Side-by-side
tbsetup/os_load.in
View file @
b78db485
...
@@ -15,10 +15,8 @@ use Getopt::Std;
...
@@ -15,10 +15,8 @@ use Getopt::Std;
sub
usage
()
sub
usage
()
{
{
print
STDOUT
print
STDOUT
"
Usage: os_load [-s] [[-p <pid>] -i <imagename>] [-m <imageid>]
"
.
"
Usage: os_load [-s] [[-p <pid>] -i <imagename>] <node> [node ...]
\n
"
.
"
<node> [node ...]
\n
"
.
"
os_load [-s] [[-p <pid>] -i <imagename>] -e pid,eid
\n
"
.
"
os_load [-s] [[-p <pid>] -i <imagename>] [-m <imageid>]
"
.
"
-e pid,eid
\n
"
.
"
os_load -l
\n
"
.
"
os_load -l
\n
"
.
"
Use -i to specify an image name. Use node default otherwise.
\n
"
.
"
Use -i to specify an image name. Use node default otherwise.
\n
"
.
"
Use -m to specify an image ID (internal name, TB admins only!).
\n
"
.
"
Use -m to specify an image ID (internal name, TB admins only!).
\n
"
.
...
@@ -558,12 +556,19 @@ sub dolisting()
...
@@ -558,12 +556,19 @@ sub dolisting()
$query_result
=
$query_result
=
DBQueryFatal
("
SELECT * FROM images order by imageid
");
DBQueryFatal
("
SELECT * FROM images order by imageid
");
}
}
for
(
$i
=
0
;
$i
<
$query_result
->
numrows
;
$i
++
)
{
my
%row
=
$query_result
->
fetchhash
();
my
$id
=
$row
{'
imageid
'};
my
$desc
=
$row
{'
description
'};
printf
"
%-20s %s
\n
",
$id
,
$desc
;
if
(
$query_result
->
numrows
)
{
printf
"
%-12s %-20s %s
\n
",
"
Pid
",
"
Imagename
",
"
Description
";
printf
"
------------ -------------------- -------------------------
\n
";
for
(
$i
=
0
;
$i
<
$query_result
->
numrows
;
$i
++
)
{
my
%row
=
$query_result
->
fetchhash
();
my
$id
=
$row
{'
imageid
'};
my
$pid
=
$row
{'
pid
'};
my
$name
=
$row
{'
imagename
'};
my
$desc
=
$row
{'
description
'};
printf
"
%-12s %-20s %s
\n
",
$pid
,
$name
,
$desc
;
}
}
}
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment