Mailinglist Archive: yast-commit (759 mails)

< Previous Next >
[yast-commit] r45762 - in /trunk/storage: VERSION package/yast2-storage.changes storage/src/modules/Storage.ycp
  • From: aschnell@xxxxxxxxxxxxxxxx
  • Date: Wed, 26 Mar 2008 16:22:18 -0000
  • Message-id: <20080326162218.AB9052A45A@xxxxxxxxxxxxxxxx>
Author: aschnell
Date: Wed Mar 26 17:22:18 2008
New Revision: 45762

URL: http://svn.opensuse.org/viewcvs/yast?rev=45762&view=rev
Log:
- fixed DeviceMatchFstab for non kernel name devices (bnc #361250)

Modified:
trunk/storage/VERSION
trunk/storage/package/yast2-storage.changes
trunk/storage/storage/src/modules/Storage.ycp

Modified: trunk/storage/VERSION
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/storage/VERSION?rev=45762&r1=45761&r2=45762&view=diff
==============================================================================
--- trunk/storage/VERSION (original)
+++ trunk/storage/VERSION Wed Mar 26 17:22:18 2008
@@ -1 +1 @@
-2.16.14
+2.16.15

Modified: trunk/storage/package/yast2-storage.changes
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/storage/package/yast2-storage.changes?rev=45762&r1=45761&r2=45762&view=diff
==============================================================================
--- trunk/storage/package/yast2-storage.changes (original)
+++ trunk/storage/package/yast2-storage.changes Wed Mar 26 17:22:18 2008
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Wed Mar 26 17:18:52 CET 2008 - aschnell@xxxxxxx
+
+- fixed DeviceMatchFstab for non kernel name devices (bnc #361250)
+- version 2.16.15
+
+-------------------------------------------------------------------
Wed Mar 26 10:40:19 CET 2008 - aschnell@xxxxxxx

- removed LVM1 button (fate #303490)

Modified: trunk/storage/storage/src/modules/Storage.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/modules/Storage.ycp?rev=45762&r1=45761&r2=45762&view=diff
==============================================================================
--- trunk/storage/storage/src/modules/Storage.ycp (original)
+++ trunk/storage/storage/src/modules/Storage.ycp Wed Mar 26 17:22:18 2008
@@ -578,7 +578,7 @@
StorageMap["targets_time"] = change_time;
}

-/* eturn list of partitions of map <tg> */
+/* return list of partitions of map <tg> */
define list<map> GetPartitionLst( map<string,map> tg, string device )
``{
list<map> ret = [];
@@ -6921,13 +6921,27 @@
return( ret );
}

+
+global boolean IsKernelDeviceName(string device)
+{
+ return substring(device, 0, 6) != "LABEL=" &&
+ substring(device, 0, 5) != "UUID=" &&
+ substring(device, 0, 13) != "/dev/disk/by-";
+}
+
+
global boolean DeviceMatchFstab( string device, string fstab_spec )
{
boolean ret = false;
map<string,map> tg = GetTargetMap();
- string ts = GetTranslatedDevices( $[], $[], [ fstab_spec ] )[0]:"";
- if( ts!=fstab_spec )
- y2milestone( "DeviceMatchFstab translate %1 --> %2", fstab_spec, ts );
+ string ts = fstab_spec;
+ if (IsKernelDeviceName(fstab_spec))
+ {
+ // translate fstab_spec from old to new kernel device name
+ ts = GetTranslatedDevices( $[], $[], [ fstab_spec ] )[0]:"";
+ if( ts!=fstab_spec )
+ y2milestone( "DeviceMatchFstab translate %1 --> %2", fstab_spec, ts
);
+ }
list<map> pl = GetPartitionLst( tg, ts );
ret = find( map p, pl, ``(p["device"]:"" == device) )!=nil;
y2milestone( "DeviceMatchFstab device:%1 fstab:%2 ret:%3", device,

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

< Previous Next >
This Thread
  • No further messages