diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2007-12-24 01:25:21 +0100 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2007-12-24 01:25:21 +0100 |
commit | fb83ef710615f3239e1a9ce48363bf215359eb78 (patch) | |
tree | c848927338946c47ee87fa58b47782d4adba8223 /src/main.c | |
parent | b93a99e200eaec8c8b0943531e11bffe86d3122d (diff) | |
download | connman-fb83ef710615f3239e1a9ce48363bf215359eb78.tar.gz connman-fb83ef710615f3239e1a9ce48363bf215359eb78.tar.bz2 connman-fb83ef710615f3239e1a9ce48363bf215359eb78.zip |
Add support for state directory
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -25,8 +25,10 @@ #include <stdio.h> #include <stdlib.h> +#include <unistd.h> #include <string.h> #include <signal.h> +#include <sys/stat.h> #include <gdbus.h> @@ -44,6 +46,9 @@ int main(int argc, char *argv[]) DBusConnection *conn; struct sigaction sa; + mkdir(STATEDIR, S_IRUSR | S_IWUSR | S_IXUSR | + S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH); + main_loop = g_main_loop_new(NULL, FALSE); conn = g_dbus_setup_bus(DBUS_BUS_SYSTEM, CONNMAN_SERVICE); @@ -75,5 +80,7 @@ int main(int argc, char *argv[]) g_main_loop_unref(main_loop); + rmdir(STATEDIR); + return 0; } |