diff options
author | kremlin- <ian@kremlin.cc> | 2014-06-26 09:44:39 +0800 |
---|---|---|
committer | kremlin- <ian@kremlin.cc> | 2014-06-26 09:44:39 +0800 |
commit | e8f563da640afecdbe77027d7d27e0768f52bebc (patch) | |
tree | 219b736f4c0503baee1a1c7818730020f97c42dc /src/main.h | |
parent | 4241079f6154438e2ed64ee1a46b4cba6f1cde01 (diff) | |
parent | fbc0295f6d0b50482a8f636b5ceba244e195ecaa (diff) | |
download | systembsd-e8f563da640afecdbe77027d7d27e0768f52bebc.tar systembsd-e8f563da640afecdbe77027d7d27e0768f52bebc.tar.gz systembsd-e8f563da640afecdbe77027d7d27e0768f52bebc.tar.bz2 systembsd-e8f563da640afecdbe77027d7d27e0768f52bebc.tar.lz systembsd-e8f563da640afecdbe77027d7d27e0768f52bebc.tar.xz systembsd-e8f563da640afecdbe77027d7d27e0768f52bebc.tar.zst systembsd-e8f563da640afecdbe77027d7d27e0768f52bebc.zip |
merge license, hostname buffer changes from master branch
Diffstat (limited to 'src/main.h')
-rw-r--r-- | src/main.h | 42 |
1 files changed, 29 insertions, 13 deletions
@@ -1,21 +1,37 @@ +/* + * Copyright (c) 2014 Ian Sutton <ian@kremlin.cc> + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + #include <gio/gio.h> //TODO change this to config dir, not data dir gboolean install_conf() { - gchar *our_conf_uri = "systemd-utl/xml-conf/"; - gchar **data_dir = g_get_system_data_dirs(); + gchar *our_conf_uri = "systemd-utl/xml-conf/"; + gchar **data_dir = g_get_system_data_dirs(); - if(g_strcmp0(data_dir[0], NULL)) { - const gchar our_conf_path[256]; - g_snprintf(our_conf_path, sizeof our_conf_path, "%s%s", *data_dir, our_conf_uri); - GError **errors; + if(g_strcmp0(data_dir[0], NULL)) { + const gchar our_conf_path[256]; + g_snprintf(our_conf_path, sizeof our_conf_path, "%s%s", *data_dir, our_conf_uri); + GError **errors; - /*TODO permissions w/ this */ - g_mkdir_with_parents(our_conf_path, 0644); - - return FALSE; - //return (errors[0] == NULL); + /*TODO permissions w/ this */ + g_mkdir_with_parents(our_conf_path, 0644); + + return FALSE; + //return (errors[0] == NULL); - } else - return FALSE; + } else + return FALSE; } |