Mailinglist Archive: yast-commit (723 mails)

< Previous Next >
[yast-commit] r47364 - /branches/tmp/aschnell/part-redesign/storage/src/modules/StorageFields.ycp
  • From: aschnell@xxxxxxxxxxxxxxxx
  • Date: Wed, 07 May 2008 15:46:17 -0000
  • Message-id: <20080507154618.03B3D2DCED@xxxxxxxxxxxxxxxx>
Author: aschnell
Date: Wed May 7 17:46:17 2008
New Revision: 47364

URL: http://svn.opensuse.org/viewcvs/yast?rev=47364&view=rev
Log:
- added comment

Modified:
branches/tmp/aschnell/part-redesign/storage/src/modules/StorageFields.ycp

Modified:
branches/tmp/aschnell/part-redesign/storage/src/modules/StorageFields.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/branches/tmp/aschnell/part-redesign/storage/src/modules/StorageFields.ycp?rev=47364&r1=47363&r2=47364&view=diff
==============================================================================
--- branches/tmp/aschnell/part-redesign/storage/src/modules/StorageFields.ycp
(original)
+++ branches/tmp/aschnell/part-redesign/storage/src/modules/StorageFields.ycp
Wed May 7 17:46:17 2008
@@ -726,13 +726,26 @@
}


+ /**
+ * The device must be the device entry in the target-map, e.g. "/dev/sda1",
+ * not something like "LABEL=test".
+ */
global string OverviewContent(list<symbol> fields, map<string, map>
target_map, string device)
{
- map disk = Storage::GetDisk(target_map, device);
- map part = Storage::GetPartition(target_map, device);
+ map disk = target_map[device]:nil;
+ map part = nil;

- if (part == $[])
- part = nil;
+ if (disk == nil)
+ {
+ foreach(string s, map d, target_map, {
+ if (part == nil)
+ {
+ part = find(map p, d["partitions"]:[], { return
p["device"]:"" == device; });
+ if (part != nil)
+ disk = d;
+ }
+ });
+ }

string content = mergestring(maplist(symbol field, fields, {
if (field == `newline)

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

< Previous Next >
This Thread
  • No further messages