Mailinglist Archive: yast-commit (98 mails)

< Previous Next >
[yast-commit] r67049 - in /branches/SuSE-Code-11-SP2-Branch/storage: libstorage/src/ package/ storage/src/include/
Author: aschnell
Date: Wed Dec 21 12:38:25 2011
New Revision: 67049

URL: http://svn.opensuse.org/viewcvs/yast?rev=67049&view=rev
Log:
- handle FBA DASD with parted instead of fdasd (bnc#584703)

Modified:
branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Dasd.cc
branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Dasd.h
branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Dasdview.cc
branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Dasdview.h
branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Disk.cc
branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Disk.h
branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Storage.cc
branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/SystemInfo.h
branches/SuSE-Code-11-SP2-Branch/storage/package/yast2-storage.changes
branches/SuSE-Code-11-SP2-Branch/storage/storage/src/include/ep-hd-lib.ycp
branches/SuSE-Code-11-SP2-Branch/storage/storage/src/include/ep-hd.ycp

Modified: branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Dasd.cc
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Dasd.cc?rev=67049&r1=67048&r2=67049&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Dasd.cc (original)
+++ branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Dasd.cc Wed Dec 21
12:38:25 2011
@@ -84,7 +84,7 @@
detected_label = "dasd";
setLabelData( "dasd" );

- Dasdview dasdview(device());
+ const Dasdview& dasdview = systeminfo.getDasdview(device());
new_geometry = geometry = dasdview.getGeometry();
fmt = dasdview.getDasdFormat();
ronly = fmt != DASDF_CDL;
@@ -547,6 +547,15 @@
}


+ string
+ Dasd::defaultLabel() const
+ {
+ string ret = "dasd";
+ y2mil("ret:" << ret);
+ return ret;
+ }
+
+
std::ostream& operator<< (std::ostream& s, const Dasd& d )
{
s << dynamic_cast<const Disk&>(d);

Modified: branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Dasd.h
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Dasd.h?rev=67049&r1=67048&r2=67049&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Dasd.h (original)
+++ branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Dasd.h Wed Dec 21
12:38:25 2011
@@ -41,6 +41,7 @@
public:

enum DasdFormat { DASDF_NONE, DASDF_LDL, DASDF_CDL };
+ enum DasdType { DASDTYPE_NONE, DASDTYPE_ECKD, DASDTYPE_FBA };

Dasd(Storage* s, const string& name, const string& device, unsigned
long long Size,
SystemInfo& systeminfo);
@@ -54,6 +55,7 @@
int changePartitionId( unsigned nr, unsigned id ) { return 0; }
int resizePartition( Partition* p, unsigned long newCyl );
int initializeDisk( bool value );
+ virtual string defaultLabel() const;
Text fdasdText() const;
Text dasdfmtText( bool doing ) const;
static Text dasdfmtTexts(bool doing, const list<string>& devs);

Modified: branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Dasdview.cc
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Dasdview.cc?rev=67049&r1=67048&r2=67049&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Dasdview.cc
(original)
+++ branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Dasdview.cc Wed Dec
21 12:38:25 2011
@@ -32,7 +32,7 @@
{

Dasdview::Dasdview(const string& device)
- : dasd_format(Dasd::DASDF_NONE)
+ : dasd_format(Dasd::DASDF_NONE), dasd_type(Dasd::DASDTYPE_NONE)
{
SystemCmd cmd(DASDVIEWBIN " --extended " + quote(device));

@@ -50,6 +50,18 @@
dasd_format = Dasd::DASDF_LDL;
}

+ if (cmd.select("^type") > 0)
+ {
+ string tmp = cmd.getLine(0, true);
+ y2mil("Type line:" << tmp);
+ tmp = tmp.erase(0, tmp.find(':') + 1);
+ tmp = extractNthWord(0, tmp);
+ if (tmp == "ECKD")
+ dasd_type = Dasd::DASDTYPE_ECKD;
+ else if (tmp == "FBA")
+ dasd_type = Dasd::DASDTYPE_FBA;
+ }
+
scanGeometry(cmd);
}
else

Modified: branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Dasdview.h
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Dasdview.h?rev=67049&r1=67048&r2=67049&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Dasdview.h
(original)
+++ branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Dasdview.h Wed Dec
21 12:38:25 2011
@@ -42,11 +42,13 @@

const Geometry& getGeometry() const { return geometry; }
Dasd::DasdFormat getDasdFormat() const { return dasd_format; }
+ Dasd::DasdType getDasdType() const { return dasd_type; }

private:

Geometry geometry;
Dasd::DasdFormat dasd_format;
+ Dasd::DasdType dasd_type;

void scanGeometry(SystemCmd& cmd);


Modified: branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Disk.cc
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Disk.cc?rev=67049&r1=67048&r2=67049&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Disk.cc (original)
+++ branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Disk.cc Wed Dec 21
12:38:25 2011
@@ -651,12 +651,6 @@
{
string ret = "msdos";

- if (isDasd())
- {
- ret = "dasd";
- }
- else
- {
const ArchInfo& archinfo = getStorage()->getArchInfo();
unsigned long long num_sectors = kbToSector(size_k);
y2mil("num_sectors:" << num_sectors);
@@ -674,7 +668,6 @@
ret = "mac";
else if (archinfo.arch == "ppc" && archinfo.is_ppc_pegasos)
ret = "amiga";
- }

y2mil("ret:" << ret);
return ret;

Modified: branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Disk.h
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Disk.h?rev=67049&r1=67048&r2=67049&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Disk.h (original)
+++ branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Disk.h Wed Dec 21
12:38:25 2011
@@ -273,7 +273,7 @@

void setLabelData( const string& );

- string defaultLabel() const;
+ virtual string defaultLabel() const;

static const label_info labels[];
static const string p_disks[];

Modified: branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Storage.cc
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Storage.cc?rev=67049&r1=67048&r2=67049&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Storage.cc
(original)
+++ branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Storage.cc Wed Dec
21 12:38:25 2011
@@ -844,6 +844,14 @@
if (sysfsinfo.range > 1 && (sysfsinfo.size > 0 || dn.find("dasd")
== 0))
{
DiskData::DTyp t = (dn.find("dasd") == 0) ? DiskData::DASD :
DiskData::DISK;
+
+ if (t == DiskData::DASD)
+ {
+ const Dasdview& dasdview = systeminfo.getDasdview("/dev/" +
dn);
+ if (dasdview.getDasdType() == Dasd::DASDTYPE_FBA)
+ t = DiskData::DISK;
+ }
+
dl.push_back(DiskData(dn, t, sysfsinfo.size / 2));
}
else if (sysfsinfo.range == 1 && sysfsinfo.size > 0)

Modified: branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/SystemInfo.h
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/SystemInfo.h?rev=67049&r1=67048&r2=67049&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/SystemInfo.h
(original)
+++ branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/SystemInfo.h Wed
Dec 21 12:38:25 2011
@@ -75,6 +75,7 @@
const Blkid& getBlkid() { return *blkid; }
const Lsscsi& getLsscsi() { return *lsscsi; }
const Parted& getParted(const string& device) { return
parteds.get(device); }
+ const Dasdview& getDasdview(const string& device) { return
dasdviews.get(device); }
const Fdasd& getFdasd(const string& device) { return
fdasds.get(device); }
const CmdDmsetup& getCmdDmsetup() { return *cmddmsetup; }
const CmdDmraid& getCmdDmraid() { return *cmddmraid; }
@@ -129,6 +130,7 @@
LazyObject<Lsscsi> lsscsi;
LazyObjects<Parted> parteds;
LazyObjects<Fdasd> fdasds;
+ LazyObjects<Dasdview> dasdviews;
LazyObject<CmdDmsetup> cmddmsetup;
LazyObject<CmdDmraid> cmddmraid;
LazyObject<CmdMultipath> cmdmultipath;

Modified: branches/SuSE-Code-11-SP2-Branch/storage/package/yast2-storage.changes
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/storage/package/yast2-storage.changes?rev=67049&r1=67048&r2=67049&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/storage/package/yast2-storage.changes
(original)
+++ branches/SuSE-Code-11-SP2-Branch/storage/package/yast2-storage.changes Wed
Dec 21 12:38:25 2011
@@ -1,4 +1,9 @@
-------------------------------------------------------------------
+Wed Dec 21 12:04:31 CET 2011 - aschnell@xxxxxxx
+
+- handle FBA DASD with parted instead of fdasd (bnc#584703)
+
+-------------------------------------------------------------------
Tue Dec 20 15:05:13 CET 2011 - aschnell@xxxxxxx

- ask user to activate multipath if setup appears to be multipath

Modified:
branches/SuSE-Code-11-SP2-Branch/storage/storage/src/include/ep-hd-lib.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/storage/storage/src/include/ep-hd-lib.ycp?rev=67049&r1=67048&r2=67049&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/storage/storage/src/include/ep-hd-lib.ycp
(original)
+++ branches/SuSE-Code-11-SP2-Branch/storage/storage/src/include/ep-hd-lib.ycp
Wed Dec 21 12:38:25 2011
@@ -32,8 +32,12 @@
string default_label = Storage::DefaultDiskLabel(disk_device);

list<string> labels = [ default_label ];
- if (!contains(labels, "gpt"))
- labels = add(labels, "gpt");
+
+ if (default_label != "dasd")
+ {
+ if (!contains(labels, "gpt"))
+ labels = add(labels, "gpt");
+ }

string label = default_label;
if (size(labels) > 1)

Modified: branches/SuSE-Code-11-SP2-Branch/storage/storage/src/include/ep-hd.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/storage/storage/src/include/ep-hd.ycp?rev=67049&r1=67048&r2=67049&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/storage/storage/src/include/ep-hd.ycp
(original)
+++ branches/SuSE-Code-11-SP2-Branch/storage/storage/src/include/ep-hd.ycp Wed
Dec 21 12:38:25 2011
@@ -299,13 +299,10 @@

list<term> expert_cmds = [];

- if (!String::StartsWith(device, "/dev/dasd"))
- {
- expert_cmds = add(expert_cmds,
- `item(`id(`create_partition_table),
- // menu entry text
- _("Create New Partition Table")));
- }
+ expert_cmds = add(expert_cmds,
+ `item(`id(`create_partition_table),
+ // menu entry text
+ _("Create New Partition Table")));

expert_cmds = add(expert_cmds,
`item(`id(`clone_disk),

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages