[stgt] tgt-admin functionality

Tomasz Chmielewski mangoo at wpkg.org
Sat Apr 9 15:42:34 CEST 2011


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 at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html



More information about the stgt mailing list