Date: Fri, 8 Jul 2005 23:47:23 GMT From: soc-tyler <soc-tyler@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 79785 for review Message-ID: <200507082347.j68NlN7L001942@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=79785 Change 79785 by soc-tyler@soc-tyler_launchd on 2005/07/08 23:46:51 Remove -lexpat from Makefile, we're not going with XML for now. Comment out all the CoreFoundation related functions and begin to implement replacement functions for them (using libutil, etc) Affected files ... .. //depot/projects/soc2005/launchd/launchctl/Makefile#4 edit .. //depot/projects/soc2005/launchd/launchctl/launchctl.c#4 edit Differences ... ==== //depot/projects/soc2005/launchd/launchctl/Makefile#4 (text+ko) ==== @@ -9,7 +9,7 @@ LAUNCHD= ${.CURDIR}/../ CFLAGS+= -g -Wall -W -Wshadow -Wpadded -I${LAUNCHD}/includes -LDADD+= -lreadline +LDADD+= -lreadline -lutil .PATH: ${LAUNCHD} ==== //depot/projects/soc2005/launchd/launchctl/launchctl.c#4 (text+ko) ==== @@ -85,8 +85,8 @@ /* Mac OS specific * #include <dns_sd.h> * - * This includes the Zeroconf headers, why launchctl needs access to Zeroconf - * right now is beyond me... + * This includes the Zeroconf headers, so launchctl(1) can start the + * 'advertising' end of Zeroconf for daemons (ssh, xinetd, etc) */ #include "launch.h" @@ -98,14 +98,14 @@ static void distill_config_file(launch_data_t); static void sock_dict_cb(launch_data_t what, const char *key, void *context); static void sock_dict_edit_entry(launch_data_t tmp, const char *key, launch_data_t fdarray, launch_data_t thejob); -static launch_data_t CF2launch_data(const void *); -static launch_data_t read_plist_file(const char *file, bool editondisk, bool load); -static CFPropertyListRef CreateMyPropertyListFromFile(const char *); -static void WriteMyPropertyListToFile(CFPropertyListRef, const char *); +//static launch_data_t CF2launch_data(const void *); +//static launch_data_t read_plist_file(const char *file, bool editondisk, bool load); +//static const void *CreateMyPropertyListFromFile(const char *); +//static void WriteMyPropertyListToFile(CFPropertyListRef, const char *); static void readpath(const char *, launch_data_t, launch_data_t, bool editondisk, bool load); static int _fd(int); static int demux_cmd(int argc, char *const argv[]); -static launch_data_t do_rendezvous_magic(const struct addrinfo *res, const char *serv); +//static launch_data_t do_rendezvous_magic(const struct addrinfo *res, const char *serv); static void submit_job_pass(launch_data_t jobs); static int load_and_unload_cmd(int argc, char *const argv[]); @@ -329,6 +329,13 @@ launch_data_free(resp); } +static launch_data_t read_conf_file(const char *file, bool editondisk, bool load) { + launch_data_t r = NULL; + + + return r; +} +/* static launch_data_t read_plist_file(const char *file, bool editondisk, bool load) { CFPropertyListRef plist = CreateMyPropertyListFromFile(file); @@ -353,6 +360,7 @@ return r; } +*/ static void delay_to_second_pass2(launch_data_t o, const char *key, void *context) { @@ -396,7 +404,7 @@ launch_data_t tmpd, thejob; bool job_disabled = false; - if (NULL == (thejob = read_plist_file(what, editondisk, load))) { + if (NULL == (thejob = read_conf_file(what, editondisk, load))) { fprintf(stderr, "%s: no plist was returned for: %s\n", getprogname(), what); return; } @@ -632,11 +640,15 @@ launch_data_dict_insert(thejob, rvs_fds, LAUNCH_JOBKEY_BONJOURFDS); } if (NULL == rnames) { + /* XXX: let's NOT do any rendezvous magic :P rvs_fd = do_rendezvous_magic(res, serv); + */ if (rvs_fd) launch_data_array_append(rvs_fds, rvs_fd); } else if (LAUNCH_DATA_STRING == launch_data_get_type(rnames)) { + /* XXX: let's NOT do any rendezvous magic :P rvs_fd = do_rendezvous_magic(res, launch_data_get_string(rnames)); + */ if (rvs_fd) launch_data_array_append(rvs_fds, rvs_fd); } else if (LAUNCH_DATA_ARRAY == launch_data_get_type(rnames)) { @@ -644,8 +656,10 @@ for (rn_i = 0; rn_i < rn_ac; rn_i++) { launch_data_t rn_tmp = launch_data_array_get_index(rnames, rn_i); - + + /* XXX: let's NOT do any rendezvous magic :P rvs_fd = do_rendezvous_magic(res, launch_data_get_string(rn_tmp)); + */ if (rvs_fd) launch_data_array_append(rvs_fds, rvs_fd); } @@ -669,9 +683,6 @@ } /* - * XXX: what in the hell does this do O_o - */ -/* static launch_data_t do_rendezvous_magic(const struct addrinfo *res, const char *serv) { struct stat sb; @@ -702,9 +713,8 @@ fprintf(stderr, "DNSServiceRegister(\"%s\"): %d\n", serv, error); return NULL; } -*/ -static CFPropertyListRef CreateMyPropertyListFromFile(const char *posixfile) +static const void *CreateMyPropertyListFromFile(const char *posixfile) { CFPropertyListRef propertyList; CFStringRef errorString; @@ -815,6 +825,7 @@ } return r; } +*/ static int help_cmd(int argc, char *const argv[]) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200507082347.j68NlN7L001942>