Hello community,

here is the log from the commit of package libstorage for openSUSE:Factory 
checked in at 2014-09-24 13:09:11
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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-09-17 
21:23:45.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.libstorage.new/libstorage.changes       
2014-09-24 13:09:17.000000000 +0200
@@ -1,0 +2,6 @@
+Mon Sep 22 16:34:43 CEST 2014 - [email protected]
+
+- treat disks with implicit partition table as read-only
+  (bsc#894585)
+
+-------------------------------------------------------------------

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

Other differences:
------------------
++++++ libstorage-2.25.15.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-2.25.15/storage/Container.cc 
new/libstorage-2.25.15/storage/Container.cc
--- old/libstorage-2.25.15/storage/Container.cc 2014-03-26 18:08:49.000000000 
+0100
+++ new/libstorage-2.25.15/storage/Container.cc 2014-09-19 11:31:22.000000000 
+0200
@@ -108,16 +108,14 @@
        return p.empty();
     }
 
-bool Container::isPartitionable() const
-    {
-    return( typ==DISK || typ==DMRAID || typ==DMMULTIPATH || typ==MDPART );
-    }
 
-bool Container::isDeviceUsable() const
+    bool
+    Container::isBlkdev() const
     {
-    return( typ==DISK || typ==DMRAID || typ==DMMULTIPATH || typ==MDPART );
+       return typ == DISK || typ == DMRAID || typ == DMMULTIPATH || typ == 
MDPART;
     }
 
+
     bool Container::stageDecrease(const Volume& v)
     {
        return v.deleted() || v.needShrink();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-2.25.15/storage/Container.h 
new/libstorage-2.25.15/storage/Container.h
--- old/libstorage-2.25.15/storage/Container.h  2014-01-22 10:39:57.000000000 
+0100
+++ new/libstorage-2.25.15/storage/Container.h  2014-09-19 11:31:22.000000000 
+0200
@@ -168,12 +168,9 @@
        Storage* getStorage() const { return sto; }
        const Storage* getStorageConst() const { return sto; }
        CType type() const { return typ; }
-       bool isPartitionable() const;
-       static bool Partitionable( const Container&d ) 
-           { return( d.isPartitionable() ); }
-       bool isDeviceUsable() const;
-       static bool DeviceUsable( const Container&d ) 
-           { return( d.isDeviceUsable() ); }
+
+       bool isBlkdev() const;
+       static bool isBlkdev(const Container& d) { return d.isBlkdev(); }
 
        bool readonly() const { return ronly; }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-2.25.15/storage/Disk.cc 
new/libstorage-2.25.15/storage/Disk.cc
--- old/libstorage-2.25.15/storage/Disk.cc      2014-09-04 18:18:40.000000000 
+0200
+++ new/libstorage-2.25.15/storage/Disk.cc      2014-09-22 16:59:15.000000000 
+0200
@@ -305,6 +305,7 @@
        const Parted& parted = systeminfo.getParted(dev);
 
        string dlabel = parted.getLabel();
+       ronly = parted.getImplicit();
 
        new_geometry = geometry = parted.getGeometry();
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-2.25.15/storage/HumanString.h 
new/libstorage-2.25.15/storage/HumanString.h
--- old/libstorage-2.25.15/storage/HumanString.h        2014-01-22 
10:39:57.000000000 +0100
+++ new/libstorage-2.25.15/storage/HumanString.h        2014-09-19 
16:23:58.000000000 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) [2004-2010] Novell, Inc.
+ * Copyright (c) [2004-2014] Novell, Inc.
  *
  * All Rights Reserved.
  *
@@ -51,8 +51,8 @@
 
 
     /**
-     * Return a pretty description of a size with required precision
-     * and using B, kB, MB, GB, TB or PB as unit as appropriate.
+     * Return a pretty description of a size with required precision and using
+     * B, KiB, MiB, GiB, TiB, PiB or EiB as unit as appropriate.
      *
      * @param size size in bytes
      * @param classic use classic locale instead of global C++ locale
@@ -64,7 +64,9 @@
                             bool omit_zeroes);
 
     /**
-     * Converts a size description using B, kB, MB, GB, TB or PB into an 
integer.
+     * Converts a size description using B, KiB, KB, MiB, MB, GiB, GB, TiB,
+     * TB, PiB, PB, EiB or EB into an integer. Decimal suffixes are treated as
+     * binary.
      *
      * @param str size string
      * @param classic use classic locale instead of global C++ locale
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-2.25.15/storage/Storage.cc 
new/libstorage-2.25.15/storage/Storage.cc
--- old/libstorage-2.25.15/storage/Storage.cc   2014-09-16 16:42:18.000000000 
+0200
+++ new/libstorage-2.25.15/storage/Storage.cc   2014-09-19 11:31:22.000000000 
+0200
@@ -6636,7 +6636,7 @@
        ret = &*v;
     if( !ret )
        {
-       ConstContPair c = contPair(Container::DeviceUsable);
+       ConstContPair c = contPair(Container::isBlkdev);
        ConstContIterator ci = c.begin();
        while( ci!=c.end() && (maj!=ci->majorNr() || min!=ci->minorNr()))
            ++ci;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-2.25.15/storage/SystemInfo/CmdParted.cc 
new/libstorage-2.25.15/storage/SystemInfo/CmdParted.cc
--- old/libstorage-2.25.15/storage/SystemInfo/CmdParted.cc      2014-06-05 
11:15:08.000000000 +0200
+++ new/libstorage-2.25.15/storage/SystemInfo/CmdParted.cc      2014-09-22 
16:59:15.000000000 +0200
@@ -36,7 +36,7 @@
 
 
     Parted::Parted(const string& device, bool do_probe)
-       : device(device), gpt_enlarge(false)
+       : device(device), implicit(false), gpt_enlarge(false)
     {
        if (do_probe)
            probe();
@@ -58,6 +58,7 @@
     void
     Parted::parse(const vector<string>& lines)
     {
+       implicit = false;
        gpt_enlarge = false;
        entries.clear();
 
@@ -104,6 +105,12 @@
        else
            y2war("could not find sector size");
 
+       pos = find_if(lines, string_starts_with("Disk Flags:"));
+       if (pos != lines.end())
+           scanDiskFlags(*pos);
+       else
+           y2war("could not find disk flags");
+
        gpt_enlarge = find_if(lines, string_starts_with("fix the GPT to use 
all")) != lines.end();
 
        if (label != "loop")
@@ -169,6 +176,9 @@
        s << "device:" << parted.device << " label:" << parted.label << " 
geometry:"
          << parted.geometry;
 
+       if (parted.implicit)
+           s << " implicit";
+
        if (parted.gpt_enlarge)
            s << " gpt_enlarge";
 
@@ -193,6 +203,13 @@
     }
 
 
+    void
+    Parted::scanDiskFlags(const string& line)
+    {
+       implicit = boost::contains(line, "implicit_partition_table");
+    }
+
+
     void
     Parted::scanGeometryLine(const string& line)
     {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-2.25.15/storage/SystemInfo/CmdParted.h 
new/libstorage-2.25.15/storage/SystemInfo/CmdParted.h
--- old/libstorage-2.25.15/storage/SystemInfo/CmdParted.h       2014-03-21 
17:06:30.000000000 +0100
+++ new/libstorage-2.25.15/storage/SystemInfo/CmdParted.h       2014-09-22 
16:59:15.000000000 +0200
@@ -56,6 +56,7 @@
        friend std::ostream& operator<<(std::ostream& s, const Entry& entry);
 
        const string& getLabel() const { return label; }
+       bool getImplicit() const { return implicit; }
        const Geometry& getGeometry() const { return geometry; }
        bool getGptEnlarge() const { return gpt_enlarge; }
 
@@ -73,10 +74,12 @@
 
        string device;
        string label;
+       bool implicit;
        Geometry geometry;
        bool gpt_enlarge;
        vector<Entry> entries;
 
+       void scanDiskFlags(const string& line);
        void scanSectorSizeLine(const string& line);
        void scanGeometryLine(const string& line);
        void scanCylEntryLine(const string& line);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-2.25.15/storage/gen_md5sum.cc 
new/libstorage-2.25.15/storage/gen_md5sum.cc
--- old/libstorage-2.25.15/storage/gen_md5sum.cc        2014-09-16 
16:43:35.000000000 +0200
+++ new/libstorage-2.25.15/storage/gen_md5sum.cc        2014-09-22 
17:00:20.000000000 +0200
@@ -1,5 +1,5 @@
-#define SOURCES_MD5SUM   "2c7b22c16d38d390274f11a3a58c5234"
-#define SOURCES_MD5_DATE " Tue 16 Sep 16:43:35 CEST 2014 "
+#define SOURCES_MD5SUM   "fee924f98da527cdda90876545c2b3d9"
+#define SOURCES_MD5_DATE " Mon Sep 22 17:00:20 CEST 2014 "
 namespace storage
 {
 const char* GetSourceMd5() { return SOURCES_MD5SUM; }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-2.25.15/testsuite/parted.cc 
new/libstorage-2.25.15/testsuite/parted.cc
--- old/libstorage-2.25.15/testsuite/parted.cc  2014-06-05 11:15:08.000000000 
+0200
+++ new/libstorage-2.25.15/testsuite/parted.cc  2014-09-22 16:59:15.000000000 
+0200
@@ -156,6 +156,39 @@
 }
 
 
+void
+parse5()
+{
+    cout << "parse5" << endl;
+
+    vector<string> lines = {
+       "Model: IBM S390 DASD drive (dasd)",
+       "Disk /dev/dasdc: 244cyl",
+       "Sector size (logical/physical): 512B/512B",
+       "BIOS cylinder,head,sector geometry: 244,16,128.  Each cylinder is 
1049kB.",
+       "Partition Table: dasd",
+       "Disk Flags: implicit_partition_table",
+       "",
+       "Number  Start  End     Size    File system  Flags",
+       " 1      0cyl   244cyl  244cyl",
+       "",
+       "Model: IBM S390 DASD drive (dasd)",
+       "Disk /dev/dasdc: 500000s",
+       "Sector size (logical/physical): 512B/512B",
+       "Partition Table: dasd",
+       "Disk Flags: implicit_partition_table",
+       "",
+       "Number  Start  End      Size     File system  Flags",
+       " 1      2s     499999s  499998s"
+    };
+
+    Parted parted("/dev/dasdc", false);
+    parted.parse(lines);
+
+    cout << parted << endl;
+}
+
+
 int
 main()
 {
@@ -167,4 +200,5 @@
     parse2();
     parse3();
     parse4();
+    parse5();
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-2.25.15/testsuite/single.out/parted.out 
new/libstorage-2.25.15/testsuite/single.out/parted.out
--- old/libstorage-2.25.15/testsuite/single.out/parted.out      2014-06-05 
11:15:08.000000000 +0200
+++ new/libstorage-2.25.15/testsuite/single.out/parted.out      2014-09-22 
16:59:15.000000000 +0200
@@ -21,3 +21,7 @@
 parse4
 device:/dev/sdb label:loop geometry:[9964,255,63,512]
 
+parse5
+device:/dev/dasdc label:dasd geometry:[244,16,128,512] implicit
+num:1 cylRegion:[0,244] secRegion:[2,499998] type:primary id:131
+

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

Reply via email to