From owner-p4-projects@FreeBSD.ORG Fri Jul 8 23:47:24 2005 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0B8D016A420; Fri, 8 Jul 2005 23:47:24 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C347D16A41C for ; Fri, 8 Jul 2005 23:47:23 +0000 (GMT) (envelope-from soc-tyler@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8B88243D46 for ; Fri, 8 Jul 2005 23:47:23 +0000 (GMT) (envelope-from soc-tyler@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j68NlNoF001945 for ; Fri, 8 Jul 2005 23:47:23 GMT (envelope-from soc-tyler@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j68NlN7L001942 for perforce@freebsd.org; Fri, 8 Jul 2005 23:47:23 GMT (envelope-from soc-tyler@freebsd.org) Date: Fri, 8 Jul 2005 23:47:23 GMT Message-Id: <200507082347.j68NlN7L001942@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to soc-tyler@freebsd.org using -f From: soc-tyler To: Perforce Change Reviews Cc: Subject: PERFORCE change 79785 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jul 2005 23:47:25 -0000 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 * - * 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[]) {