Date: Fri, 26 Aug 2005 14:19:01 GMT From: soc-tyler <soc-tyler@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 82618 for review Message-ID: <200508261419.j7QEJ1Yh053639@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=82618 Change 82618 by soc-tyler@soc-tyler_launchd on 2005/08/26 14:18:56 Add testjob stuff to show zarzycki@ Affected files ... .. //depot/projects/soc2005/launchd/launchctl/launchctl.c#11 edit .. //depot/projects/soc2005/launchd/launchers/testjob.launch#1 add .. //depot/projects/soc2005/launchd/testing/testjob.c#1 add Differences ... ==== //depot/projects/soc2005/launchd/launchctl/launchctl.c#11 (text+ko) ==== @@ -73,6 +73,7 @@ #include "launch.h" #include "launch_priv.h" +#include "property.h" #define LAUNCH_SECDIR "/tmp/launch-XXXXXX" @@ -323,20 +324,22 @@ } #ifndef _BUILD_DARWIN +#ifdef _LAUNCHD_ static launch_data_t read_conf_file(const char *file, bool editondisk, bool load) { /* fill this with an array of launch_data_t structs */ launch_data_t retval = NULL; - properties conf_props; + properties conf_props; // libutil.h and -lutil are required for this.. int fd; fd = open(file, O_RDONLY); + if (fd == -1) return NULL; /* calling function must check for a NULL pointer */ conf_props = properties_read(fd); /* read in config data */ retval = launch_data_alloc(LAUNCH_DATA_PROPERTY); - launch_data_set_opaque(retval, (const void *)(conf_props), sizeof(properties)); + //launch_data_set_opaque(retval, (const void *)(conf_props), sizeof(properties)); /* I figure we'll just add the properties(3) linked list to the * opaque launch_data_t datatype (opaque ~= void *) @@ -348,6 +351,7 @@ return retval; } #endif +#endif #ifdef _BUILD_DARWIN_ static launch_data_t read_plist_file(const char *file, bool editondisk, bool load) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200508261419.j7QEJ1Yh053639>