diff mbox

[OSSTEST,3/3] mg-hosts: -l: print subtask info too

Message ID 1493133217-15622-3-git-send-email-ian.jackson@eu.citrix.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ian Jackson April 25, 2017, 3:13 p.m. UTC
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 mg-allocate | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
diff mbox

Patch

diff --git a/mg-allocate b/mg-allocate
index 2dfbdb1..4f02ce5 100755
--- a/mg-allocate
+++ b/mg-allocate
@@ -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();