Mailinglist Archive: yast-commit (953 mails)

< Previous Next >
[yast-commit] r49612 - in /trunk/storage/libstorage/src: Lock.cc Lock.h
  • From: aschnell@xxxxxxxxxxxxxxxx
  • Date: Sun, 03 Aug 2008 22:12:41 -0000
  • Message-id: <20080803221241.BB09F2F135@xxxxxxxxxxxxxxxx>
Author: aschnell
Date: Mon Aug 4 00:12:41 2008
New Revision: 49612

URL: http://svn.opensuse.org/viewcvs/yast?rev=49612&view=rev
Log:
- a bit better disabling

Modified:
trunk/storage/libstorage/src/Lock.cc
trunk/storage/libstorage/src/Lock.h

Modified: trunk/storage/libstorage/src/Lock.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Lock.cc?rev=49612&r1=49611&r2=49612&view=diff
==============================================================================
--- trunk/storage/libstorage/src/Lock.cc (original)
+++ trunk/storage/libstorage/src/Lock.cc Mon Aug 4 00:12:41 2008
@@ -30,9 +30,9 @@


Lock::Lock(bool readonly)
- : fd(-1)
+ : fd(-1), disabled(getenv("YAST2_STORAGE_NO_LOCKING") != NULL)
{
- if (getenv("YAST2_STORAGE_NO_LOCKING") != NULL)
+ if (disabled)
return;

y2mil("getting " << (readonly ? "read-only" : "read-write") << " lock");
@@ -83,7 +83,7 @@

Lock::~Lock() throw()
{
- if (getenv("YAST2_STORAGE_NO_LOCKING") != NULL)
+ if (disabled)
return;

y2mil("releasing lock");

Modified: trunk/storage/libstorage/src/Lock.h
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Lock.h?rev=49612&r1=49611&r2=49612&view=diff
==============================================================================
--- trunk/storage/libstorage/src/Lock.h (original)
+++ trunk/storage/libstorage/src/Lock.h Mon Aug 4 00:12:41 2008
@@ -44,6 +44,7 @@
private:

int fd;
+ bool disabled;

};
}

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

< Previous Next >
This Thread
  • No further messages