Commit b78db485 authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

Fix up list option to avoid mere user confusion.

parent 9eb51878
......@@ -15,10 +15,8 @@ use Getopt::Std;
sub usage()
{
print STDOUT
"Usage: os_load [-s] [[-p <pid>] -i <imagename>] [-m <imageid>] ".
"<node> [node ...]\n".
" os_load [-s] [[-p <pid>] -i <imagename>] [-m <imageid>] ".
"-e pid,eid\n".
"Usage: os_load [-s] [[-p <pid>] -i <imagename>] <node> [node ...]\n".
" os_load [-s] [[-p <pid>] -i <imagename>] -e pid,eid\n".
" os_load -l\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".
......@@ -559,11 +557,18 @@ sub dolisting()
DBQueryFatal("SELECT * FROM images order by imageid");
}
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 "%-20s %s\n", $id, $desc;
printf "%-12s %-20s %s\n", $pid, $name, $desc;
}
}
}
Supports Markdown
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