Commit a16188eb authored by Leigh B Stoller's avatar Leigh B Stoller

Print out vlan tag in list mode.

parent 6cd087cd
......@@ -133,13 +133,16 @@ if (!$this_user->IsAdmin()) {
if ($list) {
my $query_result =
DBQueryFatal("select * from shared_vlans order by token");
DBQueryFatal("select * from shared_vlans as s ".
"left join vlans as v on ".
"order by s.token");
if (! $query_result->numrows);
printf("%-15s %-15s %-15s %-15s %s\n",
"PID", "EID", "Token", "Lan", "Who");
print "-------------------------------------------------------------\n";
printf("%-15s %-20s %-20s %-20s %-5s %s\n",
"PID", "EID", "Token", "Lan", "Tag", "Who");
print "-------------------------------------------------------------";
print "------------------------------\n";
while (my $row = $query_result->fetchrow_hashref()) {
my $pid = $row->{'pid'};
......@@ -148,9 +151,10 @@ if ($list) {
my $lan = $row->{'vname'};
my $created = $row->{'created'};
my $creator = $row->{'creator'};
my $tag = $row->{'tag'} || "";
printf("%-15s %-15s %-15s %-15s %s\n",
$pid, $eid, $token, $lan, $creator);
printf("%-15s %-20s %-20s %-20s %-5s %s\n",
$pid, $eid, $token, $lan, "$tag", $creator);
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