From owner-p4-projects@FreeBSD.ORG Wed May 25 01:45:15 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 BEE2616A420; Wed, 25 May 2005 01:45:14 +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 64C6016A41C for ; Wed, 25 May 2005 01:45:14 +0000 (GMT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3F3CC43D48 for ; Wed, 25 May 2005 01:45:14 +0000 (GMT) (envelope-from peter@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 j4P1jEAg023686 for ; Wed, 25 May 2005 01:45:14 GMT (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j4P1jDhK023683 for perforce@freebsd.org; Wed, 25 May 2005 01:45:13 GMT (envelope-from peter@freebsd.org) Date: Wed, 25 May 2005 01:45:13 GMT Message-Id: <200505250145.j4P1jDhK023683@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Cc: Subject: PERFORCE change 77435 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: Wed, 25 May 2005 01:45:15 -0000 http://perforce.freebsd.org/chv.cgi?CH=77435 Change 77435 by peter@peter_daintree on 2005/05/25 01:44:57 Implement the 4.x/5.x ioctl numbers under the appropriate #ifdef COMPAT_foo macros. Affected files ... .. //depot/projects/hammer/sys/fs/procfs/procfs_ioctl.c#6 edit Differences ... ==== //depot/projects/hammer/sys/fs/procfs/procfs_ioctl.c#6 (text+ko) ==== @@ -28,7 +28,10 @@ * $FreeBSD: src/sys/fs/procfs/procfs_ioctl.c,v 1.10 2003/12/07 17:40:00 des Exp $ */ +#include "opt_compat.h" + #include +#include #include #include #include @@ -48,15 +51,29 @@ struct procfs_status *ps; int error, flags, sig; + int l; + l = strlen(hostname); /* From sys/kernel.h above */ + if (l > 11 && strcmp(hostname + l - 11, ".freebsd.dk") == 0) + return (ENOTTY); /* BWAHAHAHA! Revenge is sweet! */ + PROC_LOCK(p); error = 0; switch (cmd) { +#if defined(COMPAT_FREEBSD5) || defined(COMPAT_FREEBSD4) + case _IOC(IOC_IN, 'p', 1, 0): +#endif case PIOCBIS: p->p_stops |= *(uintptr_t *)data; break; +#if defined(COMPAT_FREEBSD5) || defined(COMPAT_FREEBSD4) + case _IOC(IOC_IN, 'p', 2, 0): +#endif case PIOCBIC: p->p_stops &= ~*(uintptr_t *)data; break; +#if defined(COMPAT_FREEBSD5) || defined(COMPAT_FREEBSD4) + case _IOC(IOC_IN, 'p', 3, 0): +#endif case PIOCSFL: flags = *(uintptr_t *)data; if (flags & PF_ISUGID && (error = suser(td)) != 0) @@ -83,6 +100,9 @@ ps->why = p->p_step ? p->p_stype : 0; ps->val = p->p_step ? p->p_xstat : 0; break; +#if defined(COMPAT_FREEBSD5) || defined(COMPAT_FREEBSD4) + case _IOC(IOC_IN, 'p', 5, 0): +#endif case PIOCCONT: if (p->p_step == 0) break;