Hi all,
Attaching couple of tiny patches which fixes a build error in fsodeviced and
minor cleanup in common.vala under libfsoframework
--
Regards
Sudharshan S
Blog : http://www.sudharsh.wordpress.com
IRC : Sup3rkiddo @ Freenode, Gimpnet
From 6d006d245bdc4a99a52e8a8d659628ab32fab2c8 Mon Sep 17 00:00:00 2001
From: Sudharshan 'Sup3rkiddo' S
Date: Fri, 3 Apr 2009 20:57:31 +0530
Subject: [PATCH] Fix wrong usage of Dir which caused compiler error
Signed-off-by: Sudharshan 'Sup3rkiddo' S
---
fsodeviced/src/plugins/kernel26_leds/plugin.vala |4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fsodeviced/src/plugins/kernel26_leds/plugin.vala b/fsodeviced/src/plugins/kernel26_leds/plugin.vala
index cc1901a..5dd4e68 100644
--- a/fsodeviced/src/plugins/kernel26_leds/plugin.vala
+++ b/fsodeviced/src/plugins/kernel26_leds/plugin.vala
@@ -138,8 +138,8 @@ List instances;
public static string fso_factory_function( FsoFramework.Subsystem subsystem ) throws Error
{
// scan sysfs path for leds
-var dir = new Dir( Kernel26.SYS_CLASS_LEDS );
-var entry = dir.read_name();
+Dir dir = Dir.open( Kernel26.SYS_CLASS_LEDS, 0 );
+string entry = dir.read_name();
while ( entry != null )
{
var filename = Path.build_filename( Kernel26.SYS_CLASS_LEDS, entry );
--
1.6.0.6
From 23b14af25dcb492ee417b68ce61b2909c12c2958 Mon Sep 17 00:00:00 2001
From: Sudharshan 'Sup3rkiddo' S
Date: Fri, 3 Apr 2009 21:03:44 +0530
Subject: [PATCH] Clean up a bit in common
Signed-off-by: Sudharshan 'Sup3rkiddo' S
---
libfsoframework/fsoframework/common.vala | 26 --
1 files changed, 16 insertions(+), 10 deletions(-)
diff --git a/libfsoframework/fsoframework/common.vala b/libfsoframework/fsoframework/common.vala
index 84eb919..d668226 100644
--- a/libfsoframework/fsoframework/common.vala
+++ b/libfsoframework/fsoframework/common.vala
@@ -34,17 +34,23 @@ internal static SmartKeyFile _masterkeyfile = null;
public static SmartKeyFile theMasterKeyFile()
{
-if ( _masterkeyfile == null )
-{
+if ( _masterkeyfile == null ) {
+
_masterkeyfile = new SmartKeyFile();
-var try0 = "./frameworkd.conf";
-var try1 = "%s/.frameworkd.conf".printf( Environment.get_home_dir() );
-var try2 = "/etc/frameworkd.conf";
-if ( !_masterkeyfile.loadFromFile( try0 ) && !_masterkeyfile.loadFromFile( try1 ) && !_masterkeyfile.loadFromFile( try2 ) )
-{
-warning( "could not load %s nor %s nor %s", try0, try1, try2 );
-}
-}
+
+ string[] possible_paths = {
+ "./frameworkd.conf",
+ "%s/.frameworkd.conf".printf( Environment.get_home_dir()),
+ "/etc/frameworkd.conf"
+ };
+
+foreach (string path in possible_paths) {
+ if (_masterkeyfile.loadFromFile(path)) {
+print("FSO framework configuration file loaded from %s".printf(path));
+break;
+ }
+ }
+ }
return _masterkeyfile;
}
--
1.6.0.6
___
smartphones-standards mailing list
smartphones-standards@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-standards