Author: aschnell
Date: Tue Apr 21 11:54:24 2009
New Revision: 56874
URL: http://svn.opensuse.org/viewcvs/yast?rev=56874&view=rev
Log:
- check backup state name
Modified:
trunk/storage/libstorage/src/Storage.cc
trunk/storage/libstorage/src/StorageInterface.h
Modified: trunk/storage/libstorage/src/Storage.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Storage.cc?rev=56874&r1=56873&r2=56874&view=diff
==============================================================================
--- trunk/storage/libstorage/src/Storage.cc (original)
+++ trunk/storage/libstorage/src/Storage.cc Tue Apr 21 11:54:24 2009
@@ -5532,6 +5532,8 @@
int ret = readonly?STORAGE_CHANGE_READONLY:0;
assertInit();
y2mil("name:" << name);
+ if (ret == 0 && name.empty())
+ ret = STORAGE_INVALID_BACKUP_STATE_NAME;
if( ret==0 )
{
if (checkBackupState(name))
@@ -5611,14 +5613,13 @@
bool verbose_log) const
{
y2mil("lhs:" << lhs << " rhs:" << rhs << " verbose:" << verbose_log);
- map::const_iterator i;
const CCont* l = NULL;
const CCont* r = NULL;
if( lhs.empty() )
l = &cont;
else
{
- i = backups.find( lhs );
+ map::const_iterator i = backups.find(lhs);
if( i!=backups.end() )
l = &i->second;
}
@@ -5626,7 +5627,7 @@
r = &cont;
else
{
- i = backups.find( rhs );
+ map::const_iterator i = backups.find(rhs);
if( i!=backups.end() )
r = &i->second;
}
Modified: trunk/storage/libstorage/src/StorageInterface.h
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/StorageInterface.h?rev=56874&r1=56873&r2=56874&view=diff
==============================================================================
--- trunk/storage/libstorage/src/StorageInterface.h (original)
+++ trunk/storage/libstorage/src/StorageInterface.h Tue Apr 21 11:54:24 2009
@@ -525,6 +525,7 @@
STORAGE_RESIZE_INVALID_CONTAINER = -2029,
STORAGE_DMMULTIPATH_CO_NOT_FOUND = -2030,
STORAGE_ZERO_DEVICE_FAILED = -2031,
+ STORAGE_INVALID_BACKUP_STATE_NAME = -2032,
VOLUME_COMMIT_UNKNOWN_STAGE = -3000,
VOLUME_FSTAB_EMPTY_MOUNT = -3001,
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org