From owner-svn-src-head@FreeBSD.ORG Fri Mar 27 13:14:00 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 31DCC106566C; Fri, 27 Mar 2009 13:14:00 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1FE658FC1D; Fri, 27 Mar 2009 13:14:00 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n2RDE09Z061978; Fri, 27 Mar 2009 13:14:00 GMT (envelope-from jamie@svn.freebsd.org) Received: (from jamie@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n2RDDx36061975; Fri, 27 Mar 2009 13:13:59 GMT (envelope-from jamie@svn.freebsd.org) Message-Id: <200903271313.n2RDDx36061975@svn.freebsd.org> From: Jamie Gritton Date: Fri, 27 Mar 2009 13:13:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r190466 - in head/sys: compat/freebsd32 kern sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2009 13:14:00 -0000 Author: jamie Date: Fri Mar 27 13:13:59 2009 New Revision: 190466 URL: http://svn.freebsd.org/changeset/base/190466 Log: Whitespace/spelling fixes in advance of upcoming functional changes. Approved by: bz (mentor) Modified: head/sys/compat/freebsd32/freebsd32_misc.c head/sys/kern/kern_jail.c head/sys/sys/jail.h Modified: head/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_misc.c Fri Mar 27 13:05:29 2009 (r190465) +++ head/sys/compat/freebsd32/freebsd32_misc.c Fri Mar 27 13:13:59 2009 (r190466) @@ -2043,8 +2043,9 @@ freebsd32_jail(struct thread *td, struct error = copyin(uap->jail, &version, sizeof(uint32_t)); if (error) return (error); + switch (version) { - case 0: + case 0: { /* FreeBSD single IPv4 jails. */ struct jail32_v0 j32_v0; Modified: head/sys/kern/kern_jail.c ============================================================================== --- head/sys/kern/kern_jail.c Fri Mar 27 13:05:29 2009 (r190465) +++ head/sys/kern/kern_jail.c Fri Mar 27 13:13:59 2009 (r190466) @@ -2,7 +2,7 @@ * Copyright (c) 1999 Poul-Henning Kamp. * Copyright (c) 2008 Bjoern A. Zeeb. * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -119,14 +119,14 @@ struct sx allprison_lock; int lastprid = 0; int prisoncount = 0; -static void init_prison(void *); -static void prison_complete(void *context, int pending); -static int sysctl_jail_list(SYSCTL_HANDLER_ARGS); +static void init_prison(void *); +static void prison_complete(void *context, int pending); +static int sysctl_jail_list(SYSCTL_HANDLER_ARGS); #ifdef INET -static int _prison_check_ip4(struct prison *, struct in_addr *); +static int _prison_check_ip4(struct prison *pr, struct in_addr *ia); #endif #ifdef INET6 -static int _prison_check_ip6(struct prison *, struct in6_addr *); +static int _prison_check_ip6(struct prison *pr, struct in6_addr *ia6); #endif static void @@ -177,7 +177,7 @@ qcmp_v6(const void *ip1, const void *ip2 ia6b = (const struct in6_addr *)ip2; rc = 0; - for (i=0; rc == 0 && i < sizeof(struct in6_addr); i++) { + for (i = 0; rc == 0 && i < sizeof(struct in6_addr); i++) { if (ia6a->s6_addr[i] > ia6b->s6_addr[i]) rc = 1; else if (ia6a->s6_addr[i] < ia6b->s6_addr[i]) @@ -240,7 +240,7 @@ static int jail_copyin_ips(struct jail *j) { #ifdef INET - struct in_addr *ip4; + struct in_addr *ip4; #endif #ifdef INET6 struct in6_addr *ip6; @@ -348,7 +348,7 @@ jail_handle_ips(struct jail *j) * Finish conversion for older versions, copyin and setup IPs. */ switch (j->version) { - case 0: + case 0: { #ifdef INET /* FreeBSD single IPv4 jails. */ @@ -594,6 +594,7 @@ e_killmtx: return (error); } + /* * struct jail_attach_args { * int jid; @@ -807,7 +808,7 @@ prison_proc_free(struct prison *pr) * Pass back primary IPv4 address of this jail. * * If not jailed return success but do not alter the address. Caller has to - * make sure to intialize it correctly (e.g. INADDR_ANY). + * make sure to initialize it correctly (e.g. INADDR_ANY). * * Returns 0 on success, EAFNOSUPPORT if the jail doesn't allow IPv4. * Address returned in NBO. @@ -822,7 +823,6 @@ prison_get_ip4(struct ucred *cred, struc if (!jailed(cred)) /* Do not change address passed in. */ return (0); - if (cred->cr_prison->pr_ip4 == NULL) return (EAFNOSUPPORT); @@ -956,7 +956,7 @@ prison_check_ip4(struct ucred *cred, str * Pass back primary IPv6 address for this jail. * * If not jailed return success but do not alter the address. Caller has to - * make sure to intialize it correctly (e.g. IN6ADDR_ANY_INIT). + * make sure to initialize it correctly (e.g. IN6ADDR_ANY_INIT). * * Returns 0 on success, EAFNOSUPPORT if the jail doesn't allow IPv6. */ Modified: head/sys/sys/jail.h ============================================================================== --- head/sys/sys/jail.h Fri Mar 27 13:05:29 2009 (r190465) +++ head/sys/sys/jail.h Fri Mar 27 13:13:59 2009 (r190466) @@ -7,7 +7,6 @@ * ---------------------------------------------------------------------------- * * $FreeBSD$ - * */ #ifndef _SYS_JAIL_H_ @@ -32,7 +31,7 @@ struct jail { struct in_addr *ip4; struct in6_addr *ip6; }; -#define JAIL_API_VERSION 2 +#define JAIL_API_VERSION 2 /* * For all xprison structs, always keep the pr_version an int and @@ -54,8 +53,8 @@ struct xprison { int pr_state; cpusetid_t pr_cpusetid; char pr_path[MAXPATHLEN]; - char pr_host[MAXHOSTNAMELEN]; - char pr_name[MAXHOSTNAMELEN]; + char pr_host[MAXHOSTNAMELEN]; + char pr_name[MAXHOSTNAMELEN]; uint32_t pr_ip4s; uint32_t pr_ip6s; #if 0 @@ -128,8 +127,8 @@ struct prison { char pr_path[MAXPATHLEN]; /* (c) chroot path */ struct cpuset *pr_cpuset; /* (p) cpuset */ struct vnode *pr_root; /* (c) vnode to rdir */ - char pr_host[MAXHOSTNAMELEN]; /* (p) jail hostname */ - char pr_name[MAXHOSTNAMELEN]; /* (c) admin jail name */ + char pr_host[MAXHOSTNAMELEN]; /* (p) jail hostname */ + char pr_name[MAXHOSTNAMELEN]; /* (c) admin jail name */ void *pr_linux; /* (p) linux abi */ int pr_securelevel; /* (p) securelevel */ struct task pr_task; /* (d) destroy task */