]> xenbits.xensource.com Git - people/aperard/osstest.git/commitdiff
mg-hosts: -l: print subtask info too
authorIan Jackson <ian.jackson@eu.citrix.com>
Tue, 25 Apr 2017 14:58:17 +0000 (14:58 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Tue, 25 Apr 2017 15:12:34 +0000 (16:12 +0100)
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
mg-allocate

index 2dfbdb14aaf4df0cff6a005c80e26f61099411db..4f02ce5d020cd1ef383446eda9923a880a373eb2 100755 (executable)
@@ -612,13 +612,19 @@ END
                              qw(restype resname shareix));
            my $restype = $c->{restype};
            my $resname = $c->{resname};
+            my $prshare;
            if ($restype eq 'share-host') {
-               print "S/$resname";
+               $prshare = "S/$resname";
            } elsif ($restype eq 'host') {
-               print "$resname";
+               $prshare = "$resname";
            } elsif ($restype eq 'share-flight') {
-               print "F/$resname";
+               $prshare = "F/$resname";
            }
+            if ($c->{subtask}) {
+                printf "%-20s  %s", $prshare, $c->{subtask};
+            } else {
+                print $prshare;
+            }
            print "\n";
        }
         db_retry_abort();