Date: Mon, 12 Sep 2005 08:39:27 GMT From: soc-tyler <soc-tyler@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 83442 for review Message-ID: <200509120839.j8C8dRgZ019910@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=83442 Change 83442 by soc-tyler@soc-tyler_launchd on 2005/09/12 08:38:52 A bit of cleanup, setting up a machine to break with the init-emul stuff Affected files ... .. //depot/projects/soc2005/launchd/Makefile#21 edit .. //depot/projects/soc2005/launchd/includes/compat.h#2 delete .. //depot/projects/soc2005/launchd/includes/launchd.h#10 edit .. //depot/projects/soc2005/launchd/includes/property.h#4 delete .. //depot/projects/soc2005/launchd/launchctl/Makefile#11 edit .. //depot/projects/soc2005/launchd/launchctl/launchctl.c#24 edit .. //depot/projects/soc2005/launchd/launchd.c#24 edit .. //depot/projects/soc2005/launchd/launchdebugd/Makefile#4 edit .. //depot/projects/soc2005/launchd/launchdebugd/launchdebugd.c#3 edit .. //depot/projects/soc2005/launchd/launchproxy/Makefile#4 edit .. //depot/projects/soc2005/launchd/launchproxy/launchproxy.c#3 edit .. //depot/projects/soc2005/launchd/misc.c#3 edit Differences ... ==== //depot/projects/soc2005/launchd/Makefile#21 (text+ko) ==== ==== //depot/projects/soc2005/launchd/includes/launchd.h#10 (text+ko) ==== ==== //depot/projects/soc2005/launchd/launchctl/Makefile#11 (text+ko) ==== @@ -1,7 +1,7 @@ # $FreeBSD$ PROG= launchctl -SRCS= launchctl.c liblaunch.c property.c +SRCS= launchctl.c liblaunch.c LAUNCHD= ${.CURDIR}/../ ==== //depot/projects/soc2005/launchd/launchctl/launchctl.c#24 (text+ko) ==== @@ -73,10 +73,15 @@ */ #include "launch.h" +#include "launchd.h" #include "launch_priv.h" -#include "property.h" #define LAUNCH_SECDIR "/tmp/launch-XXXXXX" +/* launchd(8) specific definitions */ +#define LAUNCH_PROPERTY_LABEL "Label" +#define LAUNCH_PROPERTY_PATH "Path" +#define LAUNCH_PROPERTY_FLAGS "Flags" +#define LAUNCH_PROPERTY_LENGTH 128 static bool launch_data_array_append(launch_data_t a, launch_data_t o); static void distill_config_file(launch_data_t); ==== //depot/projects/soc2005/launchd/launchd.c#24 (text+ko) ==== @@ -56,9 +56,7 @@ #include <sys/ioctl.h> #include <sys/mount.h> #include <net/if.h> -#ifndef __OpenBSD__ #include <net/if_var.h> -#endif #include <netinet/in.h> #include <netinet/in_var.h> #include <netinet6/nd6.h> @@ -82,7 +80,6 @@ #include "launch.h" #include "launch_priv.h" #include "launchd.h" -#include "compat.h" #ifdef _BUILD_DARWIN_ #include "bootstrap_internal.h" ==== //depot/projects/soc2005/launchd/launchdebugd/Makefile#4 (text+ko) ==== @@ -1,7 +1,7 @@ # $FreeBSD$ PROG= launchdebugd -SRCS= launchdebugd.c liblaunch.c misc.c +SRCS= launchdebugd.c liblaunch.c MAN= launchdebugd.8 LAUNCHD= ${.CURDIR}/../ ==== //depot/projects/soc2005/launchd/launchdebugd/launchdebugd.c#3 (text+ko) ==== @@ -20,6 +20,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ + #include <sys/types.h> #include <sys/event.h> #include <sys/socket.h> @@ -35,7 +36,6 @@ #include <libgen.h> #include "launch.h" -#include "compat.h" static void launch_print_obj(launch_data_t o, FILE *w); ==== //depot/projects/soc2005/launchd/launchproxy/Makefile#4 (text+ko) ==== @@ -1,7 +1,7 @@ # $FreeBSD$ PROG= launchproxy -SRCS= launchproxy.c liblaunch.c misc.c +SRCS= launchproxy.c liblaunch.c MAN= launchproxy.8 LAUNCHD= ${.CURDIR}/../ ==== //depot/projects/soc2005/launchd/launchproxy/launchproxy.c#3 (text+ko) ==== @@ -54,7 +54,6 @@ #include "launch.h" #include "launchd.h" -#include "compat.h" static int kq = 0; ==== //depot/projects/soc2005/launchd/misc.c#3 (text+ko) ==== @@ -1,61 +1,0 @@ -/* - * $FreeBSD$ - * - * Copyright (c) 2005 - * R. Tyler Ballance <tyler@tamu.edu> - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - */ - -/* - * This file includes functions for launchd(8) to extend property(3) - * on FreeBSD - */ - -#include <stdlib.h> -#include <sys/types.h> -#include <libutil.h> - -#include "property.h" -#include "compat.h" - -int property_count(properties list) { - int count = 1; // there will be at least one element - struct _property *next_ptr = (struct _property *)(list->next); - - while (next_ptr != NULL) { - count++; - next_ptr = (struct _property *)(next_ptr->next); - } - - return count; -} - - -/* For some reason OpenBSD hasn't assimilated NetBSD's getprogname() */ -#ifdef __OpenBSD__ -const char *getprogname() { - return (__progname); -} -#endif -
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200509120839.j8C8dRgZ019910>