Hello community,
here is the log from the commit of package yast2-storage
checked in at Thu Apr 27 00:38:16 CEST 2006.
--------
--- yast2-storage/yast2-storage.changes 2006-04-25 12:05:22.000000000 +0200
+++ STABLE/yast2-storage/yast2-storage.changes 2006-04-26 15:50:39.000000000 +0200
@@ -1,0 +2,9 @@
+Wed Apr 26 14:13:46 CEST 2006 - fehr@suse.de
+
+- use evms log level from config file
+- add needed changes to use md device as EVMS PVs
+- fix crash in loop dialog creation
+- make help text consistent with dialog text (#157162)
+- version 2.13.56
+
+-------------------------------------------------------------------
Old:
----
yast2-storage-2.13.55.tar.bz2
New:
----
yast2-storage-2.13.56.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-storage.spec ++++++
--- /var/tmp/diff_new_pack.hIivwF/_old 2006-04-27 00:37:18.000000000 +0200
+++ /var/tmp/diff_new_pack.hIivwF/_new 2006-04-27 00:37:18.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-storage (Version 2.13.55)
+# spec file for package yast2-storage (Version 2.13.56)
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -11,12 +11,12 @@
# norootforbuild
Name: yast2-storage
-Version: 2.13.55
+Version: 2.13.56
Release: 1
License: GPL
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-storage-2.13.55.tar.bz2
+Source0: yast2-storage-2.13.56.tar.bz2
prefix: /usr
BuildRequires: blocxx-devel docbook-xsl-stylesheets doxygen evms gcc-c++ libxcrypt-devel libxslt openssl-devel perl-XML-Writer sablot sgml-skel swig update-desktop-files yast2 yast2-devtools yast2-installation yast2-perl-bindings yast2-testsuite
Requires: yast2 parted yast2-installation yast2-storage-lib yast2-perl-bindings
@@ -40,7 +40,7 @@
%prep
-%setup -n yast2-storage-2.13.55
+%setup -n yast2-storage-2.13.56
%build
%{prefix}/bin/y2tool y2autoconf
@@ -164,6 +164,12 @@
%doc %{prefix}/share/doc/packages/yast2-storage/libstorage
%changelog -n yast2-storage
+* Wed Apr 26 2006 - fehr@suse.de
+- use evms log level from config file
+- add needed changes to use md device as EVMS PVs
+- fix crash in loop dialog creation
+- make help text consistent with dialog text (#157162)
+- version 2.13.56
* Tue Apr 25 2006 - fehr@suse.de
- do not prefer edd links in udev id (#169040)
- cope with obsolete entries in by-uuid and by-label
++++++ yast2-storage-2.13.55.tar.bz2 -> yast2-storage-2.13.56.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.13.55/VERSION new/yast2-storage-2.13.56/VERSION
--- old/yast2-storage-2.13.55/VERSION 2006-04-25 12:03:55.000000000 +0200
+++ new/yast2-storage-2.13.56/VERSION 2006-04-26 14:15:06.000000000 +0200
@@ -1 +1 @@
-2.13.55
+2.13.56
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.13.55/libstorage/src/Dm.cc new/yast2-storage-2.13.56/libstorage/src/Dm.cc
--- old/yast2-storage-2.13.55/libstorage/src/Dm.cc 2006-04-12 13:42:14.000000000 +0200
+++ new/yast2-storage-2.13.56/libstorage/src/Dm.cc 2006-04-26 14:59:46.000000000 +0200
@@ -43,6 +43,13 @@
y2debug( "destructed dem dev %s", dev.c_str() );
}
+unsigned Dm::dmMajor()
+ {
+ if( dm_major==0 )
+ getDmMajor();
+ return( dm_major );
+ }
+
void
Dm::getTableInfo()
{
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.13.55/libstorage/src/Dm.h new/yast2-storage-2.13.56/libstorage/src/Dm.h
--- old/yast2-storage-2.13.55/libstorage/src/Dm.h 2006-04-12 12:48:54.000000000 +0200
+++ new/yast2-storage-2.13.56/libstorage/src/Dm.h 2006-04-26 15:00:04.000000000 +0200
@@ -53,6 +53,7 @@
bool equalContent( const Dm& rhs ) const;
void logDifference( const Dm& d ) const;
string stringDifference( const Dm& d ) const;
+ static unsigned dmMajor();
protected:
void init();
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.13.55/libstorage/src/EvmsAccess.cc new/yast2-storage-2.13.56/libstorage/src/EvmsAccess.cc
--- old/yast2-storage-2.13.55/libstorage/src/EvmsAccess.cc 2006-04-11 12:48:39.000000000 +0200
+++ new/yast2-storage-2.13.56/libstorage/src/EvmsAccess.cc 2006-04-26 13:39:02.000000000 +0200
@@ -10,6 +10,9 @@
#include "y2storage/AppUtil.h"
#include "y2storage/StorageInterface.h"
#include "y2storage/StorageTmpl.h"
+#include "Md.h"
+#include "Regex.h"
+#include "AsciiFile.h"
#include "EvmsAccess.h"
using namespace std;
@@ -613,8 +616,44 @@
int EvmsAccess::activate()
{
evms_close_engine();
- int ret = evms_open_engine( NULL, (engine_mode_t)ENGINE_READWRITE, NULL,
- DEFAULT, NULL );
+ string line;
+ debug_level_t log_level = DEFAULT;
+ AsciiFile conf( "/etc/evms.conf" );
+ Regex rx( "[ \t]*debug_level[ \t]*=[ \t]*" );
+ int ret = conf.find( 0, rx );
+ y2mil( "debug line:" << ret );
+ if( ret>=0 )
+ {
+ list<string> ls = splitString( conf[ret], " \t=" );
+ y2mil( "debug line:" << conf[ret] << " list:" << ls );
+ if( ls.size()>=2 )
+ {
+ list<string>::iterator i = ls.begin();
+ ++i;
+ if( *i == "critical" )
+ log_level = CRITICAL;
+ else if( *i == "serious" )
+ log_level = SERIOUS;
+ else if( *i == "error" )
+ log_level = ERROR;
+ else if( *i == "warning" )
+ log_level = WARNING;
+ else if( *i == "details" )
+ log_level = DETAILS;
+ else if( *i == "entry_exit" )
+ log_level = ENTRY_EXIT;
+ else if( *i == "debug" )
+ log_level = DEBUG;
+ else if( *i == "extra" )
+ log_level = EXTRA;
+ else if( *i == "everything" )
+ log_level = EVERYTHING;
+ y2mil( "level string:\"" << *i << "\" val:" << log_level );
+ }
+ }
+ y2mil( "log level:" << log_level );
+ ret = evms_open_engine( NULL, (engine_mode_t)ENGINE_READWRITE, NULL,
+ log_level, NULL );
if( ret != 0 )
{
y2error( "evms_open_engine evms_strerror %s", evms_strerror(ret));
@@ -972,6 +1011,10 @@
while( ret==0 && count<input->count )
{
string dev = undevDevice( *p );
+ if( dev.find( "evms/" )==0 )
+ dev.erase( 0, 5 );
+ if( Md::matchRegex( dev ))
+ dev = "md/" + dev;
object_type_t ot = (object_type_t)(REGION|SEGMENT|DISK);
y2mil( "dev:" << dev << " ot:" << ot );
ret = evms_get_object_handle_for_name( ot, (char *)dev.c_str(),
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.13.55/libstorage/src/EvmsCo.cc new/yast2-storage-2.13.56/libstorage/src/EvmsCo.cc
--- old/yast2-storage-2.13.55/libstorage/src/EvmsCo.cc 2006-04-25 19:30:40.000000000 +0200
+++ new/yast2-storage-2.13.56/libstorage/src/EvmsCo.cc 2006-04-25 21:14:24.000000000 +0200
@@ -184,7 +184,7 @@
}
while( ret==0 && i!=devs.end() )
{
- string d = normalizeDevice( *i );
+ string d = evmsNormalizeDevice( *i );
if( (p=find( pv.begin(), pv.end(), d ))!=pv.end() ||
(p=find( pv_add.begin(), pv_add.end(), d ))!=pv_add.end())
ret = EVMS_PV_ALREADY_CONTAINED;
@@ -205,7 +205,7 @@
i=devs.begin();
while( ret==0 && i!=devs.end() )
{
- string d = normalizeDevice( *i );
+ string d = evmsNormalizeDevice( *i );
unsigned long pe = 0;
if( (p=find( pv_remove.begin(), pv_remove.end(), d )) !=
pv_remove.end() )
@@ -237,15 +237,26 @@
return( ret );
}
+string EvmsCo::evmsNormalizeDevice( const string& dev ) const
+ {
+ string ret = normalizeDevice(dev);
+ if( !getStorage()->knownDevice( ret, true ) )
+ ret = "/dev/evms/" + dev;
+ y2mil( "dev:" << dev << " ret:" << ret );
+ return( ret );
+ }
+
void
EvmsCo::setUsed( const string& device, storage::UsedByType typ,
const string& name )
{
string d = normalizeDevice(device);
+ if( d.find( "/dev/md/" )==0 )
+ d.erase( 5, 3 );
getStorage()->setUsedBy( d, typ, name );
if( typ!=UB_NONE && !getStorage()->isDisk(d) )
getStorage()->changeFormatVolume( d, false, FSNONE );
- d = "/dev/evms/"+d.substr(5);
+ d = "/dev/evms/"+normalizeDevice(device).substr(5);
if( getStorage()->knownDevice( d ))
{
getStorage()->setUsedBy( d, typ, name );
@@ -281,7 +292,7 @@
}
while( ret==0 && i!=devs.end() )
{
- string d = normalizeDevice( *i );
+ string d = evmsNormalizeDevice(*i);
ret = tryUnusePe( d, pl, pladd, plrem, rem_pe );
setUsed( d, UB_NONE, "" );
++i;
@@ -556,6 +567,7 @@
{
Pv p;
p.device = evmsToDev( mi->second.device );
+ y2mil( "p.device:" << p.device );
p.status = "allocatable";
p.uuid = i->uuid;
p.num_pe = i->size;
@@ -568,7 +580,11 @@
else
{
Pv p;
- p.device = "/dev/" + oi->second.name;
+ p.device = "/dev/";
+ if( oi->second.name.find( "md/" )==0 )
+ p.device += "evms/";
+ p.device += oi->second.name;
+ y2mil( "p.device:" << p.device );
p.status = "allocatable";
p.uuid = i->uuid;
p.num_pe = i->size;
@@ -713,7 +729,9 @@
string EvmsCo::evmsToDev( const string& edev )
{
string ret( edev );
- if( ret.find( "/dev/evms/" )==0 )
+ if( ret.find( "/dev/md/" )==0 )
+ ret.erase( 5, 3 );
+ else if( ret.find( "/dev/evms/" )==0 )
ret.erase( 5, 5 );
string::iterator it = ret.begin();
while( it!=ret.end() )
@@ -750,6 +768,14 @@
if( t==UB_EVMS || t==UB_NONE )
setUsed( d, UB_EVMS, name() );
}
+ if( p->device.find( "/dev/evms/md/" )==0 )
+ {
+ string tmp = p->device;
+ tmp.erase( 5, 8 );
+ list<Pv>::iterator i = find( pv_add.begin(), pv_add.end(), tmp );
+ if( i!=pv_add.end() )
+ pv_add.erase(i);
+ }
}
int EvmsCo::getToCommit( CommitStage stage, list& col,
@@ -1361,10 +1387,12 @@
ret = executeCmd( cmd );
if( ret==0 )
{
+ y2mil( "co:" << *this );
setCreated( false );
EvmsTree t;
getEvmsList( t );
getCoData( name(), t, true );
+ y2mil( "co:" << *this );
if( !pv_add.empty() )
{
pv_add.clear();
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.13.55/libstorage/src/EvmsCo.h new/yast2-storage-2.13.56/libstorage/src/EvmsCo.h
--- old/yast2-storage-2.13.55/libstorage/src/EvmsCo.h 2006-04-25 19:30:40.000000000 +0200
+++ new/yast2-storage-2.13.56/libstorage/src/EvmsCo.h 2006-04-25 19:38:33.000000000 +0200
@@ -203,6 +203,7 @@
void logData( const string& Dir );
void addLv( unsigned long le, const string& name, bool native );
void addPv( const Pv* p );
+ string evmsNormalizeDevice( const string& dev ) const;
static bool attachToSocket( bool attach=true );
static bool sendCommand( const string& cmd, bool one_line,
std::list<string>& lines );
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.13.55/libstorage/src/LvmVg.cc new/yast2-storage-2.13.56/libstorage/src/LvmVg.cc
--- old/yast2-storage-2.13.55/libstorage/src/LvmVg.cc 2006-04-12 12:51:01.000000000 +0200
+++ new/yast2-storage-2.13.56/libstorage/src/LvmVg.cc 2006-04-26 15:10:10.000000000 +0200
@@ -1268,6 +1268,29 @@
return( ret );
}
+void LvmVg::normalizeDmDevices()
+ {
+ string dm = decString(Dm::dmMajor());
+ SystemCmd c;
+ for( list<Pv>::iterator i=pv.begin(); i!=pv.end(); ++i )
+ {
+ if( i->device.find( "/dev/dm-" )==0 )
+ {
+ c.execute( "devmap_name "+dm+":"+i->device.substr( 8 ) );
+ if( c.retcode()==0 )
+ {
+ string dev = "/dev/" + *c.getLine( 0 );
+ y2mil( "dev:" << i->device << " normal dev:" << dev );
+ if( getStorage()->knownDevice( dev ) )
+ {
+ y2mil( "replace " << i->device << " with " << dev );
+ i->device = dev;
+ }
+ }
+ }
+ }
+ }
+
void LvmVg::getInfo( LvmVgInfo& tinfo ) const
{
info.sizeK = sizeK();
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.13.55/libstorage/src/LvmVg.h new/yast2-storage-2.13.56/libstorage/src/LvmVg.h
--- old/yast2-storage-2.13.55/libstorage/src/LvmVg.h 2005-12-13 12:46:54.000000000 +0100
+++ new/yast2-storage-2.13.56/libstorage/src/LvmVg.h 2006-04-26 14:14:56.000000000 +0200
@@ -34,6 +34,7 @@
unsigned long long stripeSize );
int setPeSize( long long unsigned peSizeK );
+ void normalizeDmDevices();
void getCommitActions( std::liststorage::commitAction*& l ) const;
int commitChanges( storage::CommitStage stage );
int getToCommit( storage::CommitStage stage, std::list& col,
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.13.55/libstorage/src/Md.cc new/yast2-storage-2.13.56/libstorage/src/Md.cc
--- old/yast2-storage-2.13.55/libstorage/src/Md.cc 2006-02-07 20:37:26.000000000 +0100
+++ new/yast2-storage-2.13.56/libstorage/src/Md.cc 2006-04-25 19:53:57.000000000 +0200
@@ -506,12 +506,17 @@
return( ret );
}
+bool Md::matchRegex( const string& dev )
+ {
+ static Regex md( "^md[0-9]+$" );
+ return( md.match(dev));
+ }
+
bool Md::mdStringNum( const string& name, unsigned& num )
{
bool ret=false;
string d = undevDevice(name);
- static Regex md( "^md[0-9]+$" );
- if( md.match( d ))
+ if( matchRegex( d ))
{
d.substr( 2 )>>num;
ret = true;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.13.55/libstorage/src/Md.h new/yast2-storage-2.13.56/libstorage/src/Md.h
--- old/yast2-storage-2.13.55/libstorage/src/Md.h 2005-11-07 12:15:52.000000000 +0100
+++ new/yast2-storage-2.13.56/libstorage/src/Md.h 2006-04-25 19:53:07.000000000 +0200
@@ -38,6 +38,7 @@
void raidtabLines( std::list<string>& ) const ;
string mdadmLine() const;
string createCmd() const;
+ static bool matchRegex( const string& dev );
static const string& pName( storage::MdType t ) { return md_names[t]; }
static bool mdStringNum( const string& name, unsigned& num );
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.13.55/libstorage/src/MdCo.cc new/yast2-storage-2.13.56/libstorage/src/MdCo.cc
--- old/yast2-storage-2.13.55/libstorage/src/MdCo.cc 2006-03-21 11:14:24.000000000 +0100
+++ new/yast2-storage-2.13.56/libstorage/src/MdCo.cc 2006-04-26 13:07:30.000000000 +0200
@@ -570,6 +570,15 @@
ret = m->checkDevices();
if( ret==0 )
{
+ list<string> devs;
+ m->getDevs( devs );
+ for( list<string>::iterator i = devs.begin(); i!=devs.end(); ++i )
+ {
+ getStorage()->removeDmTableTo( *i );
+ }
+ }
+ if( ret==0 )
+ {
string cmd = m->createCmd();
SystemCmd c( cmd );
if( c.retcode()!=0 )
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.13.55/libstorage/src/PeContainer.cc new/yast2-storage-2.13.56/libstorage/src/PeContainer.cc
--- old/yast2-storage-2.13.55/libstorage/src/PeContainer.cc 2006-02-07 18:49:44.000000000 +0100
+++ new/yast2-storage-2.13.56/libstorage/src/PeContainer.cc 2006-04-25 20:26:25.000000000 +0200
@@ -402,6 +402,19 @@
namespace storage
{
+void printDevList( std::ostream& s, const std::listPeContainer::Pv& l )
+ {
+ s << "<";
+ for( std::listPeContainer::Pv::const_iterator i=l.begin();
+ i!=l.end(); ++i )
+ {
+ if( i!=l.begin() )
+ s << " ";
+ s << i->device;
+ }
+ s << ">";
+ }
+
std::ostream& operator<< (std::ostream& s, const PeContainer& d )
{
s << *((Container*)&d);
@@ -409,6 +422,21 @@
<< " PeSize:" << d.pe_size
<< " NumPE:" << d.num_pe
<< " FreePE:" << d.free_pe;
+ if( !d.pv.empty() )
+ {
+ s << " pv:";
+ printDevList( s, d.pv );
+ }
+ if( !d.pv_add.empty() )
+ {
+ s << " pv_add:";
+ printDevList( s, d.pv_add );
+ }
+ if( !d.pv_remove.empty() )
+ {
+ s << " pv_remove:";
+ printDevList( s, d.pv_remove );
+ }
return( s );
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.13.55/libstorage/src/PeContainer.h new/yast2-storage-2.13.56/libstorage/src/PeContainer.h
--- old/yast2-storage-2.13.55/libstorage/src/PeContainer.h 2005-11-07 12:15:53.000000000 +0100
+++ new/yast2-storage-2.13.56/libstorage/src/PeContainer.h 2006-04-25 20:25:58.000000000 +0200
@@ -55,6 +55,7 @@
};
friend std::ostream& operator<< (std::ostream&, const Pv& );
+ friend void printDevList (std::ostream&, const std::list<Pv>& );
void init();
unsigned long long capacityInKb() const {return pe_size*num_pe;}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.13.55/libstorage/src/Storage.cc new/yast2-storage-2.13.56/libstorage/src/Storage.cc
--- old/yast2-storage-2.13.55/libstorage/src/Storage.cc 2006-04-25 11:14:51.000000000 +0200
+++ new/yast2-storage-2.13.56/libstorage/src/Storage.cc 2006-04-26 15:47:40.000000000 +0200
@@ -200,6 +200,11 @@
detectEvms();
detectDm( ppart );
+ LvmVgPair p = lvgPair();
+ y2mil( "p length:" << p.length() );
+ for( LvmVgIterator i=p.begin(); i!=p.end(); ++i )
+ i->normalizeDmDevices();
+
if( testmode )
{
system_cmd_testmode = true;
@@ -2761,8 +2766,12 @@
if( ret==0 )
{
have_loop = haveLoop(loop);
+ y2mil( "have_loop:" << have_loop );
if( !have_loop )
- loop = new LoopCo( this, false );
+ {
+ ProcPart ppart;
+ loop = new LoopCo( this, false, ppart );
+ }
if( loop==NULL )
ret = STORAGE_MEMORY_EXHAUSTED;
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.13.55/storage/src/include/custom_part_dialogs.ycp new/yast2-storage-2.13.56/storage/src/include/custom_part_dialogs.ycp
--- old/yast2-storage-2.13.55/storage/src/include/custom_part_dialogs.ycp 2006-04-18 13:59:46.000000000 +0200
+++ new/yast2-storage-2.13.56/storage/src/include/custom_part_dialogs.ycp 2006-04-26 15:53:44.000000000 +0200
@@ -16,7 +16,7 @@
*
*************************************************************
- $Id: custom_part_dialogs.ycp 30170 2006-04-18 11:59:42Z fehr $
+ $Id: custom_part_dialogs.ycp 30498 2006-04-26 13:53:38Z fehr $
*/
{
@@ -1070,25 +1070,18 @@
}
-define term LoopOptionsDlg()
+define term LoopOptionsDlg( string pb, string cb, string sb )
``{
term widget =
`VSquash(
`VBox(
`VSpacing(),
- `Left( `TextEntry( `id(`loop_path), `opt(`notify),
- // label text
- _("P&ath Name of File"))),
+ `Left( `TextEntry( `id(`loop_path), `opt(`notify), pb )),
`VSpacing(1),
- `Left( `CheckBox( `id(`loop_create), `opt(`notify),
- // button text
- _("C&reate Loop File"))),
- `Left( `TextEntry( `id(`loop_size), `opt(`notify),
- // label text
- _("Si&ze of Loop File"))),
+ `Left( `CheckBox( `id(`loop_create), `opt(`notify), cb )),
+ `Left( `TextEntry( `id(`loop_size), `opt(`notify), sb )),
`VSpacing()
));
-
return widget;
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.13.55/storage/src/include/evms_lib.ycp new/yast2-storage-2.13.56/storage/src/include/evms_lib.ycp
--- old/yast2-storage-2.13.55/storage/src/include/evms_lib.ycp 2006-04-25 19:30:40.000000000 +0200
+++ new/yast2-storage-2.13.56/storage/src/include/evms_lib.ycp 2006-04-26 15:12:48.000000000 +0200
@@ -11,7 +11,7 @@
* Thomas Fehr
*
*
- * $Id: evms_lib.ycp 29812 2006-04-06 14:24:06Z fehr $
+ * $Id: evms_lib.ycp 30495 2006-04-26 13:12:34Z fehr $
*
*/
@@ -200,6 +200,7 @@
p["device"] = d;
return( p );
});
+ pv = filter( map p, pv, ``(search(p["device"]:"","md/md")!=0));
pv = sort( map a, map b, pv, ``(a["device"]:""
*
- * $Id: loop.ycp 29925 2006-04-10 13:17:54Z fehr $
+ * $Id: loop.ycp 30498 2006-04-26 13:53:38Z fehr $
*
*/
@@ -33,27 +33,30 @@
* LoopDlgHelp
* @return string
*/
-define string LoopDlgHelp()
+define string LoopDlgHelp( string pb, string cb, string sb )
``{
// help text richtext format
- string helptext = _("
-<p><b>Path Name of File:</b><br>This must be an absolute path to the file
+ // %1 is replaced by description text for file pathname
+ string helptext = sformat( _("
+<p><b>%1:</b><br>This must be an absolute path to the file
containing the data for the encrypted loop device to set up.</p>
-");
+"), pb );
// help text richtext format, continued
- helptext = helptext + _("
-<p><b>Create Crypt File:</b><br>If this is checked, the file will be
+ // %1 is replaced by description text for create button
+ helptext = helptext + sformat( _("
+<p><b>%1:</b><br>If this is checked, the file will be
created with the size given in the next field. <b>NOTE:</b> If the
file already exists, all data in it is lost.</p>
-");
+"), cb );
// help text richtext format, continued
- helptext = helptext + _("
-<p><b>Size of Crypt File:</b><br>This is the size of the loop file.
+ // %1 is replaced by description text for file size
+ helptext = helptext + sformat( _("
+<p><b>%1:</b><br>This is the size of the loop file.
The file system to create in the encrypted loop device will have
this size.</p>
-");
+"), sb );
// help text richtext format, continued
helptext = helptext + _("
@@ -86,9 +89,16 @@
caption = _("Create New Loop Device Setup");
}
+ // label text
+ string pb = _("P&ath Name of File");
+ // label text
+ string cb = _("C&reate Loop File");
+ // label text
+ string sb = _("Si&ze of Loop File");
+
term contents = `VBox( `HSpacing( 60 ),
`HBox( `HSpacing(2),
- LoopOptionsDlg(),
+ LoopOptionsDlg(pb,cb,sb),
`HSpacing(20)
),
`VSpacing(1),
@@ -117,8 +127,11 @@
/////////////////////////////////////////////////////////////
// Open main dialog for Raid
/////////////////////////////////////////////////////////////
+ string ht = LoopDlgHelp( deletechars(pb,"&"),
+ deletechars(cb,"&"),
+ deletechars(sb,"&"));
UI::OpenDialog( `opt(`decorated ),
- `HBox( `HWeight(30,`RichText(LoopDlgHelp())),
+ `HBox( `HWeight(30,`RichText(ht)),
`HStretch(),
`HSpacing(1),
`HWeight(70, contents ),
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...