From b88cf2f1aa6934a0bdc5b4090fef941f51e8a366 Mon Sep 17 00:00:00 2001 From: Simon Wilkinson Date: Wed, 16 Mar 2011 17:42:59 +0000 Subject: [PATCH] util: Remove remote.h remote.h is no longer used anywhere within the tree, and defines an interface that has never been provided by OpenAFS. Remove it. Change-Id: Id1007364f073c3bc2751491df371f51a37059381 Reviewed-on: http://gerrit.openafs.org/4249 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- src/util/Makefile.in | 6 - src/util/remote.h | 451 ------------------------------------------- 2 files changed, 457 deletions(-) delete mode 100644 src/util/remote.h diff --git a/src/util/Makefile.in b/src/util/Makefile.in index 3c53311ec..660f48930 100644 --- a/src/util/Makefile.in +++ b/src/util/Makefile.in @@ -55,7 +55,6 @@ includes = \ ${TOP_INCDIR}/afs/afs_assert.h \ ${TOP_INCDIR}/afs/errors.h \ ${TOP_INCDIR}/afs/vice.h \ - ${TOP_INCDIR}/afs/remote.h \ ${TOP_INCDIR}/afs/ktime.h \ ${TOP_INCDIR}/afs/fileutil.h \ ${TOP_INCDIR}/afs/netutils.h \ @@ -98,9 +97,6 @@ ${TOP_INCDIR}/afs/errors.h: ${srcdir}/errors.h ${TOP_INCDIR}/afs/vice.h: ${srcdir}/vice.h ${INSTALL_DATA} $? $@ -${TOP_INCDIR}/afs/remote.h: ${srcdir}/remote.h - ${INSTALL_DATA} $? $@ - ${TOP_INCDIR}/afs/ktime.h: ${srcdir}/ktime.h ${INSTALL_DATA} $? $@ @@ -292,7 +288,6 @@ install: dirpath.h util.a util_pic.a sys ${INSTALL_DATA} ${srcdir}/afs_assert.h ${DESTDIR}${includedir}/afs/afs_assert.h ${INSTALL_DATA} ${srcdir}/errors.h ${DESTDIR}${includedir}/afs/errors.h ${INSTALL_DATA} ${srcdir}/vice.h ${DESTDIR}${includedir}/afs/vice.h - ${INSTALL_DATA} ${srcdir}/remote.h ${DESTDIR}${includedir}/afs/remote.h ${INSTALL_DATA} ${srcdir}/ktime.h ${DESTDIR}${includedir}/afs/ktime.h ${INSTALL_DATA} ${srcdir}/fileutil.h ${DESTDIR}${includedir}/afs/fileutil.h ${INSTALL_DATA} ${srcdir}/netutils.h ${DESTDIR}${includedir}/afs/netutils.h @@ -321,7 +316,6 @@ dest: dirpath.h util.a util_pic.a sys ${INSTALL_DATA} ${srcdir}/afs_assert.h ${DEST}/include/afs/afs_assert.h ${INSTALL_DATA} ${srcdir}/errors.h ${DEST}/include/afs/errors.h ${INSTALL_DATA} ${srcdir}/vice.h ${DEST}/include/afs/vice.h - ${INSTALL_DATA} ${srcdir}/remote.h ${DEST}/include/afs/remote.h ${INSTALL_DATA} ${srcdir}/ktime.h ${DEST}/include/afs/ktime.h ${INSTALL_DATA} ${srcdir}/fileutil.h ${DEST}/include/afs/fileutil.h ${INSTALL_DATA} ${srcdir}/netutils.h ${DEST}/include/afs/netutils.h diff --git a/src/util/remote.h b/src/util/remote.h deleted file mode 100644 index d302faaa3..000000000 --- a/src/util/remote.h +++ /dev/null @@ -1,451 +0,0 @@ -/* - * Copyright 2000, International Business Machines Corporation and others. - * All Rights Reserved. - * - * This software has been released under the terms of the IBM Public - * License. For details, see the LICENSE file in the top-level source - * directory or online at http://www.openafs.org/dl/license10.html - */ - -/* - * In which the structures needed to facilitate interception of file system - * related system calls by a user process ("agent", or "venus"). - */ - -#define RT_VERSION 3 /* Version number, should be incremented - * before incompatible changes are released */ -/* - * Version 1 - April 4/84. - * Version 2 - May 4/84. - * Version 3 - May 30/85. - * Version 4 - June 19/85. - */ - -/* Maximum number of arguments to a system call */ -#define RT_MAX_ARGS ( (sizeof u.u_arg) / (sizeof (int)) ) - -#ifndef KERNEL -extern struct user u; -#endif /* KERNEL */ -/* Maximum size of combined string or structure arguments passed between - the kernel and a venus */ -#define RT_MAXDATASIZE (MAXPATHLEN*2) - -/* The format of the message passed between Venus and the kernel */ -struct intercept_message { - u_short im_type; /* Message type */ - u_short im_dsize; /* Number of bytes in im_data */ - int im_client; /* The process id of the client side of the - * transaction */ - short im_uid; /* The effective user id of the client */ - short im_gid; /* The effective group id of the client */ - int im_seq; /* The sequence number of this transaction. - * Never 0 */ - afs_int32 im_wdfid[3]; /* Current directory on the remote file system - * Vice II only. */ - int im_error; /* u.u_error copied from this */ - char im_follow1; /* 1=>follow last component of first pathname - * if symbolic link; 0=>don't */ - char im_follow2; /* ditto for second pathname */ - afs_int32 im_pag; /* process authentication group */ - /* im_arg contains a representation of the arguments to the intercepted - * system call, when transmitted from the kernel to Venus. - * Returned values are passed back from Venus to the kernel the same way */ - struct im_arg { - int im_aval; /* Value of the argument - * OR index of argument in im_data */ - int im_asize; /* If im_aval is the index of an argument in - * im_data, then this is its size in bytes. - * Otherwise this is 0. */ - } im_arg[RT_MAX_ARGS]; - char im_data[RT_MAXDATASIZE]; - /* Variable length field containing string - * or structure arguments */ - /* No fields should be added here, the record may be truncated on - * transmission in either direction to an appropriate size */ -}; - - - -#define RT_HEADERSIZE ((sizeof (struct intercept_message)) - RT_MAXDATASIZE) - -#ifdef KERNEL -/* The following shouldn't be done in this manner, but there doesn't - seem to be an easy mechanism to discover the device id. The auto- - config stuff is only for real devices, I think. - */ -#ifdef sun -#define RMT_MAJ 30 -#endif -#ifdef vax -#define RMT_MAJ 33 -#endif - -/* Sleep priorities */ -#define RMT_NOINT_PRI (PINOD+1) /* Sleep with signal handling enabled */ -#define RMT_INTOK_PRI (PSLEP-1) /* Disallow aborts due to signal handling */ - -/* Private data used by the remote intercept routines in the kernel */ -/* Note: this was originally designed for only a single remote device. - To make it work for multiple devices, I simply unfolded the code - by turning this into an array (1 entry per device) and using a macro - in the code to reference the appropriate entry. */ -struct remote { - int rt_flags; /* for flag values, see below */ - int rt_seq; /* sequence number generator */ - char rt_open; /* 1 if the device is open *//* XXX UNALIGNED */ - struct proc *rt_selproc; /* process waiting for select */ - char rt_attach; /* wait channel for process waiting to attach - * this structure */ - char rt_read; /* wait channel for a venus waiting for an - * intercept */ - char rt_reply; /* wait channel for a client process waiting - * for a reply */ - struct intercept_message rt_imr; /* buffer for agent reads */ - struct intercept_message rt_imw; /* buffer for agent writes */ -#include "rfs.h" -} remote[NRFS]; -#undef NRFS - -/* Hack to unfold code for multiple devices */ -#define rmt (*rmtp) -#define devhack(dev) struct remote *rmtp = &remote[minor(dev)] - -/* Flags for rmt.rt_flags */ -#define RT_RBUF 1 /* processing venus read request */ -#define RT_WBUF 2 /* processing venus write request */ -#define RT_SENDING 4 /* sending the structure to the venus */ -#define RT_REPLY 8 /* reply from venus to client */ -#define RT_SIGNAL 16 /* signal occured, want to send message to - * venus at next opportunity */ - -/* This bogus stuff is used for rename/link */ -struct Name { - int func; /* This used to be a function in BSD 4.2... */ - int follow; - struct buf *buf; - char *name; - dev_t dev; - enum { havePath, isLocal, haveDev, isRemote } state; -}; - -extern struct inode *RemoteNamei(); -extern int RemoteMaybe(); -#endif /* KERNEL */ - -/* - * Message type codes for messages sent from the kernel. - * NB: the kernel ignores the type field on reply (it merely matches - * sequence numbers). Unexpected messages from an venus are ignored (they - * may have been destined for a process which has died in the meantime). - * At all times, the kernel tries to maintain its own integrity, so that - * in the worst case an venus restart should work fine. - */ - -/* - * In the capsule descriptions below, "(?)" means that the flagged item - * is probably a good candidate for negotiation. - */ - -#define RT_BOGUS 0 -/* For debugging purposes in kernel */ - -#define RT_access 1 -/* From kernel: 0: uninterpreted part of pathname - * 1: mode - * NB: uid/gid for this call are the real (not effective) uid/gid's. - * Response: im_error - * if im_error == EABSPATH1 then: - * 0: Resolved absolute path name. - * NB: return value is implicit in im_error. - */ - -#define RT_chdir 2 -/* From kernel: 0: uninterpreted part of pathname - * Vice I response: - * 0: new pathname (with ..'s removed, symbolic - * links NOT expanded). - * length