From: <bva...@us...> - 2011-06-19 06:21:55
|
Revision: 3593 http://scst.svn.sourceforge.net/scst/?rev=3593&view=rev Author: bvassche Date: 2011-06-19 06:21:49 +0000 (Sun, 19 Jun 2011) Log Message: ----------- scstadmin(sysfs): Make writing top-level non-key attributes work. Do not indent these attributes. Modified Paths: -------------- trunk/scstadmin/scstadmin.sysfs/scstadmin Modified: trunk/scstadmin/scstadmin.sysfs/scstadmin =================================================================== --- trunk/scstadmin/scstadmin.sysfs/scstadmin 2011-06-19 06:11:03 UTC (rev 3592) +++ trunk/scstadmin/scstadmin.sysfs/scstadmin 2011-06-19 06:21:49 UTC (rev 3593) @@ -1024,10 +1024,10 @@ if (!$$attributes{$attribute}->{'static'}) { if (defined($$attributes{$attribute}->{'keys'})) { - foreach my $key (@{$$attributes{$attribute}->{'keys'}}) { + foreach my $key (%{$$attributes{$attribute}->{'keys'}}) { my $value = $$attributes{$attribute}->{'keys'}->{$key}->{'value'}; $value = "\"$value\"" if ($value =~ / /); - print $io "\t$attribute $value\n" + print $io "$attribute $value\n" if (defined($value) && ($value ne '')); } } elsif ($nonkey) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |