Hello community,
here is the log from the commit of package yast2-storage
checked in at Sat Aug 2 02:04:48 CEST 2008.
--------
--- yast2-storage/yast2-storage.changes 2008-07-26 18:52:16.000000000 +0200
+++ yast2-storage/yast2-storage.changes 2008-07-31 15:40:18.520766000 +0200
@@ -1,0 +2,19 @@
+Thu Jul 31 15:29:12 CEST 2008 - aschnell@suse.de
+
+- recognise NetBSD partitions (bnc #412244)
+- version 2.17.7
+
+-------------------------------------------------------------------
+Wed Jul 30 09:57:59 CEST 2008 - aschnell@suse.de
+
+- fixed segmentation fault (bnc #405129)
+- version 2.17.6
+
+-------------------------------------------------------------------
+Mon Jul 28 12:45:35 CEST 2008 - aschnell@suse.de
+
+- quoting of device names (bnc #396732)
+- documentation fixes
+- version 2.17.5
+
+-------------------------------------------------------------------
Old:
----
yast2-storage-2.17.4.tar.bz2
New:
----
yast2-storage-2.17.7.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-storage.spec ++++++
--- /var/tmp/diff_new_pack.J10438/_old 2008-08-02 01:56:16.000000000 +0200
+++ /var/tmp/diff_new_pack.J10438/_new 2008-08-02 01:56:16.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-storage (Version 2.17.4)
+# spec file for package yast2-storage (Version 2.17.7)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -12,12 +12,12 @@
Name: yast2-storage
-Version: 2.17.4
+Version: 2.17.7
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-storage-2.17.4.tar.bz2
+Source0: yast2-storage-2.17.7.tar.bz2
Prefix: /usr
BuildRequires: blocxx-devel boost-devel docbook-xsl-stylesheets doxygen gcc-c++ libxcrypt-devel libxslt openssl-devel perl-XML-Writer sablot sgml-skel swig update-desktop-files yast2 yast2-core-devel yast2-devtools yast2-perl-bindings yast2-testsuite
Requires: parted yast2-storage-lib = %version yast2-perl-bindings mdadm lvm2 dmraid kpartx cryptsetup
@@ -51,7 +51,7 @@
Arvin Schnell
%prep
-%setup -n yast2-storage-2.17.4
+%setup -n yast2-storage-2.17.7
%build
%{prefix}/bin/y2tool y2autoconf
@@ -84,8 +84,6 @@
# storage
%dir /usr/share/YaST2/include/partitioning
/usr/share/YaST2/include/partitioning/*.ycp
-%dir /usr/share/YaST2/include/storage
-/usr/share/YaST2/include/storage/*.ycp
/usr/share/YaST2/clients/inst_custom_part.ycp
/usr/share/YaST2/clients/inst_lvm_lv.ycp
/usr/share/YaST2/clients/inst_resize_ui.ycp
@@ -124,7 +122,6 @@
%package lib
License: GPL v2 or later
-Requires: blocxx
Summary: YaST2 - Storage Configuration Library
Group: System/YaST
@@ -146,6 +143,9 @@
%post lib
/sbin/ldconfig
+%postun lib
+/sbin/ldconfig
+
%package devel
License: GPL v2 or later
Requires: blocxx-devel libstdc++-devel yast2-storage = %version
@@ -173,6 +173,16 @@
%doc %{prefix}/share/doc/packages/yast2-storage/libstorage
%doc %{prefix}/share/doc/packages/yast2-storage/config.xml.description
%changelog
+* Thu Jul 31 2008 aschnell@suse.de
+- recognise NetBSD partitions (bnc #412244)
+- version 2.17.7
+* Wed Jul 30 2008 aschnell@suse.de
+- fixed segmentation fault (bnc #405129)
+- version 2.17.6
+* Mon Jul 28 2008 aschnell@suse.de
+- quoting of device names (bnc #396732)
+- documentation fixes
+- version 2.17.5
* Sat Jul 26 2008 aschnell@suse.de
- added getUnusedPartitionSlots, nextFreeMd, computeMdSize,
byteToHumanString and humanStringToByte to libstorage
++++++ yast2-storage-2.17.4.tar.bz2 -> yast2-storage-2.17.7.tar.bz2 ++++++
++++ 1686 lines of diff (skipped)
++++ retrying with extended exclude list
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-storage-2.17.4/configure.in new/yast2-storage-2.17.7/configure.in
--- old/yast2-storage-2.17.4/configure.in 2008-07-26 18:43:40.000000000 +0200
+++ new/yast2-storage-2.17.7/configure.in 2008-07-31 15:30:26.000000000 +0200
@@ -1,9 +1,9 @@
dnl configure.in for yast2-storage
dnl
-dnl -- This file is generated by y2autoconf 2.17.3 - DO NOT EDIT! --
+dnl -- This file is generated by y2autoconf 2.17.5 - DO NOT EDIT! --
dnl (edit configure.in.in instead)
-AC_INIT(yast2-storage, 2.17.4, http://bugs.opensuse.org/, yast2-storage)
+AC_INIT(yast2-storage, 2.17.7, http://bugs.opensuse.org/, yast2-storage)
dnl Check for presence of file 'RPMNAME'
AC_CONFIG_SRCDIR([RPMNAME])
@@ -18,7 +18,7 @@
AM_INIT_AUTOMAKE(tar-ustar -Wno-portability)
dnl Important YaST2 variables
-VERSION="2.17.4"
+VERSION="2.17.7"
RPMNAME="yast2-storage"
MAINTAINER="Arvin Schnell "
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-storage-2.17.4/libstorage/bindings/ycp/LibStorage.i new/yast2-storage-2.17.7/libstorage/bindings/ycp/LibStorage.i
--- old/yast2-storage-2.17.4/libstorage/bindings/ycp/LibStorage.i 2008-07-26 14:54:35.000000000 +0200
+++ new/yast2-storage-2.17.7/libstorage/bindings/ycp/LibStorage.i 2008-07-30 11:14:32.000000000 +0200
@@ -26,6 +26,7 @@
specialize_sequence(storage::LvmLvInfo, TO_PACK, FROM_PACK, CHECK)
specialize_sequence(storage::EvmsInfo, TO_PACK, FROM_PACK, CHECK)
specialize_sequence(storage::MdInfo, TO_PACK, FROM_PACK, CHECK)
+specialize_sequence(storage::MdStateInfo, TO_PACK, FROM_PACK, CHECK)
specialize_sequence(storage::LoopInfo, TO_PACK, FROM_PACK, CHECK)
specialize_sequence(storage::DmInfo, TO_PACK, FROM_PACK, CHECK)
specialize_sequence(storage::NfsInfo, TO_PACK, FROM_PACK, CHECK)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-storage-2.17.4/libstorage/src/AppUtil.cc new/yast2-storage-2.17.7/libstorage/src/AppUtil.cc
--- old/yast2-storage-2.17.4/libstorage/src/AppUtil.cc 2008-07-26 18:40:03.000000000 +0200
+++ new/yast2-storage-2.17.7/libstorage/src/AppUtil.cc 2008-07-28 09:50:29.000000000 +0200
@@ -84,23 +84,6 @@
return Found_bi;
}
-void timeMark(const char*const Text_pcv, bool PrintDiff_bi)
-{
- static unsigned long Start_ls;
- unsigned long Diff_li;
- struct timeb Time_ri;
-
- if (PrintDiff_bi)
- {
- ftime(&Time_ri);
- Diff_li = Time_ri.time % 1000000 * 1000 + Time_ri.millitm - Start_ls;
- }
- else
- {
- ftime(&Time_ri);
- Start_ls = Time_ri.time % 1000000 * 1000 + Time_ri.millitm;
- }
-}
void createPath(string Path_Cv)
{
@@ -335,22 +318,69 @@
dev.erase( 0, 5 );
}
-static blocxx::String component = "libstorage";
-void
-log_msg( unsigned level, const char* file, unsigned line, const char* func,
- const char* add_str, const char* format, ... )
+static const blocxx::String component = "libstorage";
+
+
+void createLogger(const string& lcomponent, const string& name,
+ const string& logpath, const string& logfile)
+{
+ using namespace blocxx;
+
+ if (logpath != "NULL" && logfile != "NULL")
{
+ String nm = name.c_str();
+ LoggerConfigMap configItems;
+ LogAppenderRef logApp;
+ if (logpath != "STDERR" && logfile != "STDERR" &&
+ logpath != "SYSLOG" && logfile != "SYSLOG")
+ {
+ String StrKey;
+ String StrPath;
+ StrKey.format("log.%s.location", name.c_str());
+ StrPath = (logpath + "/" + logfile).c_str();
+ configItems[StrKey] = StrPath;
+ logApp =
+ LogAppender::createLogAppender(nm, LogAppender::ALL_COMPONENTS,
+ LogAppender::ALL_CATEGORIES,
+ "%d %-5p %c(%P) %F(%M):%L - %m",
+ LogAppender::TYPE_FILE,
+ configItems);
+ }
+ else if (logpath == "STDERR" && logfile == "STDERR")
+ {
+ logApp =
+ LogAppender::createLogAppender(nm, LogAppender::ALL_COMPONENTS,
+ LogAppender::ALL_CATEGORIES,
+ "%d %-5p %c(%P) %F(%M):%L - %m",
+ LogAppender::TYPE_STDERR,
+ configItems);
+ }
+ else
+ {
+ logApp =
+ LogAppender::createLogAppender(nm, LogAppender::ALL_COMPONENTS,
+ LogAppender::ALL_CATEGORIES,
+ "%d %-5p %c(%P) %F(%M):%L - %m",
+ LogAppender::TYPE_SYSLOG,
+ configItems);
+ }
+
+ LogAppender::setDefaultLogAppender(logApp);
+ }
+}
+
+
+void
+logMsg(unsigned level, const char* file, unsigned line, const char* func,
+ const string& str)
+{
using namespace blocxx;
-#if BLOCXX_LIBRARY_VERSION >= 5
- ELogLevel curLevel = LogAppender::getCurrentLogAppender()->getLogLevel();
-#else
- ELogLevel curLevel = Logger::getCurrentLogger()->getLogLevel();
-#endif
- String category;
+ ELogLevel curLevel = LogAppender::getCurrentLogAppender()->getLogLevel();
+ String category;
switch( level )
- {
+ {
case 0:
if( curLevel >= ::blocxx::E_DEBUG_LEVEL)
category = Logger::STR_DEBUG_CATEGORY;
@@ -360,17 +390,8 @@
category = Logger::STR_INFO_CATEGORY;
break;
case 2:
-#if BLOCXX_LIBRARY_VERSION >= 5
if( curLevel >= ::blocxx::E_WARNING_LEVEL)
category = Logger::STR_WARNING_CATEGORY;
-#else
- if( curLevel >= ::blocxx::E_INFO_LEVEL)
- {
- category = Logger::STR_INFO_CATEGORY;
- if( add_str == NULL )
- add_str = "[WARNING]";
- }
-#endif
break;
case 3:
if( curLevel >= ::blocxx::E_ERROR_LEVEL)
@@ -380,101 +401,33 @@
if( curLevel >= ::blocxx::E_FATAL_ERROR_LEVEL)
category = Logger::STR_FATAL_CATEGORY;
break;
- }
-
- if( !category.empty())
- {
- char b[4096+1] = {'\0'};
- unsigned ret = 0;
- if( add_str != NULL && *add_str != '\0')
- ret = snprintf( b, sizeof(b), "%s ", add_str );
- if( ret= 5
- LogAppender::getCurrentLogAppender()->logMessage( LogMessage(component, category, String(b), file, line , func) );
-#else
- Logger::getCurrentLogger()->logMessage( component, category, String(b), file, line , func );
-#endif
- }
}
-int createLogger( const string& lcomponent, const string& name,
- const string& logpath, const string& logfile )
+ if (!category.empty())
{
- using namespace blocxx;
+ LogAppender::getCurrentLogAppender()->logMessage(LogMessage(component, category,
+ String(str), file,
+ line, func));
+ }
+}
-#if BLOCXX_LIBRARY_VERSION < 5
- // Add PID to our global component name in blocxx-1.x
- // that does not support the %P log format specifier.
- component = "libstorage(" + decString(getpid()) + ")";
-#endif
- if( logpath != "NULL" && logfile != "NULL" )
- {
- String nm = name.c_str();
- LoggerConfigMap configItems;
- LogAppenderRef logApp;
- if( logpath != "STDERR" && logfile != "STDERR" &&
- logpath != "SYSLOG" && logfile != "SYSLOG" )
- {
- String StrKey;
- String StrPath;
- StrKey.format("log.%s.location", name.c_str());
- StrPath = (logpath + "/" + logfile).c_str();
- configItems[StrKey] = StrPath;
- logApp =
- LogAppender::createLogAppender( nm, LogAppender::ALL_COMPONENTS,
- LogAppender::ALL_CATEGORIES,
-#if BLOCXX_LIBRARY_VERSION >= 5
- "%d %-5p %c(%P) %F(%M):%L - %m",
-#else
- "%d %-5p %c %F(%M):%L - %m",
-#endif
- LogAppender::TYPE_FILE,
- configItems );
- }
- else if( logpath == "STDERR" && logfile == "STDERR" )
- {
- logApp =
- LogAppender::createLogAppender( nm, LogAppender::ALL_COMPONENTS,
- LogAppender::ALL_CATEGORIES,
-#if BLOCXX_LIBRARY_VERSION >= 5
- "%d %-5p %c(%P) %F(%M):%L - %m",
-#else
- "%d %-5p %c %F(%M):%L - %m",
-#endif
- LogAppender::TYPE_STDERR,
- configItems );
- }
- else
- {
- logApp =
- LogAppender::createLogAppender( nm, LogAppender::ALL_COMPONENTS,
- LogAppender::ALL_CATEGORIES,
-#if BLOCXX_LIBRARY_VERSION >= 5
- "%d %-5p %c(%P) %F(%M):%L - %m",
-#else
- "%d %-5p %c %F(%M):%L - %m",
-#endif
- LogAppender::TYPE_SYSLOG,
- configItems );
- }
-#if BLOCXX_LIBRARY_VERSION >= 5
- LogAppender::setDefaultLogAppender(logApp);
-#else
- LoggerRef log( new AppenderLogger( lcomponent.c_str(), E_INFO_LEVEL,
- logApp));
- Logger::setDefaultLogger(log);
-#endif
- }
- return( 0 );
- }
+void
+logMsgVaArgs(unsigned level, const char* file, unsigned line, const char* func,
+ const char* format, ...)
+{
+ char* str;
+ va_list ap;
+
+ va_start(ap, format);
+ if (vasprintf(&str, format, ap) == -1)
+ return;
+ va_end(ap);
+
+ logMsg(level, file, line, func, str);
+
+ free(str);
+}
void getFindMap( const char* path, map& m, bool unique )
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-storage-2.17.4/libstorage/src/AppUtil.h new/yast2-storage-2.17.7/libstorage/src/AppUtil.h
--- old/yast2-storage-2.17.4/libstorage/src/AppUtil.h 2008-07-26 18:40:03.000000000 +0200
+++ new/yast2-storage-2.17.7/libstorage/src/AppUtil.h 2008-07-28 09:50:29.000000000 +0200
@@ -25,7 +25,6 @@
bool searchFile(AsciiFile& File_Cr, string Pat_Cv, string& Line_Cr);
bool searchFile(AsciiFile& File_Cr, string Pat_Cv, string& Line_Cr,
int& StartLine_ir);
-void timeMark(const char*const Text_pcv, bool PrintDiff_bi = true);
void createPath(string Path_Cv);
bool checkNormalFile(string Path_Cv);
bool checkDir(string Path_Cv);
@@ -48,35 +47,37 @@
string undevDevice( const string& dev );
void undevDevice( string& dev );
bool isNfsDev( const string& dev );
-void delay(int Microsec_iv);
unsigned getMajorDevices( const string& driver );
-int createLogger( const string& component, const string& name,
- const string& logpath, const string& logfile );
+void createLogger(const string& component, const string& name,
+ const string& logpath, const string& logfile);
-void log_msg( unsigned level, const char* file, unsigned line,
- const char* func, const char* add_str, const char* format, ... )
- __attribute__ ((format(printf, 6, 7)));
-
-#define y2debug(format, ...) \
- log_msg( 0, __FILE__, __LINE__, __FUNCTION__, NULL, format, ##__VA_ARGS__ )
-#define y2milestone(format, ...) \
- log_msg( 1, __FILE__, __LINE__, __FUNCTION__, NULL, format, ##__VA_ARGS__ )
-#define y2warning(format, ...) \
- log_msg( 2, __FILE__, __LINE__, __FUNCTION__, NULL, format, ##__VA_ARGS__ )
-#define y2error(format, ...) \
- log_msg( 3, __FILE__, __LINE__, __FUNCTION__, NULL, format, ##__VA_ARGS__ )
-
-#define y2deb(op) log_op( 0, __FILE__, __LINE__, __FUNCTION__, NULL, op )
-#define y2mil(op) log_op( 1, __FILE__, __LINE__, __FUNCTION__, NULL, op )
-#define y2war(op) log_op( 2, __FILE__, __LINE__, __FUNCTION__, NULL, op )
-#define y2err(op) log_op( 3, __FILE__, __LINE__, __FUNCTION__, NULL, op )
-
-#define log_op(level, file, line, function, add, op) \
- do { \
- std::ostringstream __buf; \
- __buf << op; \
- log_msg(level, file, line, function, add, "%s", __buf.str().c_str()); \
+void logMsg(unsigned level, const char* file, unsigned line,
+ const char* func, const string& str);
+
+void logMsgVaArgs(unsigned level, const char* file, unsigned line,
+ const char* func, const char* format, ...)
+ __attribute__ ((format(printf, 5, 6)));
+
+#define y2debug(format, ...) \
+ logMsgVaArgs(0, __FILE__, __LINE__, __FUNCTION__, format, ##__VA_ARGS__)
+#define y2milestone(format, ...) \
+ logMsgVaArgs(1, __FILE__, __LINE__, __FUNCTION__, format, ##__VA_ARGS__)
+#define y2warning(format, ...) \
+ logMsgVaArgs(2, __FILE__, __LINE__, __FUNCTION__, format, ##__VA_ARGS__)
+#define y2error(format, ...) \
+ logMsgVaArgs(3, __FILE__, __LINE__, __FUNCTION__, format, ##__VA_ARGS__)
+
+#define y2deb(op) y2log_op(0, __FILE__, __LINE__, __FUNCTION__, op)
+#define y2mil(op) y2log_op(1, __FILE__, __LINE__, __FUNCTION__, op)
+#define y2war(op) y2log_op(2, __FILE__, __LINE__, __FUNCTION__, op)
+#define y2err(op) y2log_op(3, __FILE__, __LINE__, __FUNCTION__, op)
+
+#define y2log_op(level, file, line, function, op) \
+ do { \
+ std::ostringstream __buf; \
+ __buf << op; \
+ logMsg(level, file, line, function, __buf.str()); \
} while (0)
string sformat(const char* format, ...);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-storage-2.17.4/libstorage/src/DerefIterator.h new/yast2-storage-2.17.7/libstorage/src/DerefIterator.h
--- old/yast2-storage-2.17.4/libstorage/src/DerefIterator.h 2008-07-21 17:22:15.000000000 +0200
+++ new/yast2-storage-2.17.7/libstorage/src/DerefIterator.h 2008-07-27 10:57:26.000000000 +0200
@@ -23,7 +23,7 @@
DerefIterator& operator++() { Iter::operator++(); return(*this); }
DerefIterator operator++(int)
{
- y2warning( "Expensive ++ DerefIterator" );
+ y2war( "Expensive ++ DerefIterator" );
DerefIterator tmp(*this);
Iter::operator++();
return(tmp);
@@ -31,7 +31,7 @@
DerefIterator& operator--() { Iter::operator--(); return(*this); }
DerefIterator operator--(int)
{
- y2warning( "Expensive -- DerefIterator" );
+ y2war( "Expensive -- DerefIterator" );
DerefIterator tmp(*this);
Iter::operator--();
return(tmp);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-storage-2.17.4/libstorage/src/Disk.cc new/yast2-storage-2.17.7/libstorage/src/Disk.cc
--- old/yast2-storage-2.17.4/libstorage/src/Disk.cc 2008-07-26 18:40:03.000000000 +0200
+++ new/yast2-storage-2.17.7/libstorage/src/Disk.cc 2008-07-30 11:14:31.000000000 +0200
@@ -20,9 +20,7 @@
#include "y2storage/AsciiFile.h"
#include "y2storage/AppUtil.h"
#include "y2storage/SystemCmd.h"
-
-#define PARTEDBIN "/usr/sbin/parted"
-#define PARTEDCMD PARTEDBIN " -s " // blank at end !!
+#include "y2storage/StorageDefines.h"
using namespace std;
using namespace storage;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-storage-2.17.4/libstorage/src/Dm.cc new/yast2-storage-2.17.7/libstorage/src/Dm.cc
--- old/yast2-storage-2.17.4/libstorage/src/Dm.cc 2008-07-21 17:22:15.000000000 +0200
+++ new/yast2-storage-2.17.7/libstorage/src/Dm.cc 2008-07-28 14:24:42.000000000 +0200
@@ -54,7 +54,7 @@
{
if( dm_major==0 )
getDmMajor();
- SystemCmd c( "dmsetup table \"" + tname + "\"" );
+ SystemCmd c("dmsetup table " + quote(tname));
inactiv = c.retcode()!=0;
y2milestone( "table %s retcode:%d numLines:%u inactive:%d",
tname.c_str(), c.retcode(), c.numLines(), inactiv );
@@ -207,7 +207,7 @@
}
else
{
- c.execute( "dmsetup table \"" + *c.getLine(0) + "\"" );
+ c.execute("dmsetup table " + quote(*c.getLine(0)));
if( c.retcode()==0 && c.numLines()>0 )
{
pair = extractNthWord( 3, *c.getLine(0) );
@@ -489,7 +489,7 @@
int Dm::dmNumber( const string& table )
{
int ret = -1;
- SystemCmd c( "dmsetup -c --noheadings info \"" + table + "\"" );
+ SystemCmd c("dmsetup -c --noheadings info " + quote(table));
if( c.retcode()==0 && c.numLines()>0 )
{
list<string> sl = splitString( *c.getLine(0), ":" );
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-storage-2.17.4/libstorage/src/DmCo.cc new/yast2-storage-2.17.7/libstorage/src/DmCo.cc
--- old/yast2-storage-2.17.4/libstorage/src/DmCo.cc 2008-07-21 17:22:15.000000000 +0200
+++ new/yast2-storage-2.17.7/libstorage/src/DmCo.cc 2008-07-28 14:24:42.000000000 +0200
@@ -77,7 +77,7 @@
if( dev.substr( 0, 12 ) == "/dev/mapper/")
{
string tdev = dev.substr (12);
- SystemCmd c( "cryptsetup status \"" + tdev + "\"" );
+ SystemCmd c("cryptsetup status " + quote(tdev));
string cipher, keysize;
for( unsigned int i = 0; i < c.numLines(); i++)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-storage-2.17.4/libstorage/src/DmPartCo.cc new/yast2-storage-2.17.7/libstorage/src/DmPartCo.cc
--- old/yast2-storage-2.17.4/libstorage/src/DmPartCo.cc 2008-07-26 18:40:03.000000000 +0200
+++ new/yast2-storage-2.17.7/libstorage/src/DmPartCo.cc 2008-07-28 14:24:42.000000000 +0200
@@ -232,7 +232,7 @@
void
DmPartCo::init( ProcPart& ppart )
{
- SystemCmd c( "dmsetup table \"" + nm + "\"" );
+ SystemCmd c("dmsetup table " + quote(nm));
if( c.retcode()==0 && c.numLines()>=1 && isdigit( c.stdout()[0] ))
{
mnr = Dm::dmNumber( nm );
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-storage-2.17.4/libstorage/src/FilterIterator.h new/yast2-storage-2.17.7/libstorage/src/FilterIterator.h
--- old/yast2-storage-2.17.4/libstorage/src/FilterIterator.h 2008-07-21 17:22:15.000000000 +0200
+++ new/yast2-storage-2.17.7/libstorage/src/FilterIterator.h 2008-07-27 10:57:26.000000000 +0200
@@ -50,7 +50,7 @@
}
FilterIterator operator++(int)
{
- y2warning( "Expensive ++ FilterIterator" );
+ y2war( "Expensive ++ FilterIterator" );
FilterIterator tmp(*this);
++m_cur;
assertPred();
@@ -65,7 +65,7 @@
}
FilterIterator operator--(int)
{
- y2warning( "Expensive -- FilterIterator" );
+ y2war( "Expensive -- FilterIterator" );
FilterIterator tmp(*this);
--m_cur;
assertPred(false);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-storage-2.17.4/libstorage/src/ListListIterator.h new/yast2-storage-2.17.7/libstorage/src/ListListIterator.h
--- old/yast2-storage-2.17.4/libstorage/src/ListListIterator.h 2008-07-21 17:22:15.000000000 +0200
+++ new/yast2-storage-2.17.7/libstorage/src/ListListIterator.h 2008-07-27 10:57:26.000000000 +0200
@@ -49,7 +49,7 @@
}
ListListIterator operator++(int)
{
- y2warning( "Expensive ++ ListListIterator" );
+ y2war( "Expensive ++ ListListIterator" );
ListListIterator tmp(*this);
increment();
return tmp;
@@ -62,7 +62,7 @@
}
ListListIterator operator--(int)
{
- y2warning( "Expensive -- ListListIterator" );
+ y2war( "Expensive -- ListListIterator" );
ListListIterator tmp(*this);
decrement();
return tmp;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-storage-2.17.4/libstorage/src/LvmVg.cc new/yast2-storage-2.17.7/libstorage/src/LvmVg.cc
--- old/yast2-storage-2.17.4/libstorage/src/LvmVg.cc 2008-07-21 17:22:15.000000000 +0200
+++ new/yast2-storage-2.17.7/libstorage/src/LvmVg.cc 2008-07-30 17:27:23.000000000 +0200
@@ -10,6 +10,7 @@
#include "y2storage/SystemCmd.h"
#include "y2storage/AppUtil.h"
#include "y2storage/Storage.h"
+#include "y2storage/StorageDefines.h"
using namespace std;
using namespace storage;
@@ -496,7 +497,7 @@
void LvmVg::getVgData( const string& name, bool exists )
{
y2milestone( "name:%s", name.c_str() );
- SystemCmd c( "/sbin/vgdisplay --units k -v " + name );
+ SystemCmd c(VGDISPLAYBIN " --units k -v " + name);
unsigned cnt = c.numLines();
unsigned i = 0;
num_lv = 0;
@@ -959,7 +960,7 @@
l.clear();
string vgname;
string::size_type pos;
- SystemCmd c( "vgdisplay -s" );
+ SystemCmd c(VGDISPLAYBIN " -s");
if( !active && c.numLines()>0 )
active = true;
for( unsigned i=0; ishowInfoCb( removeVgText(true) );
}
checkConsistency();
- string cmd = "vgremove " + name();
+ string cmd = VGREMOVEBIN " " + name();
SystemCmd c( cmd );
if( c.retcode()!=0 )
{
@@ -1175,7 +1176,7 @@
getStorage()->showInfoCb( l->createText(true) );
}
checkConsistency();
- string cmd = "lvcreate " + instSysString() + " -l " + decString(l->getLe());
+ string cmd = LVCREATEBIN " " + instSysString() + " -l " + decString(l->getLe());
if( l->stripes()>1 )
{
cmd += " -i " + decString(l->stripes());
@@ -1223,7 +1224,7 @@
ret = v->prepareRemove();
if( ret==0 )
{
- string cmd = "lvremove -f " + instSysString() + " " + l->device();
+ string cmd = LVREMOVEBIN " -f " + instSysString() + " " + l->device();
SystemCmd c( cmd );
if( c.retcode()!=0 )
{
@@ -1335,15 +1336,15 @@
int ret = 0;
y2milestone( "dev:%s", device.c_str() );
SystemCmd c;
- string cmd = "mdadm --zero-superblock " + device;
+ string cmd = MDADMBIN " --zero-superblock " + quote(device);
c.execute( cmd );
getStorage()->removeDmTableTo( device );
if( getStorage()->isDisk(device) )
{
- cmd = "parted " + device + " mklabel msdos";
+ cmd = PARTEDCMD + quote(device) + " mklabel msdos";
c.execute( cmd );
}
- cmd = "echo y | pvcreate -ff " + metaString() + device;
+ cmd = "echo y | " PVCREATEBIN " -ff " + metaString() + device;
c.execute( cmd );
if( c.retcode()!=0 )
{
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-storage-2.17.4/libstorage/src/Makefile.am new/yast2-storage-2.17.7/libstorage/src/Makefile.am
--- old/yast2-storage-2.17.4/libstorage/src/Makefile.am 2008-07-26 14:54:35.000000000 +0200
+++ new/yast2-storage-2.17.7/libstorage/src/Makefile.am 2008-07-30 11:14:31.000000000 +0200
@@ -58,7 +58,8 @@
StorageTypes.cc StorageTypes.h \
FilterIterator.h ListListIterator.h \
DerefIterator.h IterPair.h \
- Region.h StorageTmpl.h
+ Region.h StorageTmpl.h \
+ StorageDefines.h
liby2storage_la_LDFLAGS = -version-info 2:0
liby2storage_la_LIBADD = -lblocxx
@@ -75,10 +76,6 @@
pkgincludedir = $(includedir)/y2storage
-# these go to $(pkgincludedir)
-
pkginclude_HEADERS = StorageInterface.h
-#<INSTALL-HEADER-TARGET>
-
CLEANFILES = $(BUILT_SOURCES)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-storage-2.17.4/libstorage/src/Md.cc new/yast2-storage-2.17.7/libstorage/src/Md.cc
--- old/yast2-storage-2.17.4/libstorage/src/Md.cc 2008-07-26 18:40:03.000000000 +0200
+++ new/yast2-storage-2.17.7/libstorage/src/Md.cc 2008-07-30 11:14:31.000000000 +0200
@@ -13,6 +13,7 @@
#include "y2storage/SystemCmd.h"
#include "y2storage/Regex.h"
#include "y2storage/Container.h"
+#include "y2storage/StorageDefines.h"
using namespace storage;
using namespace std;
@@ -46,7 +47,7 @@
setNameDev();
getMajorMinor( dev, mjr, mnr );
}
- SystemCmd c( "mdadm --detail " + quote(device()) );
+ SystemCmd c(MDADMBIN " --detail " + quote(device()));
c.select( "UUID : " );
string::size_type pos;
if( c.retcode()==0 && c.numLines(true)>0 )
@@ -59,11 +60,14 @@
c.select( "Version : " );
if( c.retcode()==0 && c.numLines(true)>0 )
sb_ver = extractNthWord( 2, *c.getLine(0,true) );
- y2mil( "line:\"" << *c.getLine(0,true) << "\"" );
- y2mil( "sb_ver:\"" << sb_ver << "\"" );
- y2mil( "word0:\"" << extractNthWord( 0, *c.getLine(0,true)) << "\"" );
- y2mil( "word1:\"" << extractNthWord( 1, *c.getLine(0,true)) << "\"" );
- y2mil( "word2:\"" << extractNthWord( 2, *c.getLine(0,true)) << "\"" );
+ if (c.retcode()==0 && c.numLines(true)>0 )
+ {
+ y2mil( "line:\"" << *c.getLine(0,true) << "\"" );
+ y2mil( "sb_ver:\"" << sb_ver << "\"" );
+ y2mil( "word0:\"" << extractNthWord( 0, *c.getLine(0,true)) << "\"" );
+ y2mil( "word1:\"" << extractNthWord( 1, *c.getLine(0,true)) << "\"" );
+ y2mil( "word2:\"" << extractNthWord( 2, *c.getLine(0,true)) << "\"" );
+ }
string tmp;
string line = line1;
if( (pos=line.find( ':' ))!=string::npos )
@@ -250,7 +254,7 @@
void
Md::getState(MdStateInfo& info) const
{
- SystemCmd c("mdadm --detail " + quote(device()));
+ SystemCmd c(MDADMBIN " --detail " + quote(device()));
c.select("State : ");
if( c.retcode()==0 && c.numLines(true)>0 )
@@ -310,7 +314,7 @@
string Md::createCmd() const
{
string cmd = "ls -l --full-time " + quote(devs) + " " + quote(spare) + "; ";
- cmd += "modprobe " + pName() + "; mdadm --create " + quote(device()) +
+ cmd += "modprobe " + pName() + "; " MDADMBIN " --create " + quote(device()) +
" --run --level=" + pName() + " -e 1.0";
if (pName() == "raid1" || pName() == "raid5" || pName() == "raid6" ||
pName() == "raid10")
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-storage-2.17.4/libstorage/src/Storage.cc new/yast2-storage-2.17.7/libstorage/src/Storage.cc
--- old/yast2-storage-2.17.4/libstorage/src/Storage.cc 2008-07-26 18:40:03.000000000 +0200
+++ new/yast2-storage-2.17.7/libstorage/src/Storage.cc 2008-07-29 17:00:40.000000000 +0200
@@ -3652,7 +3652,7 @@
}
-int Storage::getMdState(const string& name, MdStateInfo& info)
+int Storage::getMdStateInfo(const string& name, MdStateInfo& info)
{
int ret = 0;
assertInit();
@@ -4415,7 +4415,7 @@
}
tfile.close();
c.execute( "cat " + fname );
- c.execute( "dmsetup create " + tblname + " <" + fname );
+ c.execute("dmsetup create " + quote(tblname) + " <" + fname);
unlink( fname.c_str() );
}
EvmsCo::activateDevices();
@@ -5282,15 +5282,15 @@
bool Storage::removeDmTable( const string& table )
{
- SystemCmd c( "dmsetup table \"" + table + "\"" );
+ SystemCmd c("dmsetup table " + quote(table));
bool ret = false;
if( c.retcode()==0 )
{
- c.execute( "dmsetup info \"" + table + "\"" );
- c.execute( "dmsetup remove \"" + table + "\"" );
+ c.execute("dmsetup info " + quote(table));
+ c.execute("dmsetup remove " + quote(table));
waitForDevice();
ret = c.retcode()==0;
- c.execute( "dmsetup table | grep \"" + table + "\"" );
+ c.execute("dmsetup table | grep " + quote(table));
logProcData();
}
y2milestone( "ret:%d", ret );
@@ -6050,8 +6050,8 @@
ret = fsbuf.f_blocks;
ret *= fsbuf.f_bsize;
ret /= 1024;
- y2milestone( "blocks:%llu free:%llu bsize:%lu", fsbuf.f_blocks,
- fsbuf.f_bfree, fsbuf.f_bsize );
+ y2mil("blocks:" << fsbuf.f_blocks << " free:" << fsbuf.f_bfree <<
+ " bsize:" << fsbuf.f_bsize);
}
else
{
@@ -6123,9 +6123,9 @@
used = fsbuf.f_blocks-fsbuf.f_bfree;
used *= fsbuf.f_bsize;
used /= 1024;
- y2milestone( "blocks:%llu free:%llu bsize:%lu",
- fsbuf.f_blocks, fsbuf.f_bfree, fsbuf.f_bsize );
- y2milestone( "free:%llu used:%llu", df_free, used );
+ y2mil("blocks:" << fsbuf.f_blocks << " free:" << fsbuf.f_bfree <<
+ " bsize:" << fsbuf.f_bsize);
+ y2mil("free:" << df_free << " used:" << used);
}
if( ret && vol->getFs()==NTFS )
{
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-storage-2.17.4/libstorage/src/StorageDefines.h new/yast2-storage-2.17.7/libstorage/src/StorageDefines.h
--- old/yast2-storage-2.17.4/libstorage/src/StorageDefines.h 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-storage-2.17.7/libstorage/src/StorageDefines.h 2008-07-30 17:27:23.000000000 +0200
@@ -0,0 +1,20 @@
+#ifndef STORAGE_DEFINES_H
+#define STORAGE_DEFINES_H
+
+
+#define PARTEDBIN "/usr/sbin/parted"
+#define PARTEDCMD PARTEDBIN " -s " // blank at end !!
+
+#define MDADMBIN "/sbin/mdadm"
+
+#define PVCREATEBIN "/sbin/pvcreate"
+
+#define LVCREATEBIN "/sbin/lvcreate"
+#define LVREMOVEBIN "/sbin/lvremove"
+
+#define VGCREATEBIN "/sbin/vgcreate"
+#define VGREMOVEBIN "/sbin/vgremove"
+#define VGDISPLAYBIN "/sbin/vgdisplay"
+
+
+#endif
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-storage-2.17.4/libstorage/src/Storage.h new/yast2-storage-2.17.7/libstorage/src/Storage.h
--- old/yast2-storage-2.17.4/libstorage/src/Storage.h 2008-07-26 14:54:35.000000000 +0200
+++ new/yast2-storage-2.17.7/libstorage/src/Storage.h 2008-07-29 17:00:40.000000000 +0200
@@ -72,7 +72,7 @@
}
CastCheckIterator operator++(int)
{
- y2warning( "Expensive ++ CastCheckIterator" );
+ y2war( "Expensive ++ CastCheckIterator" );
CastCheckIterator tmp(*this);
_bclass::operator++();
return(tmp);
@@ -83,7 +83,7 @@
}
CastCheckIterator operator--(int)
{
- y2warning( "Expensive -- CastCheckIterator" );
+ y2war( "Expensive -- CastCheckIterator" );
CastCheckIterator tmp(*this);
_bclass::operator--();
return(tmp);
@@ -130,7 +130,7 @@
}
CastCheckFncIterator operator++(int)
{
- y2warning( "Expensive ++ CastCheckFncIterator" );
+ y2war( "Expensive ++ CastCheckFncIterator" );
CastCheckFncIterator tmp(*this);
_bclass::operator++();
return(tmp);
@@ -141,7 +141,7 @@
}
CastCheckFncIterator operator--(int)
{
- y2warning( "Expensive -- CastCheckFncIterator" );
+ y2war( "Expensive -- CastCheckFncIterator" );
CastCheckFncIterator tmp(*this);
_bclass::operator--();
return(tmp);
@@ -435,7 +435,7 @@
int changeMdChunk( const string& name, unsigned long chunk );
int changeMdParity( const string& name, storage::MdParity ptype );
int checkMd( const string& name );
- int getMdState(const string& name, MdStateInfo& info);
+ int getMdStateInfo(const string& name, MdStateInfo& info);
int computeMdSize(MdType md_type, list<string> devices,
unsigned long long& sizeK);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-storage-2.17.4/libstorage/src/StorageInterface.h new/yast2-storage-2.17.7/libstorage/src/StorageInterface.h
--- old/yast2-storage-2.17.4/libstorage/src/StorageInterface.h 2008-07-26 14:54:35.000000000 +0200
+++ new/yast2-storage-2.17.7/libstorage/src/StorageInterface.h 2008-07-30 11:14:31.000000000 +0200
@@ -148,8 +148,8 @@
* Contains info about a generic container.
*/
struct ContainerInfo
- {
- ContainerInfo() {};
+ {
+ ContainerInfo() {}
CType type;
unsigned volcnt;
string device;
@@ -157,14 +157,14 @@
UsedByType usedBy;
string usedByName;
bool readonly;
- };
+ };
/**
* Contains info about a disk
*/
struct DiskInfo
- {
- DiskInfo() {};
+ {
+ DiskInfo() {}
unsigned long long sizeK;
unsigned long long cylSizeB;
unsigned long cyl;
@@ -177,14 +177,14 @@
unsigned maxPrimary;
bool initDisk;
bool iscsi;
- };
+ };
/**
* Contains info about a LVM VG
*/
struct LvmVgInfo
- {
- LvmVgInfo() {};
+ {
+ LvmVgInfo() {}
unsigned long long sizeK;
unsigned long long peSize;
unsigned long peCount;
@@ -195,14 +195,14 @@
string devices;
string devices_add;
string devices_rem;
- };
+ };
/**
* Contains info about a EVMS Container
*/
struct EvmsCoInfo
- {
- EvmsCoInfo() {};
+ {
+ EvmsCoInfo() {}
unsigned long long sizeK;
unsigned long long peSize;
unsigned long peCount;
@@ -214,31 +214,31 @@
string devices;
string devices_add;
string devices_rem;
- };
+ };
/**
* Contains info about a DmPart disk
*/
struct DmPartCoInfo
- {
- DmPartCoInfo() {};
+ {
+ DmPartCoInfo() {}
DiskInfo d;
string devices;
unsigned long minor;
- };
+ };
struct DmraidCoInfo
- {
- DmraidCoInfo() {};
+ {
+ DmraidCoInfo() {}
DmPartCoInfo p;
- };
+ };
/**
* Contains info about a volume.
*/
struct VolumeInfo
- {
- VolumeInfo() {};
+ {
+ VolumeInfo() {}
unsigned long long sizeK;
unsigned long major;
unsigned long minor;
@@ -264,11 +264,11 @@
bool resize;
bool ignore_fs;
unsigned long long OrigSizeK;
- };
+ };
struct PartitionAddInfo
- {
- PartitionAddInfo() {};
+ {
+ PartitionAddInfo() {}
unsigned nr;
unsigned long cylStart;
unsigned long cylSize;
@@ -277,14 +277,14 @@
bool boot;
string udevPath;
string udevId;
-};
+ };
/**
* Contains info about a partition.
*/
struct PartitionInfo
- {
- PartitionInfo() {};
+ {
+ PartitionInfo() {}
PartitionInfo& operator=( const PartitionAddInfo& rhs );
VolumeInfo v;
unsigned nr;
@@ -295,14 +295,14 @@
bool boot;
string udevPath;
string udevId;
- };
+ };
/**
* Contains info about a LVM LV.
*/
struct LvmLvInfo
- {
- LvmLvInfo() {};
+ {
+ LvmLvInfo() {}
VolumeInfo v;
unsigned stripe;
unsigned stripe_size;
@@ -311,28 +311,28 @@
string allocation;
string dm_table;
string dm_target;
- };
+ };
/**
* Contains info about a EVMS Volume.
*/
struct EvmsInfo
- {
- EvmsInfo() {};
+ {
+ EvmsInfo() {}
VolumeInfo v;
unsigned stripe;
unsigned stripe_size;
bool compatible;
string dm_table;
string dm_target;
- };
+ };
/**
* Contains info about a software raid device.
*/
struct MdInfo
- {
- MdInfo() {};
+ {
+ MdInfo() {}
VolumeInfo v;
unsigned nr;
unsigned type;
@@ -341,13 +341,14 @@
string sb_ver;
unsigned long chunk;
string devices;
- };
+ };
/**
- * Contains state of a software raid device.
+ * Contains state info about a software raid device.
*/
struct MdStateInfo
{
+ MdStateInfo() {}
bool active;
bool degraded;
};
@@ -356,69 +357,69 @@
* Contains info about a nfs volumes
*/
struct NfsInfo
- {
- NfsInfo() {};
+ {
+ NfsInfo() {}
VolumeInfo v;
- };
+ };
/**
* Contains info about a file based loop devices.
*/
struct LoopInfo
- {
- LoopInfo() {};
+ {
+ LoopInfo() {}
VolumeInfo v;
bool reuseFile;
unsigned nr;
string file;
- };
+ };
/**
* Contains info about a DM volume.
*/
struct DmInfo
- {
- DmInfo() {};
+ {
+ DmInfo() {}
VolumeInfo v;
unsigned nr;
string table;
string target;
- };
+ };
/**
* Contains info about a DmPart volume.
*/
struct DmPartInfo
- {
- DmPartInfo() {};
+ {
+ DmPartInfo() {}
VolumeInfo v;
PartitionAddInfo p;
bool part;
string table;
string target;
- };
+ };
/**
* Contains info about a DMRAID volume.
*/
struct DmraidInfo
- {
- DmraidInfo() {};
+ {
+ DmraidInfo() {}
DmPartInfo p;
- };
+ };
/**
* Contains info about a DM volume.
*/
struct ContVolInfo
- {
+ {
ContVolInfo() {numeric=false; nr=0; type=CUNKNOWN;};
CType type;
string cname;
string vname;
bool numeric;
unsigned nr;
- };
+ };
/**
* Contains info about a partition slot.
@@ -1055,7 +1056,7 @@
* Change partition id of a partition
*
* @param partition name of partition, e.g. /dev/hda1
- * @param new partition id (e.g. 0x82 swap, 0x8e for lvm, ...)
+ * @param id new partition id (e.g. 0x82 swap, 0x8e for lvm, ...)
* @return zero if all is ok, a negative number to indicate an error
*/
virtual int changePartitionId (const string& partition, unsigned id) = 0;
@@ -1074,7 +1075,7 @@
* This functions ignores size limitations of the partition table type,
* e.g. on MSDOS labels partitions cannot exceed 2TB.
*
- * @param partition name of partition, e.g. /dev/hda1
+ * @param disk name of disk, e.g. /dev/hda1
* @param slots list of records that get filled with partition slot specific info
* @return zero if all is ok, a negative number to indicate an error
*/
@@ -1188,7 +1189,7 @@
* Changes mount by value in fstab of a volume
*
* @param device name of volume, e.g. /dev/hda1
- * @param options new mount by value of the volume.
+ * @param mby new mount by value of the volume.
* @return zero if all is ok, a negative number to indicate an error
*/
virtual int changeMountBy( const string& device, MountByType mby ) = 0;
@@ -1197,7 +1198,7 @@
* Get mount by value in fstab of a volume
*
* @param device name of volume, e.g. /dev/hda1
- * @param options will be set to the mount by value of the volume.
+ * @param mby will be set to the mount by value of the volume.
* @return zero if all is ok, a negative number to indicate an error
*/
#ifndef SWIG
@@ -1523,7 +1524,7 @@
*
* @param vg name of volume group
* @param name of logical volume
- * @param size size of logical volume in megabytes
+ * @param sizeM size of logical volume in megabytes
* @param stripe stripe count of logical volume (use 1 unless you know
* exactly what you are doing)
* @param device is set to the device name of the new LV
@@ -1556,7 +1557,7 @@
*
* @param vg name of volume group
* @param name of logical volume
- * @param stripe new stripe count of logical volume
+ * @param stripes new stripe count of logical volume
* @return zero if all is ok, a negative number to indicate an error
*/
virtual int changeLvStripeCount( const string& vg, const string& name,
@@ -1806,13 +1807,14 @@
/**
* Get state of a raid device.
- * This can only be done after the raid has been created on disk.
+ *
+ * @pre This can only be done after the raid has been created on disk.
*
* @param name name of software raid device (e.g. /dev/md0)
* @param info record that gets filled with raid special data
* @return zero if all is ok, a negative number to indicate an error
*/
- virtual int getMdState(const string& name, MdStateInfo& info) = 0;
+ virtual int getMdStateInfo(const string& name, MdStateInfo& info) = 0;
/**
* Compute the size of a raid device.
@@ -1822,6 +1824,7 @@
*
* @param md_type raid type of the software raid
* @param devices list with physical devices for the software raid
+ * @param sizeK will contain the computed size in kilobytes
* @return zero if all is ok, a negative number to indicate an error
*/
virtual int computeMdSize(MdType md_type, list<string> devices,
@@ -1915,8 +1918,8 @@
* Gets a list of string describing the actions to be executed
* after next call to commit()
*
- * @param mark_destructive if true use <red> around </red> destructive
- * actions (like e.g. deletion, formatting, ...)
+ * @param mark_destructive if true use <red> around </red>
+ * destructive actions (like e.g. deletion, formatting, ...)
* @return list of strings presentable to the user
*/
virtual deque<string> getCommitActions( bool mark_destructive ) = 0;
@@ -2208,7 +2211,7 @@
* name. For Containers where this is appropriate (e.g. disks,
* MD, loop) also a volume number is provided.
*
- * @param disk device name of volume, e.g. /dev/hda1
+ * @param dev device name of volume, e.g. /dev/hda1
* @param info record that get filled with split data
* @return zero if all is ok, negative number to indicate an error
*/
@@ -2223,11 +2226,6 @@
* @param precision number of fraction digits in output
* @param omit_zeroes if true omit trailing zeroes for exact values
* @return formatted string
- *
- * @example byteToHumanString(128, true, 2, true) -> "128 B"
- * @example byteToHumanString(4096, true, 2, true) -> "4 kB"
- * @example byteToHumanString(4096, true, 2, false) -> "4.00 kB"
- * @example byteToHumanString(1024*1024, true, 2, true) -> "1 MB"
*/
virtual string byteToHumanString(unsigned long long size, bool classic, int precision,
bool omit_zeroes) const = 0;
@@ -2239,12 +2237,8 @@
* @param classic use classic locale
* @param size size in bytes
* @return true on successful conversion
- *
- * @example humanStringToByte("4kB", true, size) -> true and size = 4*1024
- * @example humanStringToByte("4 MB", true, size) -> true and size = 4*1024*1024
- * @example humanStringToByte("0.5 GB", true, size) -> true and size = 512*1024*1024
*/
- virtual bool humanStringToByte(const string& str, bool classic, unsigned long long&
+ virtual bool humanStringToByte(const string& str, bool classic, unsigned long long&
size) const = 0;
};
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-storage-2.17.4/libstorage/src/StorageTmpl.h new/yast2-storage-2.17.7/libstorage/src/StorageTmpl.h
--- old/yast2-storage-2.17.4/libstorage/src/StorageTmpl.h 2008-07-21 17:22:15.000000000 +0200
+++ new/yast2-storage-2.17.7/libstorage/src/StorageTmpl.h 2008-07-27 10:57:26.000000000 +0200
@@ -77,7 +77,7 @@
}
CastIterator operator++(int)
{
- y2warning( "Expensive ++ CastIterator" );
+ y2war( "Expensive ++ CastIterator" );
CastIterator tmp(*this);
Iter::operator++();
return(tmp);
@@ -88,7 +88,7 @@
}
CastIterator operator--(int)
{
- y2warning( "Expensive -- CastIterator" );
+ y2war( "Expensive -- CastIterator" );
CastIterator tmp(*this);
Iter::operator--();
return(tmp);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-storage-2.17.4/libstorage/src/SystemCmd.cc new/yast2-storage-2.17.7/libstorage/src/SystemCmd.cc
--- old/yast2-storage-2.17.4/libstorage/src/SystemCmd.cc 2008-07-26 00:07:17.000000000 +0200
+++ new/yast2-storage-2.17.7/libstorage/src/SystemCmd.cc 2008-07-28 09:42:51.000000000 +0200
@@ -176,7 +176,6 @@
{
output_proc->reset();
}
- timeMark( "System", false );
y2debug( "Cmd:%s", Cmd.c_str() );
if( access( Shell_Ci.c_str(), X_OK ) != 0 )
{
@@ -299,7 +298,6 @@
Ret_i = 0;
y2milestone( "TESTMODE would execute \"%s\"", Cmd.c_str() );
}
- timeMark( "After fork()" );
if( Ret_i==-127 || Ret_i==-1 )
{
y2error("system (%s) = %d", Cmd.c_str(), Ret_i);
@@ -309,7 +307,6 @@
y2milestone( "system() Returns:%d", Ret_i );
if( Ret_i!=0 )
logOutput();
- timeMark( "After CheckOutput" );
return( Ret_i );
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-storage-2.17.4/libstorage/src/Volume.cc new/yast2-storage-2.17.7/libstorage/src/Volume.cc
--- old/yast2-storage-2.17.4/libstorage/src/Volume.cc 2008-07-26 18:40:03.000000000 +0200
+++ new/yast2-storage-2.17.7/libstorage/src/Volume.cc 2008-07-28 14:24:42.000000000 +0200
@@ -987,7 +987,7 @@
table.erase( 0, table.find_last_of( '/' )+1 );
if( !table.empty() )
{
- SystemCmd c( "cryptsetup remove " + table );
+ SystemCmd c("cryptsetup remove " + quote(table));
if( c.retcode()!=0 )
ret = VOLUME_CRYPTUNSETUP_FAILED;
else
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-storage-2.17.4/storage/src/modules/Makefile.am new/yast2-storage-2.17.7/storage/src/modules/Makefile.am
--- old/yast2-storage-2.17.4/storage/src/modules/Makefile.am 2008-07-21 17:22:15.000000000 +0200
+++ new/yast2-storage-2.17.7/storage/src/modules/Makefile.am 2008-07-31 14:22:28.000000000 +0200
@@ -7,11 +7,6 @@
YCPC_LD_LIBRARY_PATH = ../../../libstorage/src/.libs
YCPC_Y2DIR = ../../../libstorage/src/.libs
-yncludedir = @yncludedir@/storage
-
-ynclude_DATA = \
- routines.ycp
-
module_DATA = \
Partitions.ycp \
FileSystems.ycp \
@@ -20,7 +15,7 @@
StorageControllers.ycp \
StorageDevices.ycp
-EXTRA_DIST = $(module_DATA) $(ynclude_DATA)
+EXTRA_DIST = $(module_DATA)
include:
mkdir include && ln -sf ../../include include/partitioning
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-storage-2.17.4/storage/src/modules/Partitions.ycp new/yast2-storage-2.17.7/storage/src/modules/Partitions.ycp
--- old/yast2-storage-2.17.4/storage/src/modules/Partitions.ycp 2008-07-21 17:22:15.000000000 +0200
+++ new/yast2-storage-2.17.7/storage/src/modules/Partitions.ycp 2008-07-31 15:30:18.000000000 +0200
@@ -5,7 +5,7 @@
*
* Purpose: Provides information about partitions
*
- * $Id: Partitions.ycp 39641 2007-07-24 14:09:33Z fehr $
+ * $Id: Partitions.ycp 49543 2008-07-31 13:30:18Z aschnell $
*/
{
module "Partitions";
@@ -37,6 +37,7 @@
global integer fsid_gpt_msftres = 0x105;
global integer fsid_freebsd = 0xa5;
global integer fsid_openbsd = 0xa6;
+ global integer fsid_netbsd = 0xa9;
global integer fsid_beos = 0xeb;
global integer fsid_solaris = 0xbf;
global integer fsid_root = fsid_native;
@@ -375,16 +376,6 @@
return( swap_size );
};
-global define boolean UseParted()
- ``{
- boolean ret = true;
-/*
- if( Arch::i386 () || Arch::x86_64 () )
- ret = false;
-*/
- y2milestone( "UseParted ret:%1", ret );
- return( ret );
- }
global define boolean IsResizable( integer fsid )
``{
@@ -668,6 +659,7 @@
if ( fs_id == 0xa0) return( "Hibernation");
if ( fs_id == 0xa5) return( "FreeBSD");
if ( fs_id == 0xa6) return( "OpenBSD");
+ if ( fs_id == 0xa9) return( "NetBSD");
if ( fs_id == 0x102) return( "Apple_HFS");
if ( fs_id == 0x103) return( "EFI boot");
if ( fs_id == 0x104) return( "Service");
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-storage-2.17.4/storage/src/modules/routines.ycp new/yast2-storage-2.17.7/storage/src/modules/routines.ycp
--- old/yast2-storage-2.17.4/storage/src/modules/routines.ycp 2008-07-21 17:22:15.000000000 +0200
+++ new/yast2-storage-2.17.7/storage/src/modules/routines.ycp 1970-01-01 01:00:00.000000000 +0100
@@ -1,30 +0,0 @@
- /**
- *
- */
-
-{
-
-global define string GetDeviceName( string disk, any partition )
- ``{
- string ret = disk;
-
- if( is( partition, integer ) )
- {
- if( find( disk, "/dev/cciss/" )==0 ||
- find( disk, "/dev/ida/" )==0 ||
- find( disk, "/dev/ataraid/" )==0 ||
- find( disk, "/dev/etherd/" )==0 ||
- find( disk, "/dev/rd/" )==0 )
- {
- ret = ret + "p";
- }
- ret = ret + sformat( "%1", partition );
- }
- else if( size( (string)partition )>0 )
- {
- ret = ret + "/" + (string)partition;
- }
- return( ret );
- }
-
-}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-storage-2.17.4/storage/src/modules/StorageDevices.ycp new/yast2-storage-2.17.7/storage/src/modules/StorageDevices.ycp
--- old/yast2-storage-2.17.4/storage/src/modules/StorageDevices.ycp 2008-07-21 17:22:15.000000000 +0200
+++ new/yast2-storage-2.17.7/storage/src/modules/StorageDevices.ycp 2008-07-31 14:22:28.000000000 +0200
@@ -14,7 +14,7 @@
* - removable drives (ZIP)
* - floppy devices
*
- * $Id: StorageDevices.ycp 44167 2008-02-05 15:42:39Z fehr $
+ * $Id: StorageDevices.ycp 49540 2008-07-31 12:22:02Z aschnell $
*
* Author:
* Klaus Kaempf (initial)
@@ -103,33 +103,6 @@
}
- /**
- *
- #include "storage/routines.ycp";
- */
-global define string GetDeviceName( string disk, any partition )
- ``{
- string ret = disk;
-
- if( is( partition, integer ) )
- {
- if( search( disk, "/dev/cciss/" )==0 ||
- search( disk, "/dev/ida/" )==0 ||
- search( disk, "/dev/ataraid/" )==0 ||
- search( disk, "/dev/etherd/" )==0 ||
- search( disk, "/dev/rd/" )==0 )
- {
- ret = ret + "p";
- }
- ret = ret + sformat( "%1", partition );
- }
- else if( size( (string)partition )>0 )
- {
- ret = ret + "/" + (string)partition;
- }
- return( ret );
- };
-
global define list<map> AddNormalLinknames( list<map> cddrives )
``{
map linknum = $[ "cdrom" : 0,
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-storage-2.17.4/storage/src/modules/Storage.ycp new/yast2-storage-2.17.7/storage/src/modules/Storage.ycp
--- old/yast2-storage-2.17.4/storage/src/modules/Storage.ycp 2008-07-21 17:22:15.000000000 +0200
+++ new/yast2-storage-2.17.7/storage/src/modules/Storage.ycp 2008-07-31 15:07:56.000000000 +0200
@@ -19,7 +19,7 @@
* wurde versucht "intelligent" zu gestallten und ist im einzelen bei den
* entspechenden Funktionen n�her erkl�rt.
*
- * $Id: Storage.ycp 46700 2008-04-16 08:59:47Z aschnell $
+ * $Id: Storage.ycp 49540 2008-07-31 12:22:02Z aschnell $
*/
{
@@ -173,9 +173,6 @@
string part_insts = "";
- /*
- include "storage/routines.ycp";
- */
/**
* Returns Device Name
*
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-storage-2.17.4/VERSION new/yast2-storage-2.17.7/VERSION
--- old/yast2-storage-2.17.4/VERSION 2008-07-26 14:54:35.000000000 +0200
+++ new/yast2-storage-2.17.7/VERSION 2008-07-31 15:29:03.000000000 +0200
@@ -1 +1 @@
-2.17.4
+2.17.7
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org