summaryrefslogtreecommitdiffstats
path: root/sysutils/consolekit/files
diff options
context:
space:
mode:
authormarcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059>2009-09-26 13:44:12 +0800
committermarcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059>2009-09-26 13:44:12 +0800
commit5e1e6ca4c809a7c186e05d72e4db3a6478bd2b27 (patch)
treeb2e3d6a0ec3f876ead5639a88103863b722d4727 /sysutils/consolekit/files
parent1def8907223f7453b9e518f29baa27a1921d7b6e (diff)
downloadmarcuscom-ports-5e1e6ca4c809a7c186e05d72e4db3a6478bd2b27.tar
marcuscom-ports-5e1e6ca4c809a7c186e05d72e4db3a6478bd2b27.tar.gz
marcuscom-ports-5e1e6ca4c809a7c186e05d72e4db3a6478bd2b27.tar.bz2
marcuscom-ports-5e1e6ca4c809a7c186e05d72e4db3a6478bd2b27.tar.lz
marcuscom-ports-5e1e6ca4c809a7c186e05d72e4db3a6478bd2b27.tar.xz
marcuscom-ports-5e1e6ca4c809a7c186e05d72e4db3a6478bd2b27.tar.zst
marcuscom-ports-5e1e6ca4c809a7c186e05d72e4db3a6478bd2b27.zip
Update to 0.4.1.
git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@13025 df743ca5-7f9a-e211-a948-0013205c9059
Diffstat (limited to 'sysutils/consolekit/files')
-rw-r--r--sysutils/consolekit/files/patch-tools_ck-log-system-start.c60
1 files changed, 60 insertions, 0 deletions
diff --git a/sysutils/consolekit/files/patch-tools_ck-log-system-start.c b/sysutils/consolekit/files/patch-tools_ck-log-system-start.c
new file mode 100644
index 000000000..0e125ef26
--- /dev/null
+++ b/sysutils/consolekit/files/patch-tools_ck-log-system-start.c
@@ -0,0 +1,60 @@
+--- tools/ck-log-system-start.c.orig 2009-09-14 20:08:10.000000000 -0400
++++ tools/ck-log-system-start.c 2009-09-26 01:35:37.000000000 -0400
+@@ -26,6 +26,9 @@
+ #include <unistd.h>
+ #include <errno.h>
+ #include <fcntl.h>
++#ifdef __FreeBSD__
++#include <kenv.h>
++#endif
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <sys/utsname.h>
+@@ -41,7 +44,9 @@
+
+ #define DEFAULT_LOG_FILENAME LOCALSTATEDIR "/log/ConsoleKit/history"
+
++#ifdef __linux__
+ #define LINUX_KERNEL_CMDLINE "/proc/cmdline"
++#endif
+
+ /* Adapted from auditd auditd-event.c */
+ static gboolean
+@@ -162,6 +167,7 @@ write_log_for_event (CkLogEvent *event)
+ static char *
+ get_boot_arguments (void)
+ {
++#if defined(__linux__)
+ char *contents;
+ gboolean res;
+
+@@ -178,6 +184,29 @@ get_boot_arguments (void)
+ }
+
+ return contents;
++#elif defined(__FreeBSD__)
++ char kern_name[1024], root[1024], mopts[1024];
++ char *options;
++
++ options = NULL;
++ if (kenv(KENV_GET, "kernelname", kern_name, sizeof (kern_name)) == -1) {
++ return options;
++ }
++
++ if (kenv(KENV_GET, "vfs.root.mountfrom.options", mopts, sizeof (mopts)) == -1) {
++ g_strlcpy (mopts, "ro", sizeof (mopts));
++ }
++
++ if (kenv(KENV_GET, "vfs.root.mountfrom", root, sizeof (root)) == -1) {
++ g_strlcpy (root, "/", sizeof (root));
++ }
++
++ options = g_strdup_printf ("%s %s root=%s", mopts, kern_name, root);
++
++ return options;
++#else
++ return NULL;
++#endif
+ }
+
+ int