Re: tgt-admin functionality

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




James, could you resend the patch made with "diff -u" option?


Here you go:

--- old/tgt-1.0.15/scripts/tgt-admin    2011-04-01 00:29:20.000000000 +0100
+++ tgt-1.0.15/scripts/tgt-admin    2011-04-08 09:37:03.000000000 +0100
@@ -835,7 +835,13 @@
         foreach my $backing_store (@backing_stores) {
             print "\tbacking-store $backing_store\n";
         }
-
+
+        my $bs_type = show_target_info($current_target, "bs_type");
+        print "\tbs-type $bs_type\n";
+
+        my $device_type = show_target_info($current_target, "device_type");
+        print "\tdevice-type $device_type\n";
+
my @account_information = show_target_info($current_target, "account_information");
         foreach my $account (@account_information) {
             if ($account =~ /(.+)\ \(outgoing\)/) {
@@ -934,6 +940,19 @@
             }
             return @account_information;
         }
+    # Returns Backing store type:
+    } elsif ($task eq "bs_type") {
+ if ($tgtadm_output{$existing_target} =~ m/Backing store type: (?!null)(.+)/ ) {
+            return $1
+        }
+    # Returns Backing store LUN type:
+    } elsif ($task eq "device_type") {
+ if ($tgtadm_output{$existing_target} =~ m/Type: (?!controller)(.+)/ ) {
+            if ($1 eq "passthrough" ) {
+                return "pt";
+            }
+            return $1
+        }
     # Returns ACL information
     } elsif ($task eq "acl_information") {
         if ($tgtadm_output{$existing_target} =~ m{



--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux SCSI]     [Linux RAID]     [Linux Clusters]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]

  Powered by Linux