From owner-p4-projects@FreeBSD.ORG Mon Sep 12 08:39:28 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 09B3916A421; Mon, 12 Sep 2005 08:39:28 +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 D666316A41F for ; Mon, 12 Sep 2005 08:39:27 +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 92DF343D45 for ; Mon, 12 Sep 2005 08:39:27 +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 j8C8dRaH019913 for ; Mon, 12 Sep 2005 08:39:27 GMT (envelope-from soc-tyler@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j8C8dRgZ019910 for perforce@freebsd.org; Mon, 12 Sep 2005 08:39:27 GMT (envelope-from soc-tyler@freebsd.org) Date: Mon, 12 Sep 2005 08:39:27 GMT Message-Id: <200509120839.j8C8dRgZ019910@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 83442 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: Mon, 12 Sep 2005 08:39:28 -0000 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 #include #include -#ifndef __OpenBSD__ #include -#endif #include #include #include @@ -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 #include #include @@ -35,7 +36,6 @@ #include #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 - * - * 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 -#include -#include - -#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 -