Mailinglist Archive: yast-commit (410 mails)
| < Previous | Next > |
[yast-commit] r64750 - /branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/FcoeClient.ycp
- From: gs@xxxxxxxxxxxxxxxxx
- Date: Tue, 05 Jul 2011 11:00:29 -0000
- Message-id: <20110705110029.6BECE32654@svn2.opensuse.org>
Author: gs
Date: Tue Jul 5 13:00:28 2011
New Revision: 64750
URL: http://svn.opensuse.org/viewcvs/yast?rev=64750&view=rev
Log:
add revert cmd, get default values
Modified:
branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/FcoeClient.ycp
Modified: branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/FcoeClient.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/FcoeClient.ycp?rev=64750&r1=64749&r2=64750&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/FcoeClient.ycp (original)
+++ branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/FcoeClient.ycp Tue Jul 5
13:00:28 2011
@@ -369,9 +369,19 @@
boolean ret = SCR::Write( .target.string, file_name, def_values
);
if ( ret == true )
{
- status_map = add( status_map, "FCOE_ENABLE", "yes");
- status_map = add( status_map, "DCB_REQUIRED", "yes");
+ list <string> lines = splitstring( def_values, "\n" );
+ foreach( string line, (list<string>)lines, {
+ if ( regexpmatch( line, "^FCOE_ENABLE" ) )
+ {
+ status_map = add( status_map, "FCOE_ENABLE",
deletechars( substring(line, 12), "\"") );
+ }
+ if ( regexpmatch( line, "^DCB_REQUIRED" ) )
+ {
+ status_map = add( status_map, "DCB_REQUIRED",
deletechars( substring( line, 13 ),"\"") );
+ }
+ });
status_map = add( status_map, "Filename", file_name );
+ AddRevertCommand( sformat( "rm %1", file_name ) );
}
else
{
@@ -390,7 +400,6 @@
}
list <string> lines = splitstring( content, "\n" );
-
foreach( string line, (list<string>)lines, {
if ( regexpmatch( line, "^FCOE_ENABLE" ) )
{
--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx
Date: Tue Jul 5 13:00:28 2011
New Revision: 64750
URL: http://svn.opensuse.org/viewcvs/yast?rev=64750&view=rev
Log:
add revert cmd, get default values
Modified:
branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/FcoeClient.ycp
Modified: branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/FcoeClient.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/FcoeClient.ycp?rev=64750&r1=64749&r2=64750&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/FcoeClient.ycp (original)
+++ branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/FcoeClient.ycp Tue Jul 5
13:00:28 2011
@@ -369,9 +369,19 @@
boolean ret = SCR::Write( .target.string, file_name, def_values
);
if ( ret == true )
{
- status_map = add( status_map, "FCOE_ENABLE", "yes");
- status_map = add( status_map, "DCB_REQUIRED", "yes");
+ list <string> lines = splitstring( def_values, "\n" );
+ foreach( string line, (list<string>)lines, {
+ if ( regexpmatch( line, "^FCOE_ENABLE" ) )
+ {
+ status_map = add( status_map, "FCOE_ENABLE",
deletechars( substring(line, 12), "\"") );
+ }
+ if ( regexpmatch( line, "^DCB_REQUIRED" ) )
+ {
+ status_map = add( status_map, "DCB_REQUIRED",
deletechars( substring( line, 13 ),"\"") );
+ }
+ });
status_map = add( status_map, "Filename", file_name );
+ AddRevertCommand( sformat( "rm %1", file_name ) );
}
else
{
@@ -390,7 +400,6 @@
}
list <string> lines = splitstring( content, "\n" );
-
foreach( string line, (list<string>)lines, {
if ( regexpmatch( line, "^FCOE_ENABLE" ) )
{
--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx
| < Previous | Next > |