Hello community,

here is the log from the commit of package libstorage for openSUSE:Factory 
checked in at 2014-04-13 13:13:37
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libstorage (Old)
 and      /work/SRC/openSUSE:Factory/.libstorage.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libstorage"

Changes:
--------
--- /work/SRC/openSUSE:Factory/libstorage/libstorage.changes    2014-03-27 
06:14:23.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.libstorage.new/libstorage.changes       
2014-04-13 13:13:48.000000000 +0200
@@ -1,0 +2,10 @@
+Tue Apr 08 12:11:00 CEST 2014 - [email protected]
+
+- adapted to lsscsi output change concerning FCoE
+
+-------------------------------------------------------------------
+Mon Apr  7 19:43:18 UTC 2014 - [email protected]
+
+- Always wipe PReP partition (bnc#870590)
+
+-------------------------------------------------------------------
@@ -693 +703 @@
-- detect new transport type FcoE (bnc#726057)
+- detect new transport type FCoE (bnc#726057)
@@ -775 +785 @@
-- moved lock from to /var/run/libstorage (bnc#710356)
+- moved lock file to /var/run/libstorage (bnc#710356)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libstorage.spec ++++++
--- /var/tmp/diff_new_pack.JDC7Nq/_old  2014-04-13 13:13:50.000000000 +0200
+++ /var/tmp/diff_new_pack.JDC7Nq/_new  2014-04-13 13:13:50.000000000 +0200
@@ -121,7 +121,7 @@
 Requires:       device-mapper
 Requires:       dmraid
 Requires:       grep
-Requires:       lsscsi
+Requires:       lsscsi >= 0.26
 Requires:       lvm2
 Requires:       mdadm >= 3.3
 Requires:       multipath-tools

++++++ libstorage-2.25.11.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-2.25.11/libstorage.spec.in 
new/libstorage-2.25.11/libstorage.spec.in
--- old/libstorage-2.25.11/libstorage.spec.in   2014-02-06 10:29:26.000000000 
+0100
+++ new/libstorage-2.25.11/libstorage.spec.in   2014-04-08 14:04:19.000000000 
+0200
@@ -113,7 +113,7 @@
 Requires:      device-mapper
 Requires:      dmraid
 Requires:      grep
-Requires:      lsscsi
+Requires:      lsscsi >= 0.26
 Requires:      lvm2
 Requires:      mdadm >= 3.3
 Requires:      multipath-tools
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-2.25.11/storage/ArchInfo.cc 
new/libstorage-2.25.11/storage/ArchInfo.cc
--- old/libstorage-2.25.11/storage/ArchInfo.cc  2014-03-14 15:23:48.000000000 
+0100
+++ new/libstorage-2.25.11/storage/ArchInfo.cc  2014-03-26 18:08:49.000000000 
+0100
@@ -53,8 +53,7 @@
     {
        setChildValue(node, "arch", arch);
 
-       if (efiboot)
-           setChildValue(node, "efiboot", efiboot);
+       setChildValueIf(node, "efiboot", efiboot, efiboot);
     }
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-2.25.11/storage/Btrfs.cc 
new/libstorage-2.25.11/storage/Btrfs.cc
--- old/libstorage-2.25.11/storage/Btrfs.cc     2014-03-25 14:03:16.000000000 
+0100
+++ new/libstorage-2.25.11/storage/Btrfs.cc     2014-03-26 18:08:49.000000000 
+0100
@@ -1010,18 +1010,20 @@
        log << " SubVol:" << tmp;
     }
 
-void Btrfs::saveData(xmlNode* node) const
+
+    void
+    Btrfs::saveData(xmlNode* node) const
     {
-    Volume::saveData(node);
-    setChildValue(node, "devices", devices);
-    if( !dev_add.empty() )
-       setChildValue(node, "dev_add", dev_add);
-    if( !dev_rem.empty() )
-       setChildValue(node, "dev_rem", dev_rem);
-    if (!subvol.empty())
-       setChildValue(node, "subvolume", subvol);
+       Volume::saveData(node);
+
+       setChildValue(node, "devices", devices);
+       setChildValueIf(node, "dev_add", dev_add, !dev_add.empty());
+       setChildValueIf(node, "dev_rem", dev_rem, !dev_rem.empty());
+
+       setChildValueIf(node, "subvolume", subvol, !subvol.empty());
     }
 
+
 bool Btrfs::needCreateSubvol( const Btrfs& v )
     {
     unsigned dummy, cnt;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-2.25.11/storage/Container.cc 
new/libstorage-2.25.11/storage/Container.cc
--- old/libstorage-2.25.11/storage/Container.cc 2014-01-22 10:39:57.000000000 
+0100
+++ new/libstorage-2.25.11/storage/Container.cc 2014-03-26 18:08:49.000000000 
+0100
@@ -97,8 +97,7 @@
     {
        Device::saveData(node);
 
-       if (ronly)
-           setChildValue(node, "readonly", ronly);
+       setChildValueIf(node, "readonly", ronly, ronly);
     }
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-2.25.11/storage/Device.cc 
new/libstorage-2.25.11/storage/Device.cc
--- old/libstorage-2.25.11/storage/Device.cc    2014-03-11 15:00:47.000000000 
+0100
+++ new/libstorage-2.25.11/storage/Device.cc    2014-03-26 18:08:49.000000000 
+0100
@@ -88,8 +88,7 @@
        setChildValue(node, "major", mjr);
        setChildValue(node, "minor", mnr);
 
-       if (!uby.empty())
-           setChildValue(node, "used_by", uby);
+       setChildValueIf(node, "used_by", uby, !uby.empty());
     }
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-2.25.11/storage/Disk.cc 
new/libstorage-2.25.11/storage/Disk.cc
--- old/libstorage-2.25.11/storage/Disk.cc      2014-03-18 16:59:03.000000000 
+0100
+++ new/libstorage-2.25.11/storage/Disk.cc      2014-03-26 18:08:49.000000000 
+0100
@@ -142,19 +142,13 @@
 
        setChildValue(node, "label", label);
        setChildValue(node, "max_primary", max_primary);
-       if (ext_possible)
-       {
-           setChildValue(node, "ext_possible", ext_possible);
-           setChildValue(node, "max_logical", max_logical);
-       }
+       setChildValueIf(node, "ext_possible", ext_possible, ext_possible);
+       setChildValueIf(node, "max_logical", max_logical, ext_possible);
 
-       if (!udev_path.empty())
-           setChildValue(node, "udev_path", udev_path);
-       if (!udev_id.empty())
-           setChildValue(node, "udev_id", udev_id);
+       setChildValueIf(node, "udev_path", udev_path, !udev_path.empty());
+       setChildValueIf(node, "udev_id", udev_id, !udev_id.empty());
 
-       if (transport != TUNKNOWN)
-           setChildValue(node, "transport", toString(transport));
+       setChildValueIf(node, "transport", toString(transport), transport != 
TUNKNOWN);
 
        ConstPartPair vp = partPair();
        for (ConstPartIter v = vp.begin(); v != vp.end(); ++v)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-2.25.11/storage/Dm.cc 
new/libstorage-2.25.11/storage/Dm.cc
--- old/libstorage-2.25.11/storage/Dm.cc        2014-03-06 17:30:22.000000000 
+0100
+++ new/libstorage-2.25.11/storage/Dm.cc        2014-03-26 18:08:49.000000000 
+0100
@@ -105,8 +105,7 @@
        setChildValue(node, "table_name", tname);
 
        setChildValue(node, "stripes", stripe);
-       if (stripe > 1)
-           setChildValue(node, "stripe_size_k", stripe_size);
+       setChildValueIf(node, "stripe_size_k", stripe_size, stripe > 1);
     }
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-2.25.11/storage/Enum.cc 
new/libstorage-2.25.11/storage/Enum.cc
--- old/libstorage-2.25.11/storage/Enum.cc      2014-01-22 10:39:57.000000000 
+0100
+++ new/libstorage-2.25.11/storage/Enum.cc      2014-04-08 14:04:19.000000000 
+0200
@@ -110,7 +110,7 @@
 
 
     static const string transport_names[] = {
-       "UNKNOWN", "SBP", "ATA", "FC", "iSCSI", "SAS", "SATA", "SPI", "USB", 
"FCOE"
+       "UNKNOWN", "SBP", "ATA", "FC", "iSCSI", "SAS", "SATA", "SPI", "USB", 
"FCoE"
     };
 
     const vector<string> EnumInfo<Transport>::names(transport_names, 
transport_names +
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-2.25.11/storage/Geometry.cc 
new/libstorage-2.25.11/storage/Geometry.cc
--- old/libstorage-2.25.11/storage/Geometry.cc  2014-03-06 17:30:22.000000000 
+0100
+++ new/libstorage-2.25.11/storage/Geometry.cc  2014-03-26 18:08:49.000000000 
+0100
@@ -144,8 +144,7 @@
        setChildValue(tmp, "heads", value.heads);
        setChildValue(tmp, "sectors", value.sectors);
 
-       if (value.sector_size != 512)
-           setChildValue(tmp, "sector_size", value.sector_size);
+       setChildValueIf(tmp, "sector_size", value.sector_size, 
value.sector_size != 512);
     }
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-2.25.11/storage/LvmLv.cc 
new/libstorage-2.25.11/storage/LvmLv.cc
--- old/libstorage-2.25.11/storage/LvmLv.cc     2014-02-13 13:51:57.000000000 
+0100
+++ new/libstorage-2.25.11/storage/LvmLv.cc     2014-03-26 18:08:49.000000000 
+0100
@@ -104,10 +104,9 @@
     LvmLv::saveData(xmlNode* node) const
     {
        Dm::saveData(node);
-        if( !used_pool.empty() )
-            setChildValue(node, "used_pool", used_pool);
-        if( !origin.empty() )
-            setChildValue(node, "origin", origin);
+
+       setChildValueIf(node, "used_pool", used_pool, !used_pool.empty());
+       setChildValueIf(node, "origin", origin, !origin.empty());
         setChildValue(node, "pool", pool);
         setChildValue(node, "chunk_size", chunk_size);
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-2.25.11/storage/Partition.cc 
new/libstorage-2.25.11/storage/Partition.cc
--- old/libstorage-2.25.11/storage/Partition.cc 2014-03-11 15:00:47.000000000 
+0100
+++ new/libstorage-2.25.11/storage/Partition.cc 2014-04-08 12:27:43.000000000 
+0200
@@ -111,8 +111,7 @@
        setChildValue(node, "partition_type", toString(typ));
        setChildValue(node, "partition_id", idt);
 
-       if (bootflag)
-           setChildValue(node, "boot_flag", true);
+       setChildValueIf(node, "boot_flag", bootflag, bootflag);
     }
 
 
@@ -388,13 +387,16 @@
 
     bool zero_new = getContainer()->getStorage()->getZeroNewPartitions();
     bool used_as_pv = isUsedBy(UB_LVM);
+    bool prep = id() == ID_PPC_PREP;
 
-    y2mil("zero_new:" << zero_new << " used_as_pv:" << used_as_pv);
+    y2mil("zero_new:" << zero_new << " used_as_pv:" << used_as_pv << " prep:" 
<< prep);
 
-    if (zero_new || used_as_pv)
-    {
-       ret = getContainer()->getStorage()->zeroDevice(device());
-    }
+   if (prep) {
+       ret = getContainer()->getStorage()->zeroDevice(device(), false, size_k);
+   } else {
+       if (zero_new || used_as_pv)
+          ret = getContainer()->getStorage()->zeroDevice(device());
+       }
 
     return ret;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-2.25.11/storage/Storage.h 
new/libstorage-2.25.11/storage/Storage.h
--- old/libstorage-2.25.11/storage/Storage.h    2014-03-20 15:47:41.000000000 
+0100
+++ new/libstorage-2.25.11/storage/Storage.h    2014-03-31 17:46:12.000000000 
+0200
@@ -2046,7 +2046,6 @@
        void detectBtrfs(SystemInfo& systeminfo);
        void detectMdParts(SystemInfo& systeminfo);
        void decideMultipath();
-       void decideImsm();
        void detectLoops(SystemInfo& systeminfo);
        void detectNfs(const EtcFstab& fstab, SystemInfo& systeminfo);
        void detectTmpfs(const EtcFstab& fstab, SystemInfo& systeminfo);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-2.25.11/storage/StorageInterface.h 
new/libstorage-2.25.11/storage/StorageInterface.h
--- old/libstorage-2.25.11/storage/StorageInterface.h   2014-03-10 
20:17:21.000000000 +0100
+++ new/libstorage-2.25.11/storage/StorageInterface.h   2014-04-07 
17:01:03.000000000 +0200
@@ -1362,7 +1362,7 @@
         * partition number.
         *
         * @param disk name of disk, e.g. /dev/sda
-        * @return prefix for partitions, e.g. "", "p" or "_part"
+        * @return prefix for partitions, e.g. "", "p" or "-part"
         */
        virtual string getPartitionPrefix(const string& disk) = 0;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-2.25.11/storage/SystemInfo/CmdLsscsi.cc 
new/libstorage-2.25.11/storage/SystemInfo/CmdLsscsi.cc
--- old/libstorage-2.25.11/storage/SystemInfo/CmdLsscsi.cc      2014-03-06 
17:30:22.000000000 +0100
+++ new/libstorage-2.25.11/storage/SystemInfo/CmdLsscsi.cc      2014-04-08 
14:04:19.000000000 +0200
@@ -61,8 +61,17 @@
        {
            string line = boost::replace_all_copy(*it, " usb: ", " usb:");
 
+           string type = extractNthWord(1, line);
+           if (type != "disk")
+               continue;
+
            string transport = extractNthWord(2, line);
            string device = extractNthWord(3, line);
+           if (boost::starts_with(transport, "/dev/"))
+           {
+               device = transport;
+               transport = "";
+           }
 
            if (!boost::starts_with(device, "/dev/"))
                continue;
@@ -75,6 +84,8 @@
                entry.transport = ATA;
            else if (boost::starts_with(transport, "fc:"))
                entry.transport = FC;
+           else if (boost::starts_with(transport, "fcoe:"))
+               entry.transport = FCOE;
            else if (boost::starts_with(transport, "iqn"))
                entry.transport = ISCSI;
            else if (boost::starts_with(transport, "sas:"))
@@ -86,32 +97,6 @@
            else if (boost::starts_with(transport, "usb:"))
                entry.transport = USB;
 
-           if( entry.transport == FC )
-               {
-               string link;
-               if( readlink( Disk::sysfsPath(device)+"/device", link))
-                   {
-                   y2mil( "sysfs:" << Disk::sysfsPath(device) << 
-                          " link:" << link );
-                   string::size_type pos = link.rfind( '/' ) + 1;
-                   string nums = link.substr( pos, link.find_first_not_of( 
"0123456789", pos ));
-                   unsigned num = 0;
-                   nums >> num;
-                   y2mil( "nums:" << nums << " num:" << num );
-                   string symname = "/sys/class/fc_host/host" + 
-                                    decString(num) + "/symbolic_name";
-                   ifstream tmpf( symname.c_str() );
-                   string line;
-                   getline( tmpf, line );
-                   y2mil( "line:" << line );
-                   if( line.find( "over eth" )!=string::npos )
-                       {
-                       entry.transport = FCOE;
-                       y2mil( "FCoE device: " << device );
-                       }
-                   }
-               }
-
            data[device] = entry;
        }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-2.25.11/storage/SystemInfo/DevAndSys.cc 
new/libstorage-2.25.11/storage/SystemInfo/DevAndSys.cc
--- old/libstorage-2.25.11/storage/SystemInfo/DevAndSys.cc      2014-03-20 
15:47:41.000000000 +0100
+++ new/libstorage-2.25.11/storage/SystemInfo/DevAndSys.cc      2014-03-31 
17:45:37.000000000 +0200
@@ -66,15 +66,6 @@
     }
 
 
-    std::ostream& operator<<(std::ostream& s, const DevLinks& devlinks)
-    {
-       for (const DevLinks::value_type& it : devlinks)
-           s << "data[" << it.first << "] -> " << boost::join(it.second, " ") 
<< endl;
-
-       return s;
-    }
-
-
     Dir::Dir(const string& path, bool do_probe)
        : path(path)
     {
@@ -98,6 +89,15 @@
 
        return s;
     }
+
+
+    std::ostream& operator<<(std::ostream& s, const DevLinks& devlinks)
+    {
+       for (const DevLinks::value_type& it : devlinks)
+           s << "data[" << it.first << "] -> " << boost::join(it.second, " ") 
<< endl;
+
+       return s;
+    }
 
 
     UdevMap::UdevMap(const string& path, bool do_probe)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-2.25.11/storage/Volume.cc 
new/libstorage-2.25.11/storage/Volume.cc
--- old/libstorage-2.25.11/storage/Volume.cc    2014-03-17 14:46:40.000000000 
+0100
+++ new/libstorage-2.25.11/storage/Volume.cc    2014-03-27 09:48:19.000000000 
+0100
@@ -171,30 +171,25 @@
        Device::saveData(node);
 
        setChildValue(node, "numeric", numeric);
-       if (numeric)
-           setChildValue(node, "number", num);
+       setChildValueIf(node, "number", num, numeric);
 
        if (fs != FSUNKNOWN)
        {
            setChildValue(node, "fs_type", toString(fs));
-           if (!uuid.empty())
-               setChildValue(node, "fs_uuid", uuid);
-           if (!label.empty())
-               setChildValue(node, "fs_label", label);
-           if (!mp.empty())
-               setChildValue(node, "mount", mp);
-           if (mount_by != MOUNTBY_DEVICE)
-               setChildValue(node, "mount_by", toString(mount_by));
-           if (!fstab_opt.empty())
-               setChildValue(node, "fstopt", fstab_opt);
+           setChildValueIf(node, "fs_uuid", uuid, !uuid.empty());
+           setChildValueIf(node, "fs_label", label, !label.empty());
+           setChildValueIf(node, "mount", mp, !mp.empty());
+           setChildValueIf(node, "mount_by", toString(mount_by), mount_by != 
MOUNTBY_DEVICE);
+           setChildValueIf(node, "fstopt", fstab_opt, !fstab_opt.empty());
        }
 
        if (encryption != ENC_NONE)
+       {
            setChildValue(node, "encryption", toString(encryption));
 #ifdef DEBUG_CRYPT_PASSWORD
-       if (encryption != ENC_NONE && !crypt_pwd.empty())
-           setChildValue(node, "password", crypt_pwd);
+           setChildValueIf(node, "password", crypt_pwd, !crypt_pwd.empty());
 #endif
+       }
     }
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-2.25.11/storage/XmlFile.h 
new/libstorage-2.25.11/storage/XmlFile.h
--- old/libstorage-2.25.11/storage/XmlFile.h    2014-01-22 10:39:57.000000000 
+0100
+++ new/libstorage-2.25.11/storage/XmlFile.h    2014-03-26 18:08:49.000000000 
+0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010 Novell, Inc.
+ * Copyright (c) [2010-2014] Novell, Inc.
  *
  * All Rights Reserved.
  *
@@ -92,9 +92,11 @@
     void setChildValue(xmlNode* node, const char* name, const string& value);
     void setChildValue(xmlNode* node, const char* name, bool value);
 
-    template<typename Type>
-    void setChildValue(xmlNode* node, const char* name, const Type& value)
+    template<typename Num>
+    void setChildValue(xmlNode* node, const char* name, const Num& value)
     {
+       static_assert(std::is_integral<Num>::value, "not integral");
+
        std::ostringstream ostr;
        classic(ostr);
        ostr << value;
@@ -108,6 +110,13 @@
            setChildValue(node, name, *it);
     }
 
+    template<typename Type>
+    void setChildValueIf(xmlNode* node, const char* name, const Type& value, 
bool pred)
+    {
+       if (pred)
+           setChildValue(node, name, value);
+    }
+
 }
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-2.25.11/storage/gen_md5sum.cc 
new/libstorage-2.25.11/storage/gen_md5sum.cc
--- old/libstorage-2.25.11/storage/gen_md5sum.cc        2014-03-25 
17:14:01.000000000 +0100
+++ new/libstorage-2.25.11/storage/gen_md5sum.cc        2014-04-08 
14:05:38.000000000 +0200
@@ -1,5 +1,5 @@
-#define SOURCES_MD5SUM   "7a86d4f2ac7025d9f57924e68be845ec"
-#define SOURCES_MD5_DATE " Tue 25 Mar 17:14:01 CET 2014 "
+#define SOURCES_MD5SUM   "277120fc472f2cc939a01a797317df12"
+#define SOURCES_MD5_DATE " Tue 8 Apr 14:05:38 CEST 2014 "
 namespace storage
 {
 const char* GetSourceMd5() { return SOURCES_MD5SUM; }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-2.25.11/testsuite/lsscsi.cc 
new/libstorage-2.25.11/testsuite/lsscsi.cc
--- old/libstorage-2.25.11/testsuite/lsscsi.cc  2014-03-06 17:30:22.000000000 
+0100
+++ new/libstorage-2.25.11/testsuite/lsscsi.cc  2014-04-08 14:04:19.000000000 
+0200
@@ -28,6 +28,74 @@
 }
 
 
+void
+parse2()
+{
+    cout << "parse2" << endl;
+
+    vector<string> lines = {
+       "[0:0:0:0]    disk                                    /dev/sda "
+    };
+
+    Lsscsi lsscsi(false);
+    lsscsi.parse(lines);
+
+    cout << lsscsi << endl;
+}
+
+
+void
+parse3()
+{
+    cout << "parse3" << endl;
+
+    vector<string> lines = {
+       "[0:0:0:0]    disk    
iqn.2014-03.com.example:34878ae1-e5a3-4cd2-b554-1e35aaf544a6,t,0x1  /dev/sda "
+    };
+
+    Lsscsi lsscsi(false);
+    lsscsi.parse(lines);
+
+    cout << lsscsi << endl;
+}
+
+
+void
+parse4()
+{
+    cout << "parse4" << endl;
+
+    vector<string> lines = {
+       "[1:0:2:0]    disk    fc:0x200300a09827e27e0x650501   /dev/sdb ",
+       "[1:0:2:1]    disk    fc:0x200300a09827e27e0x650501   /dev/sdc "
+    };
+
+    Lsscsi lsscsi(false);
+    lsscsi.parse(lines);
+
+    cout << lsscsi << endl;
+}
+
+
+void
+parse5()
+{
+    cout << "parse5" << endl;
+
+    vector<string> lines = {
+       "[1:0:0:0]    storage fcoe:0x50001fe1501e6d7b0x660c00  -        ",
+       "[1:0:0:1]    disk    fcoe:0x50001fe1501e6d7b0x660c00  /dev/sdb ",
+       "[1:0:1:0]    storage fcoe:0x50001fe1501e6d7f0x660b00  -        ",
+       "[1:0:1:1]    disk    fcoe:0x50001fe1501e6d7f0x660b00  /dev/sdc "
+    };
+
+    Lsscsi lsscsi(false);
+    lsscsi.parse(lines);
+
+    cout << lsscsi << endl;
+}
+
+
 int
 main()
 {
@@ -36,4 +104,8 @@
     setup_logger();
 
     parse1();
+    parse2();
+    parse3();
+    parse4();
+    parse5();
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-2.25.11/testsuite/single.out/lsscsi.out 
new/libstorage-2.25.11/testsuite/single.out/lsscsi.out
--- old/libstorage-2.25.11/testsuite/single.out/lsscsi.out      2014-01-22 
10:39:57.000000000 +0100
+++ new/libstorage-2.25.11/testsuite/single.out/lsscsi.out      2014-04-08 
14:04:19.000000000 +0200
@@ -1,5 +1,18 @@
 parse1
 data[/dev/sda] -> transport:SATA
 data[/dev/sdb] -> transport:USB
-data[/dev/sr0] -> transport:SATA
+
+parse2
+data[/dev/sda] -> transport:UNKNOWN
+
+parse3
+data[/dev/sda] -> transport:iSCSI
+
+parse4
+data[/dev/sdb] -> transport:FC
+data[/dev/sdc] -> transport:FC
+
+parse5
+data[/dev/sdb] -> transport:FCoE
+data[/dev/sdc] -> transport:FCoE
 

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to