Re: tgt-admin functionality

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

 



On 09.04.2011 15:02, James Pattinson wrote:

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


+ # Returns Backing store LUN type:
+ } elsif ($task eq "device_type") {
+ if ($tgtadm_output{$existing_target} =~ m/Type: (?!controller)(.+)/ ) {
+ if ($1 eq "passthrough" ) {
+ return "pt";

Hmm, this in targets.conf:

<target iqn.2008-09.com.example:server.target2>
# all
# options
# commented out
</target>


Gets this returned:

# /tmp/tgt-admin-patched --dump

<target iqn.2008-09.com.example:server.target2>
	bs-type rdwr
	device-type
</target>


I'd say an "empty" target is not very common configuration, but device-type can't be empty - but we shouldn't produce invalid config files.

Perhaps this instead?

        if (length $device_type) {
            print "\tdevice-type $device_type\n";
        }



--
Tomasz Chmielewski
http://wpkg.org
--
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