I have made the following changes intended for :
  CE:UX:MTF / usb-moded

Please review and accept or decline.
BOSS has already run some checks on this request.
See the "Messages from BOSS" section below.

https://build.pub.meego.com//request/show/7435

Thank You,
philippedeswert

[This message was auto-generated]

---

Request # 7435:

Messages from BOSS:

State: review at 2012-11-22T13:01:41 by bossbot

Reviews:
       accepted by bossbot : Prechecks succeeded.
       new for CE-maintainers : Please replace this text with a review and 
approve/reject the review (not the SR). BOSS will take care of the rest

Changes:
  submit: home:philippedeswert:branches:CE:UX:MTF / usb-moded -> CE:UX:MTF / 
usb-moded
  
changes files:
--------------
--- usb-moded.changes
+++ usb-moded.changes
@@ -0,0 +1,3 @@
+* Thu Nov 20 2012 Philippe De Swert <[email protected]> - 0.54.1
+- Fix configuration file creation when the /etc/usb-moded dir is missing
+

old:
----
  usb-moded-0.54.tar.bz2

new:
----
  usb-moded-0.54.1.tar.bz2

spec files:
-----------
--- usb-moded.spec
+++ usb-moded.spec
@@ -1,5 +1,5 @@
 Name:     usb-moded
-Version:  0.54
+Version:  0.54.1
 Release:  0 
 Summary:  USB mode controller
 Group:    System/System Control

other changes:
--------------

++++++ usb-moded-0.54.tar.bz2 -> usb-moded-0.54.1.tar.bz2
--- src/usb_moded-config.c
+++ src/usb_moded-config.c
@@ -25,6 +25,9 @@
 #include <string.h>
 #include <stdio.h>
 
+#include <sys/stat.h>
+#include <sys/types.h>
+
 #include <glib.h>
 /*
 #include <glib/gkeyfile.h>
@@ -135,6 +138,8 @@
   GKeyFile *settingsfile;
   gchar *keyfile;
 
+  mkdir(CONFIG_FILE_DIR, 755);
+
   settingsfile = g_key_file_new();
 
   g_key_file_set_string(settingsfile, MODE_SETTING_ENTRY, MODE_SETTING_KEY, 
MODE_DEVELOPER );
--- src/usb_moded-config.h
+++ src/usb_moded-config.h
@@ -20,7 +20,8 @@
 */
 
 
-#define FS_MOUNT_CONFIG_FILE           "/etc/usb-moded/usb-moded.ini"
+#define CONFIG_FILE_DIR                        "/etc/usb-moded"
+#define FS_MOUNT_CONFIG_FILE           CONFIG_FILE_DIR"/usb-moded.ini"
 
 #define MODE_SETTING_ENTRY             "usbmode"
 #define MODE_SETTING_KEY               "mode"
--- src/usb_moded.c
+++ src/usb_moded.c
@@ -481,10 +481,12 @@
                 "Usage: usb_moded [OPTION]...\n"
                   "USB mode daemon\n"
                   "\n"
+                 "  -f,  --fallback      assume always connected\n"
                   "  -s,  --force-syslog  log to syslog\n"
                   "  -T,  --force-stderr  log to stderr\n"
                   "  -D,  --debug        turn on debug printing\n"
                   "  -h,  --help          display this help and exit\n"
+                 "  -r,  --rescue        rescue mode\n"
                   "  -v,  --version       output version information and 
exit\n"
                  "  -w,  --watch-off     do not act on runlevel change\n"
                   "\n");



Reply via email to