which included commits to RCS files with non-trunk default branches.
-Openafs News -- history of user Visible changes. 11 July 2001
+Openafs News -- history of user Visible changes. September 17, 2001
-* Changes since OpenAFS 1.1.1
+* Changes incorporated in OpenAFS 1.2.0
** AFS now supports --prefix and the other directory options of
configure. By default AFS builds assuming it will be installed in
/usr/local. In order to get traditional AFS directory paths (/usr/afs
and /usr/vice/etc) use the --enable-transarc-paths option to
configure. More details on the new directory layout are found in README.
-
-* Changes since Openafs 1.0
+
+
+* Changes incorporated in OpenAFS 1.1.1a
+
+** Windows 95/98/ME/NT/2000 - Consistent versioning
+ Installation, AFS Control Center, Client dialog boxes and properties
+ pages for executables display a consistent OpenAFS version number.
+ Installation detects previous installation and prompts the user for upgrade
+ options.
+
+** Windows 95/98/ME/NT/2000 - Installation features
+ During installation the user can select the source of the CellservDB file,
+ AFS home cell, and drive mappings. During installation a drive path
+ mapping can include a variable that will be substituted with the current
+ UserName that is logged in.
+
+** Windows 2000/NT - Integrated logon
+ The Integrated Logon feature works now.
+
+** Windows 95/98/ME - Logon script features
+ The Windows 95/98/ME client now offers a command-line option for starting up
+ the AFS client without authenication. It is now possilbe to start the AFS
+ client first and obtain tokens, and map drives all through Windows scripts.
+ This helps using Windows 95/98/ME client in Kerberos 5 environment.
+
+** Windows 2000/NT - LANA numbers
+ AFS client now scans the LANA numbers to establish the correct NETBIOS
+ connection. NetBEUI is no longer needed. The user no longer needs to find
+ the correct LANA number.
+
+** Windows 2000/NT - OpenAFS naming consistancy
+ Further progress has been made to remove references to "Transarc AFS"
+ and replace with "OpenAFS".
+
+
+
+* Changes since OpenAFS 1.0
** AFS now builds with configure. The README for building has been
updated and includes full details.
CVS snapshots do not include files generated by autoconf; You can
run regen.sh (at the top level) to create these files. You will need
-to have autoconf installed on your system.
+to have autoconf and automake installed on your system.
+*********
+Using CVS
+*********
+Summary
+-------
+ CVSROOT: :pserver:anonymous@cvs.openafs.org:/cvs
+ password: anonymous
+
+Step-by-step
+------------
+
+1. Obtain the CVS software. Go to http://www.cvshome.org
+
+2. Set the environment variable CVSROOT to the CVSROOT listed above, e.g.
+ (csh) setenv CVSROOT :pserver:anonymous@cvs.openafs.org:/cvs
+ (sh) CVSROOT=:pserver:anonymous@cvs.openafs.org:/cvs; export CVSROOT
+ (dos) set CVSROOT=:pserver:anonymous@cvs.openafs.org:/cvs
+
+3. Run the following commands:
+ % cvs login
+
+ When prompted for the password, use the password listed above.
+
+ % cvs checkout openafs
+
+After this command completes there will be an openafs subdirectory
+with the latest sources.
+
+Useful commands are "cvs update", "cvs diff', "cvs log". Refer to the
+CVS documentation for more details and options.
+
+Note that you can not do the "cvs commit" as an anonymous user.
+
+Code changes may be sent to:
+ openafs-bugs@openafs.org (private list)
+ openafs-devel@openafs.org (public list)
AC_INIT(Makefile.common)
-AM_INIT_AUTOMAKE(openafs-libafs,1.2.0)
+AM_INIT_AUTOMAKE(openafs-libafs,1.2.1)
AC_CANONICAL_HOST
-AC_CONFIG_HEADER(src/config/afsconfig.h)
+AC_CONFIG_HEADER(config/afsconfig.h)
#BOZO_SAVE_CORES BOS_RESTRICTED_MODE BOS_NEW_CONFIG pam sia
AC_ARG_WITH(afs-sysname,
MKAFS_OSTYPE=FBSD
AC_MSG_RESULT(i386_fbsd)
;;
+ *-openbsd*)
+ MKAFS_OSTYPE=OBSD
+ AC_MSG_RESULT(i386_obsd)
+ ;;
*)
AC_MSG_RESULT($system)
;;
;;
powerpc-apple-darwin1.2*)
AFS_SYSNAME="ppc_darwin_12"
- DARWIN_PLIST=src/afsd/afs.${AFS_SYSNAME}.plist
+ DARWIN_PLIST=afs.${AFS_SYSNAME}.plist
+ DARWIN_INFOFILE=afs.${AFS_SYSNAME}.plist
;;
powerpc-apple-darwin1.3*)
AFS_SYSNAME="ppc_darwin_13"
- DARWIN_PLIST=src/afsd/afs.${AFS_SYSNAME}.plist
+ DARWIN_PLIST=afs.${AFS_SYSNAME}.plist
+ DARWIN_INFOFILE=afs.${AFS_SYSNAME}.plist
;;
powerpc-apple-darwin1.4*)
AFS_SYSNAME="ppc_darwin_14"
- DARWIN_PLIST=src/afsd/afs.${AFS_SYSNAME}.plist
+ DARWIN_PLIST=afs.${AFS_SYSNAME}.plist
+ DARWIN_INFOFILE=afs.${AFS_SYSNAME}.plist
;;
sparc-sun-solaris2.5*)
AFS_SYSNAME="sun4x_55"
AC_SUBST(DEST)
AC_SUBST(WITH_OBSOLETE)
AC_SUBST(WITH_INSECURE)
+AC_SUBST(DARWIN_INFOFILE)
AC_OUTPUT( \
Makefile \
int code;
/* initialize command syntax */
- initialize_cmd_error_table();
+ initialize_CMD_error_table();
SetupCmd();
/* execute command */
nmake /nologo /f ntmakefile primary
$(CD) ..\afsadmsvr
+afsapplib_clean :
+ $(CD) ..\afsapplib
+ nmake /nologo /f ntmakefile clean
+ $(CD) ..\afsadmsvr
+
afsclass_primary :
$(CD) ..\afsclass
nmake /nologo /f ntmakefile primary
$(CD) ..\afsadmsvr
+afsclass_clean :
+ $(CD) ..\afsclass
+ nmake /nologo /f ntmakefile clean
+ $(CD) ..\afsadmsvr
+
$(EXEFILE) : $(EXEOBJS) $(EXELIBS)
$(EXECONLINK) $(VCLIBS)
$(EXEPREP)
afsclass_primary \
$(EXEFILE)
-clean::
+clean:: afsclass_clean afsapplib_clean
if exist ITaAfsAdmSvr*.cpp del ITaAfsAdmSvr*.cpp
if exist ITaAfsAdmSvr*.c del ITaAfsAdmSvr*.c
if exist ITaAfsAdmSvr*.h del ITaAfsAdmSvr*.h
int foundCell;
long code;
int tracking = 1, partial = 0;
- long ip_addr;
#if defined(DJGPP) || defined(AFS_WIN95_ENV)
+ long ip_addr;
int c1, c2, c3, c4;
char aname[256];
#endif
} cm_space_t;
/* error code hack */
-#define ERROR_TABLE_BASE_vl (363520L)
+#define ERROR_TABLE_BASE_VL (363520L)
#define VL_NOENT (363524L)
extern cm_space_t *cm_GetSpace(void);
whoami = argv[0];
/* initialize command syntax */
- initialize_cmd_error_table();
+ initialize_CMD_error_table();
SetupVptCmd();
SetupDirCmd();
return 0;
}
- // Check the version of the client. It must be at least 35.
- if (g_CfgData.nClientVersion < 35) {
- int nMajor, nMinor;
- nMajor = g_CfgData.nClientVersion / 10;
- nMinor = g_CfgData.nClientVersion - (nMajor * 10);
- g_LogFile.Write("The version of the AFS Client on this machine (%d.%d) is too old to run the server. The Client must be at least version 3.5.\r\n", nMajor, nMinor);
- ErrorDialog(0, IDS_ERROR_CLIENT_VERSION);
- return 0;
- }
-
// Run the appropriate interface
if ((strstr(_strlwr(pszCmdLineA), "wizard") != 0))
RunWizard();
@$(DESTDIR)\bin\sgml2rtf -1252 es_ES.ide
@$(DESTDIR)\bin\sgml2rtf -1252 de_DE.ide
+clean ::
+ $(DEL) *.rtf
#include <afsconfig.h>
#include "../afs/param.h"
-RCSID("$Header: /tmp/cvstemp/openafs/src/afs/VNOPS/afs_vnop_write.c,v 1.1.1.7 2001/09/11 14:25:15 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/afs/VNOPS/afs_vnop_write.c,v 1.1.1.8 2001/09/20 06:07:36 hartmans Exp $");
#include "../afs/sysincludes.h" /* Standard vendor system headers */
#include "../afs/afsincludes.h" /* Afs-based standard headers */
return (EFBIG);
}
#endif
-#if (!defined(AFS_VM_RDWR_ENV)||defined(AFS_LINUX20_ENV))
+#ifdef AFS_VM_RDWR_ENV
/*
* If write is implemented via VM, afs_FakeOpen() is called from the
* high-level write op.
if (filePos > avc->m.Length)
avc->m.Length = filePos;
#endif
-#if (!defined(AFS_VM_RDWR_ENV)||defined(AFS_LINUX20_ENV))
+#ifndef AFS_VM_RDWR_ENV
/*
* If write is implemented via VM, afs_DoPartialWrite() is called from
* the high-level write op.
#include <afsconfig.h>
#include "../afs/param.h"
-RCSID("$Header: /tmp/cvstemp/openafs/src/afs/afs_analyze.c,v 1.1.1.6 2001/07/14 22:19:06 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/afs/afs_analyze.c,v 1.1.1.7 2001/09/20 06:07:11 hartmans Exp $");
#include "../afs/stds.h"
#include "../afs/sysincludes.h" /* Standard vendor system headers */
/* shouldn't do it this way, but for now will do */
-#ifndef ERROR_TABLE_BASE_u
-#define ERROR_TABLE_BASE_u (5376L)
+#ifndef ERROR_TABLE_BASE_U
+#define ERROR_TABLE_BASE_U (5376L)
#endif /* ubik error base define */
/* same hack for vlserver error base as for ubik error base */
-#ifndef ERROR_TABLE_BASE_vl
-#define ERROR_TABLE_BASE_vl (363520L)
+#ifndef ERROR_TABLE_BASE_VL
+#define ERROR_TABLE_BASE_VL (363520L)
#define VL_NOENT (363524L)
#endif /* vlserver error base define */
shouldRetry = 1;
acode = 0;
}
- else if (acode == VICETOKENDEAD || (acode & ~0xff) == ERROR_TABLE_BASE_rxk) {
+ else if (acode == VICETOKENDEAD || (acode & ~0xff) == ERROR_TABLE_BASE_RXK) {
/* any rxkad error is treated as token expiration */
struct unixuser *tu;
shouldRetry = 0;
}
/* check for ubik errors; treat them like crashed servers */
- else if (acode >= ERROR_TABLE_BASE_u && acode < ERROR_TABLE_BASE_u+255) {
+ else if (acode >= ERROR_TABLE_BASE_U && acode < ERROR_TABLE_BASE_U+255) {
afs_ServerDown(sa);
if (aerrP)
(aerrP->err_Server)++;
}
}
}
- else if (acode >= ERROR_TABLE_BASE_vl
- && acode <= ERROR_TABLE_BASE_vl + 255) /* vlserver errors */ {
+ else if (acode >= ERROR_TABLE_BASE_VL
+ && acode <= ERROR_TABLE_BASE_VL + 255) /* vlserver errors */ {
shouldRetry = 0;
areq->volumeError = VOLMISSING;
}
#include <afsconfig.h>
#include "../afs/param.h"
-RCSID("$Header: /tmp/cvstemp/openafs/src/afs/afs_callback.c,v 1.3 2001/09/20 06:04:37 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/afs/afs_callback.c,v 1.1.1.6 2001/09/20 06:07:11 hartmans Exp $");
#include "../afs/sysincludes.h" /*Standard vendor system headers*/
#include "../afs/afsincludes.h" /*AFS-based standard headers*/
t_name[i] = '\0';
if (p_name)
- bcopy(p_name, t_name, i);
+ memcpy(t_name, p_name, i);
ReleaseReadLock(&afs_xcell);
t_name[plen] = '\0';
if (p_name)
- bcopy(p_name, t_name, plen);
+ memcpy(t_name, p_name, plen);
ReleaseReadLock(&afs_xcell);
# License. For details, see the LICENSE file in the top-level source
# directory or online at http://www.openafs.org/dl/license10.html
-error_table 2 zcm
+error_table 2 ZCM
ec CM_TRACE_NULL, "dummy"
ec CM_TRACE_PAGEIN, "getapage vp 0x%lx off 0x%x len 0x%x rw=0x%x"
ec CM_TRACE_PAGEINDONE, "getapage done code 0x%x pg 0x%lx (0x%x)"
#include <afsconfig.h>
#include "../afs/param.h"
-RCSID("$Header: /tmp/cvstemp/openafs/src/afs/afs_volume.c,v 1.1.1.6 2001/09/11 14:24:48 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/afs/afs_volume.c,v 1.1.1.7 2001/09/20 06:07:16 hartmans Exp $");
#include "../afs/stds.h"
#include "../afs/sysincludes.h" /* Standard vendor system headers */
extern int afs_totalSrvAddrs;
/* In case we don't have the vl error table yet. */
-#ifndef ERROR_TABLE_BASE_vl
-#define ERROR_TABLE_BASE_vl (363520L)
-#define VL_NOENT (363524L)
+#ifndef ERROR_TABLE_BASE_VL
+#define ERROR_TABLE_BASE_VL (363520L)
+#define VL_NOENT (363524L)
#endif /* vlserver error base define */
-
/* Exported variables */
ino_t volumeInode; /*Inode for VolumeItems file*/
afs_rwlock_t afs_xvolume; /* allocation lock for volumes */
#ifndef __AFS_SYSINCLUDESH__
#define __AFS_SYSINCLUDESH__ 1
+#ifdef AFS_OBSD_ENV
+#include <sys/errno.h>
+#include <sys/types.h>
+#include <sys/param.h>
+#include <sys/lock.h>
+#include <sys/queue.h>
+#include <sys/resourcevar.h>
+#include <sys/kernel.h>
+#include <sys/proc.h>
+#include <sys/systm.h>
+#include <sys/time.h>
+#include <sys/filedesc.h>
+#include <sys/file.h>
+#include <sys/socket.h>
+#include <sys/socketvar.h>
+#include <sys/dirent.h>
+#include <sys/user.h>
+#include <sys/uio.h>
+#include <sys/buf.h>
+#include <sys/stat.h>
+#include <sys/mount.h>
+#include <sys/vnode.h>
+#include <sys/malloc.h>
+#include <ufs/ffs/fs.h>
+#include <ufs/ufs/quota.h>
+#include <ufs/ufs/inode.h>
+#include <ufs/ufs/ufsmount.h>
+#include <sys/mbuf.h>
+#include <sys/protosw.h>
+#include <sys/ioctl.h>
+#include <vm/vm_kern.h>
+#include <rpc/rpc.h>
+#else /* AFS_OBSD_ENV */
#ifdef AFS_LINUX22_ENV
#include <linux/version.h>
#include <linux/config.h>
#endif /* AFS_OSF_ENV */
#endif /* AFS_LINUX22_ENV */
+#endif /* AFS_OBSD_ENV */
#endif /* __AFS_SYSINCLUDESH__ so idempotent */
${INSTALLex} -f afs.rc.linux ${DEST}/root.client/usr/vice/etc/afs.rc; \
${INSTALL} -f afs.conf.linux ${DEST}/root.client/usr/vice/etc/afs.conf ;; \
ppc_darwin*) \
- mkdir -p ${DEST}/root.client/usr/vice/etc/afs.kext/Contents/MacOS ;\
- ${INSTALL} -f afs.${SYS_NAME}.plist ${DEST}/root.client/usr/vice/etc/afs.kext/Contents/Info.plist ; \
${INSTALLex} -f afs.rc.darwin ${DEST}/root.client/usr/vice/etc/afs.rc ; \
${INSTALL} -f afs.rc.darwin.plist ${DEST}/root.client/usr/vice/etc/StartupParameters.plist ;; \
*fbsd*) \
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/afsd/afsd.c,v 1.1.1.9 2001/09/11 14:30:47 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/afsd/afsd.c,v 1.1.1.10 2001/09/20 06:12:14 hartmans Exp $");
#define VFS 1
#if AFS_HAVE_STATVFS
#include <sys/statvfs.h>
#else
-#if !defined(AFS_OSF_ENV) && !defined(AFS_DARWIN_ENV) && !defined(AFS_FBSD_ENV)
+#if !defined(AFS_OSF_ENV) && !defined(AFS_DARWIN_ENV) && !defined(AFS_XBSD_ENV)
#include <sys/statfs.h>
#endif
#endif
clean::
$(DEL) acfg_errors.c ktc_errors.c
$(DEL) $(INCFILEDIR)\auth.h $(INCFILEDIR)\cellconfig.h
-
+ $(DEL) auth.h cellconfig.h
setkey: $(SETKEY_EXEFILE)
+
# AFS Configuration Package error table
-error_table acfg
+error_table ACFG
ec AFSCONF_FAILURE, "mysterious failure"
ec AFSCONF_NOTFOUND, "could not find entry"
ec AFSCONF_UNKNOWN, "do not know that information"
#include <afs/param.h>
#endif
-RCSID("$Header: /tmp/cvstemp/openafs/src/auth/authcon.c,v 1.1.1.5 2001/07/14 22:20:39 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/auth/authcon.c,v 1.1.1.6 2001/09/20 06:12:37 hartmans Exp $");
#if defined(UKERNEL)
#include "../afs/sysincludes.h"
struct rx_securityClass *tclass;
afs_int32 kvno;
afs_int32 ticketLen;
- struct timeval tv;
- Key_schedule schedule;
- register afs_int32 i, code;
+ register afs_int32 code;
/* first, find the right key and kvno to use */
code = afsconf_GetLatestKey(adir, &kvno, &key);
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/auth/cellconfig.c,v 1.1.1.9 2001/09/11 14:31:21 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/auth/cellconfig.c,v 1.1.1.10 2001/09/20 06:12:38 hartmans Exp $");
#include <afs/stds.h>
#include <afs/pthread_glock.h>
static afsconf_Touch(adir)
register struct afsconf_dir *adir; {
char tbuffer[256];
+#ifndef AFS_NT40_ENV
struct timeval tvp[2];
+#endif
+
+ adir->timeRead = 0; /* just in case */
#ifdef AFS_NT40_ENV
/* NT client CellServDB has different file name than NT server or Unix */
+
if (IsClientConfigDirectory(adir->name)) {
strcompose(tbuffer, 256,
adir->name, "/", AFSDIR_CELLSERVDB_FILE_NTCLIENT, NULL);
strcompose(tbuffer, 256,
adir->name, "/", AFSDIR_CELLSERVDB_FILE, NULL);
}
-#else
- strcompose(tbuffer, 256, adir->name, "/", AFSDIR_CELLSERVDB_FILE, NULL);
-#endif /* AFS_NT40_ENV */
- adir->timeRead = 0; /* just in case */
-#ifdef AFS_NT40_ENV
return _utime(tbuffer, NULL);
+
#else
+ strcompose(tbuffer, 256, adir->name, "/", AFSDIR_CELLSERVDB_FILE, NULL);
gettimeofday(&tvp[0], NULL);
tvp[1] = tvp[0];
return utimes(tbuffer, tvp);
/* The "AFSCONF" environment (or contents of "/.AFSCONF") will be typically set to something like "/afs/<cell>/common/etc" where, by convention, the default files for "ThisCell" and "CellServDB" will reside; note that a major drawback is that a given afs client on that cell may NOT contain the same contents... */
char *home_dir;
FILE *fp;
- int len;
+ size_t len;
if (!(home_dir = getenv("HOME"))) {
/* Our last chance is the "/.AFSCONF" file */
struct afsconf_cell *acellInfo;
{
afs_int32 code;
- int tservice, len, i;
+ int tservice, i;
+ size_t len;
unsigned char answer[1024];
unsigned char *p;
char host[256];
register afs_int32 i;
int tservice;
char *tcell;
- int cnLen, ambig;
+ size_t cnLen;
+ int ambig;
char tbuffer[64];
LOCK_GLOBAL_MUTEX
# Kerberos Ticket Cache error table
-error_table ktc
+error_table KTC
ec KTC_ERROR, "an unexpected error was encountered"
ec KTC_TOOBIG, "a buffer was too small for the response"
ec KTC_INVAL, "an invalid argument was passed in"
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/auth/userok.c,v 1.1.1.5 2001/07/14 22:20:41 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/auth/userok.c,v 1.1.1.6 2001/09/20 06:12:39 hartmans Exp $");
#include <afs/stds.h>
#include <afs/pthread_glock.h>
char tbuffer[256];
register bufio_p bp;
char tname[64];
- register char *tp;
register int flag;
register afs_int32 code;
int rc;
# Local clean target; augments predefined clean target
clean::
+ $(DEL) bnode.h boserr.c bosint.cs.c bosint.h bosint.ss.c bosint.xdr.c
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/bozo/bos.c,v 1.1.1.7 2001/09/11 14:31:25 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/bozo/bos.c,v 1.1.1.8 2001/09/20 06:12:42 hartmans Exp $");
#include <afs/stds.h>
#include <stdlib.h>
printf("\n");
}
}
+ return 0;
}
static UnInstall(as)
afsconf_SawCell = 0; /* Reset it */
/* don't check error code, since fails sometimes when we're setting up a
* system */
- initialize_cmd_error_table();
- initialize_bz_error_table();
+ initialize_CMD_error_table();
+ initialize_BZ_error_table();
ts = cmd_CreateSyntax("start", StartServer, 0, "start running a server");
cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
# NOTE: BZACCESS value is hardcoded in audit/audit.h, so if you make
# changes here, make sure that audit/audit.h is kept up to date.
-error_table bz
+error_table BZ
ec BZNOTACTIVE, "process not active"
ec BZNOENT, "no such entity"
ec BZBUSY, "can't do operation now"
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/bozo/bosoprocs.c,v 1.1.1.6 2001/09/11 14:31:26 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/bozo/bosoprocs.c,v 1.1.1.7 2001/09/20 06:12:43 hartmans Exp $");
#include <afs/stds.h>
#include <sys/types.h>
struct rx_call *acall;
char *aname;
afs_int32 *atime, *abakTime, *aoldTime; {
- register afs_int32 code;
struct stat tstat;
char *strp;
char tbuffer[AFSDIR_PATH_MAX];
bozo_bosEntryStats[7].path = AFSDIR_SERVER_KEY_FILEPATH;
bozo_bosEntryStats[8].path = AFSDIR_SERVER_ULIST_FILEPATH;
+ return 0;
}
/* StatEachEntry - If it's not there, it is okay. If anything else goes wrong
* complain. Otherwise check permissions: shouldn't allow write or (usually)
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/bozo/bosserver.c,v 1.1.1.8 2001/09/11 14:31:27 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/bozo/bosserver.c,v 1.1.1.9 2001/09/20 06:12:44 hartmans Exp $");
#include <afs/stds.h>
#include <sys/types.h>
extern int RXSTATS_ExecuteRequest();
extern int afsconf_GetKey();
extern struct bnode_ops fsbnode_ops, ezbnode_ops, cronbnode_ops;
+
+void bozo_Log();
+
struct afsconf_dir *bozo_confdir = 0; /* bozo configuration dir */
static char *bozo_pid;
struct rx_securityClass *bozo_rxsc[3];
int noAuth = 0;
struct ktc_encryptionKey tkey;
int i;
- pid_t newSessionID;
char namebuf[AFSDIR_PATH_MAX];
#ifdef AFS_AIX32_ENV
rx_StartServer(1); /* donate this process */
}
+void
bozo_Log(a,b,c,d,e,f)
char *a, *b, *c, *d, *e, *f; {
char tdate[26];
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/bozo/cronbnodeops.c,v 1.1.1.5 2001/09/11 14:31:27 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/bozo/cronbnodeops.c,v 1.1.1.6 2001/09/20 06:12:45 hartmans Exp $");
#include <sys/types.h>
#include <sys/stat.h>
if (temp < 1) temp = 1; /* temp is when to start dude */
bnode_SetTimeout(abnode, temp);
}
+ return 0;
}
static int cron_restartp (abnode)
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/bozo/fsbnodeops.c,v 1.1.1.6 2001/09/11 14:31:28 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/bozo/fsbnodeops.c,v 1.1.1.7 2001/09/20 06:12:45 hartmans Exp $");
#include <sys/types.h>
#include <lwp.h>
}
}
SetNeedsClock(abnode);
+ return 0;
}
static int fs_getstat(abnode, astatus)
# Backup Tape Coordinator Module error table
-error_table butc
+error_table BUTC
# dump/restore management
ec TC_DUMPERROR, "error in dump/restore process "
ec TC_FORCEDABORT, "ungraceful abort "
# Backup Tape Module error table
-error_table butm
+error_table BUTM
ec BUTM_OLDINTERFACE, "interface incompatible"
ec BUTM_NOMOUNT, "there is not an opened tape"
ec BUTM_PARALLELMOUNTS, "multiple simultaneous opens not permitted"
# Backup BUTX error table
#
-error_table butx
+error_table BUTX
ec BUTX_RCSID, "Version 1"
ec BUTX_NOLIBRARY, "XBSA couldn't mount shared library"
ec BUTX_ILLEGALINIT, "XBSA handle already initialized"
# Local clean target; augments predefined clean target
clean::
+ $(DEL) bc.h bucoord_errs.c
# Backup Coordinator Module error table
-error_table bucd
+error_table BUCD
ec BC_BADARG, "Unacceptable user supplied argument"
ec BC_VERSIONMISMATCH, "Object has been updated"
ec BC_NOTUNIQUE, "Search matched more than one item"
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/bucoord/main.c,v 1.1.1.6 2001/09/11 14:31:36 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/bucoord/main.c,v 1.1.1.7 2001/09/20 06:12:50 hartmans Exp $");
#include <afs/stds.h>
#include <sys/types.h>
*/
void InitErrTabs()
{
- initialize_acfg_error_table();
- initialize_ka_error_table();
- initialize_rxk_error_table();
- initialize_cmd_error_table();
- initialize_vl_error_table();
- initialize_butm_error_table();
- initialize_vols_error_table();
- initialize_butc_error_table();
- initialize_butx_error_table();
- initialize_budb_error_table();
- initialize_bucd_error_table();
- initialize_ktc_error_table();
+ initialize_ACFG_error_table();
+ initialize_KA_error_table();
+ initialize_RXK_error_table();
+ initialize_CMD_error_table();
+ initialize_VL_error_table();
+ initialize_BUTM_error_table();
+ initialize_VOLS_error_table();
+ initialize_BUTC_error_table();
+ initialize_BUTX_error_table();
+ initialize_BUDB_error_table();
+ initialize_BUCD_error_table();
+ initialize_KTC_error_table();
}
/*
extern statusWatcher();
/* Initialization */
- initialize_cmd_error_table();
+ initialize_CMD_error_table();
/* don't run more than once */
if (initd)
clean::
$(DEL) budb_errs.c budb_errs.h budb.h budb_client.h
-
-
+ $(DEL) budb.cs.c budb.ss.c budb.xdr.c
# NOTE: BUDB_NOTPERMITTED value is hardcoded in audit/audit.h, so if you
# make changes here, make sure that audit/audit.h is kept up to date.
-error_table budb
+error_table BUDB
#useful errors
ec BUDB_DUMPIDEXISTS, "dump with specified id already exists"
ec BUDB_NODUMPID, "no dump matching the id was found"
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/budb/server.c,v 1.1.1.5 2001/09/11 14:31:45 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/budb/server.c,v 1.1.1.6 2001/09/20 06:12:55 hartmans Exp $");
#ifdef AFS_NT40_ENV
#include <winsock2.h>
#endif
osi_audit(BUDB_StartEvent, 0, AUD_END);
- initialize_budb_error_table();
+ initialize_BUDB_error_table();
initializeArgHandler();
/* Initialize dirpaths */
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/butc/tcmain.c,v 1.1.1.5 2001/09/11 14:31:51 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/butc/tcmain.c,v 1.1.1.6 2001/09/20 06:12:57 hartmans Exp $");
#include <sys/types.h>
#include <sys/stat.h>
debugLevel = 0;
/*initialize the error tables */
- initialize_ka_error_table();
- initialize_rxk_error_table();
- initialize_ktc_error_table();
- initialize_acfg_error_table();
- initialize_cmd_error_table();
- initialize_vl_error_table();
- initialize_butm_error_table();
- initialize_butc_error_table();
+ initialize_KA_error_table();
+ initialize_RXK_error_table();
+ initialize_KTC_error_table();
+ initialize_ACFG_error_table();
+ initialize_CMD_error_table();
+ initialize_VL_error_table();
+ initialize_BUTM_error_table();
+ initialize_BUTC_error_table();
#ifdef xbsa
- initialize_butx_error_table();
+ initialize_BUTX_error_table();
#endif /*xbs*/
- initialize_vols_error_table();
- initialize_budb_error_table();
- initialize_bucd_error_table();
+ initialize_VOLS_error_table();
+ initialize_BUDB_error_table();
+ initialize_BUCD_error_table();
if (as->parms[0].items)
{
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/butm/butm_test.c,v 1.1.1.5 2001/09/11 14:31:56 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/butm/butm_test.c,v 1.1.1.6 2001/09/20 06:12:58 hartmans Exp $");
#include <sys/types.h>
#include <sys/file.h>
/* -------------
* General Setup
* ------------- */
- initialize_butm_error_table();
+ initialize_BUTM_error_table();
tapeInfo.structVersion = BUTM_MAJORVERSION;
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/butm/test_ftm.c,v 1.1.1.5 2001/09/11 14:31:57 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/butm/test_ftm.c,v 1.1.1.6 2001/09/20 06:13:00 hartmans Exp $");
#include <sys/types.h>
#include <fcntl.h>
TestInfo ti;
whoami = argv[0];
- initialize_butm_error_table();
+ initialize_BUTM_error_table();
if (argc < 2)
goto usage;
install9x: install
clean::
- $(DEL) cmd_errors.c
+ $(DEL) cmd_errors.c cmd.h
$(DEL) $(LIBFILE)
test tests:
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/cmd/cmd.c,v 1.1.1.6 2001/07/14 22:21:11 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/cmd/cmd.c,v 1.1.1.7 2001/09/20 06:13:01 hartmans Exp $");
#include <sys/types.h>
#include <ctype.h>
register struct cmd_syndesc *as;
register char *aname; {
register int i;
- int cmdlen;
+ size_t cmdlen;
int ambig;
int best;
char *aname; {
register struct cmd_syndesc *ts;
struct cmd_syndesc *best;
- int cmdLen;
+ size_t cmdLen;
int ambig;
cmdLen = strlen(aname);
register struct cmd_syndesc *as; {
register int i;
register struct cmd_parmdesc *tp;
- int flag_width;
+ size_t flag_width;
char *flag_prefix;
/* find flag name length */
# */
-error_table cmd
+error_table CMD
ec CMD_EXCESSPARMS, "More than the maximum number of parameters defined"
ec CMD_INTERNALERROR, "Internal parsing error"
ec CMD_NOTLIST, "Too many values specified after a CMD_SINGLE switch"
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/cmd/test/itest.c,v 1.1.1.4 2001/07/14 22:21:12 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/cmd/test/itest.c,v 1.1.1.5 2001/09/20 06:13:02 hartmans Exp $");
#include "cmd.h"
#include <stdio.h>
long code;
char *tv[100];
- initialize_cmd_error_table();
+ initialize_CMD_error_table();
ts = cmd_CreateSyntax("apple", cproc1, (char *) 0, "describe apple");
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/comerr/compile_et.c,v 1.1.1.4 2001/07/14 22:21:12 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/comerr/compile_et.c,v 1.1.1.5 2001/09/20 06:13:03 hartmans Exp $");
#include <stdio.h>
#include <stdlib.h>
char const * const *cpp;
int got_language = 0;
char *got_include = 0;
+ char lcname[6];
#ifdef AFS_AIX32_ENV
/*
table_name, table_name);
fprintf (hfile, "#define %s_err_base ERROR_TABLE_BASE_%s\n", table_name,
table_name);
+ fprintf (hfile, "\n/* for compatibility with other users... */\n");
+ lcstring (lcname, table_name, sizeof(lcname));
+ fprintf (hfile, "#define ERROR_TABLE_BASE_%s (%ldL)\n",
+ lcname, (long int) table_number);
+ fprintf (hfile, "#define init_%s_err_tbl initialize_%s_error_table\n",
+ lcname, lcname);
+ fprintf (hfile, "#define %s_err_base ERROR_TABLE_BASE_%s\n", lcname,
+ lcname);
fclose(hfile); /* bye bye include file */
if (use_msf)
fclose(msfile);
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/comerr/error_table.y,v 1.1.1.4 2001/07/14 22:21:14 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/comerr/error_table.y,v 1.1.1.5 2001/09/20 06:13:04 hartmans Exp $");
/*
*
}
void set_table_num(char *string)
-{ char ucname[6]; /* I think 5 is enough but et_name.c used 6... */
- extern char *ucstring();
-
+{
if (msfile) {
set_table_1num(string);
return;
string[4] = '\0';
fprintf(stderr, "to %s\n", string);
}
- string = ucstring (ucname, string, sizeof(ucname));
if (char_to_num (string[0]) > char_to_num ('z')) {
fprintf (stderr, "%s%s%s%s",
"First character of error table name must be ",
-\r
-/* A Bison parser, made from error_table.y with Bison version GNU Bison version 1.24\r
- */\r
-\r
-#define YYBISON 1 /* Identify Bison output. */\r
-\r
-#define ERROR_TABLE 258\r
-#define ERROR_CODE_ENTRY 259\r
-#define END 260\r
-#define STRING 261\r
-#define QUOTED_STRING 262\r
-\r
-#line 1 "error_table.y"\r
-\r
+
+/* A Bison parser, made from error_table.y with Bison version GNU Bison version 1.24
+ */
+
+#define YYBISON 1 /* Identify Bison output. */
+
+#define ERROR_TABLE 258
+#define ERROR_CODE_ENTRY 259
+#define END 260
+#define STRING 261
+#define QUOTED_STRING 262
+
+#line 1 "error_table.y"
+
#include <afsconfig.h>
-#include <afs/param.h>\r
-\r
-RCSID("$Header: /tmp/cvstemp/openafs/src/comerr/error_table_nt.c,v 1.1.1.3 2001/07/14 22:21:14 hartmans Exp $");\r
-\r
-\r
-/*\r
- * If __STDC__ is defined, function prototypes in the SunOS 5.5.1 lex\r
- * and yacc templates are visible. We turn this on explicitly on\r
- * NT because the prototypes help supress certain warning from the\r
- * Microsoft C compiler.\r
- */\r
-\r
-#ifdef AFS_NT40_ENV\r
-#include <malloc.h>\r
-# ifndef __STDC__\r
-# define __STDC__ 1\r
-# endif\r
-#endif\r
-\r
-#include <stdio.h>\r
-#include <stdlib.h>\r
-#include <string.h>\r
-\r
-#include "internal.h"\r
-\r
-char *current_token = (char *)NULL;\r
-extern char *table_name;\r
-\r
-char *ds(const char *string);\r
-char *quote(const char *string);\r
-void set_table_1num(char *string);\r
-int char_to_1num(char c);\r
-void add_ec(const char *name, const char *description);\r
-void add_ec_val(const char *name, const char *val, const char *description);\r
-void put_ecs(void);\r
-void set_table_num(char *string);\r
-void set_table_fun(char *astring);\r
-\r
-\r
-#line 38 "error_table.y"\r
-typedef union {\r
- char *dynstr;\r
-} YYSTYPE;\r
-#line 45 "error_table.y"\r
-\r
-\r
-#ifndef YYLTYPE\r
-typedef\r
- struct yyltype\r
- {\r
- int timestamp;\r
- int first_line;\r
- int first_column;\r
- int last_line;\r
- int last_column;\r
- char *text;\r
- }\r
- yyltype;\r
-\r
-#define YYLTYPE yyltype\r
-#endif\r
-\r
-#include <stdio.h>\r
-\r
-#ifndef __cplusplus\r
-#ifndef __STDC__\r
-#define const\r
-#endif\r
-#endif\r
-\r
-\r
-\r
-#define YYFINAL 24\r
-#define YYFLAG -32768\r
-#define YYNTBASE 10\r
-\r
-#define YYTRANSLATE(x) ((unsigned)(x) <= 262 ? yytranslate[x] : 18)\r
-\r
-static const char yytranslate[] = { 0,\r
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\r
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\r
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\r
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\r
- 2, 2, 2, 8, 2, 2, 2, 2, 2, 2,\r
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\r
- 9, 2, 2, 2, 2, 2, 2, 2, 2, 2,\r
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\r
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\r
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\r
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\r
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\r
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\r
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\r
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\r
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\r
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\r
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\r
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\r
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\r
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\r
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\r
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\r
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\r
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\r
- 2, 2, 2, 2, 2, 1, 2, 3, 4, 5,\r
- 6, 7\r
-};\r
-\r
-#if YYDEBUG != 0\r
-static const short yyprhs[] = { 0,\r
- 0, 5, 8, 10, 12, 14, 17, 19, 24, 31,\r
- 33\r
-};\r
-\r
-static const short yyrhs[] = { 3,\r
- 11, 14, 5, 0, 12, 13, 0, 13, 0, 6,\r
- 0, 6, 0, 14, 15, 0, 15, 0, 4, 16,\r
- 8, 17, 0, 4, 16, 9, 6, 8, 17, 0,\r
- 6, 0, 7, 0\r
-};\r
-\r
-#endif\r
-\r
-#if YYDEBUG != 0\r
-static const short yyrline[] = { 0,\r
- 50, 56, 59, 66, 73, 79, 80, 83, 87, 95,\r
- 100\r
-};\r
-\r
-static const char * const yytname[] = { "$","error","$undefined.","ERROR_TABLE",\r
-"ERROR_CODE_ENTRY","END","STRING","QUOTED_STRING","','","'='","error_table",\r
-"header","table_fun","table_id","error_codes","ec_entry","ec_name","description",\r
-""\r
-};\r
-#endif\r
-\r
-static const short yyr1[] = { 0,\r
- 10, 11, 11, 12, 13, 14, 14, 15, 15, 16,\r
- 17\r
-};\r
-\r
-static const short yyr2[] = { 0,\r
- 4, 2, 1, 1, 1, 2, 1, 4, 6, 1,\r
- 1\r
-};\r
-\r
-static const short yydefact[] = { 0,\r
- 0, 4, 0, 0, 3, 0, 0, 7, 5, 2,\r
- 10, 0, 1, 6, 0, 0, 11, 8, 0, 0,\r
- 9, 0, 0, 0\r
-};\r
-\r
-static const short yydefgoto[] = { 22,\r
- 3, 4, 5, 7, 8, 12, 18\r
-};\r
-\r
-static const short yypact[] = { 1,\r
- -1, 2, 3, 4,-32768, 5, -4,-32768,-32768,-32768,\r
--32768, -6,-32768,-32768, 6, 8,-32768,-32768, 0, 6,\r
--32768, 9, 12,-32768\r
-};\r
-\r
-static const short yypgoto[] = {-32768,\r
--32768,-32768, 11,-32768, 10,-32768, -2\r
-};\r
-\r
-\r
-#define YYLAST 18\r
-\r
-\r
-static const short yytable[] = { 6,\r
- 13, 15, 16, 1, 2, -5, 6, 20, 23, 9,\r
- 11, 24, 17, 19, 10, 0, 14, 21\r
-};\r
-\r
-static const short yycheck[] = { 4,\r
- 5, 8, 9, 3, 6, 4, 4, 8, 0, 6,\r
- 6, 0, 7, 6, 4, -1, 7, 20\r
-};\r
-/* -*-C-*- Note some compilers choke on comments on `#line' lines. */\r\r
-#line 3 "bison.simple"\r\r
-\r\r
-/* Skeleton output parser for bison,\r\r
- Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.\r\r
-\r\r
- This program is free software; you can redistribute it and/or modify\r\r
- it under the terms of the GNU General Public License as published by\r\r
- the Free Software Foundation; either version 2, or (at your option)\r\r
- any later version.\r\r
-\r\r
- This program is distributed in the hope that it will be useful,\r\r
- but WITHOUT ANY WARRANTY; without even the implied warranty of\r\r
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r\r
- GNU General Public License for more details.\r\r
-\r\r
- You should have received a copy of the GNU General Public License\r\r
- along with this program; if not, write to the Free Software\r\r
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */\r\r
-\r\r
-/* As a special exception, when this file is copied by Bison into a\r\r
- Bison output file, you may use that output file without restriction.\r\r
- This special exception was added by the Free Software Foundation\r\r
- in version 1.24 of Bison. */\r\r
-\r\r
-#ifndef alloca\r\r
-#ifdef __GNUC__\r\r
-#define alloca __builtin_alloca\r\r
-#else /* not GNU C. */\r\r
-#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi)\r\r
-#include <alloca.h>\r\r
-#else /* not sparc */\r\r
-#if defined (MSDOS) && !defined (__TURBOC__)\r\r
-#include <malloc.h>\r\r
-#else /* not MSDOS, or __TURBOC__ */\r\r
-#if defined(_AIX)\r\r
-#include <malloc.h>\r\r
- #pragma alloca\r\r
-#else /* not MSDOS, __TURBOC__, or _AIX */\r\r
-#ifdef __hpux\r\r
-#ifdef __cplusplus\r\r
-extern "C" {\r\r
-void *alloca (unsigned int);\r\r
-};\r\r
-#else /* not __cplusplus */\r\r
-void *alloca ();\r\r
-#endif /* not __cplusplus */\r\r
-#endif /* __hpux */\r\r
-#endif /* not _AIX */\r\r
-#endif /* not MSDOS, or __TURBOC__ */\r\r
-#endif /* not sparc. */\r\r
-#endif /* not GNU C. */\r\r
-#endif /* alloca not defined. */\r\r
-\r\r
-/* This is the parser code that is written into each bison parser\r\r
- when the %semantic_parser declaration is not specified in the grammar.\r\r
- It was written by Richard Stallman by simplifying the hairy parser\r\r
- used when %semantic_parser is specified. */\r\r
-\r\r
-/* Note: there must be only one dollar sign in this file.\r\r
- It is replaced by the list of actions, each action\r\r
- as one case of the switch. */\r\r
-\r\r
-#define yyerrok (yyerrstatus = 0)\r\r
-#define yyclearin (yychar = YYEMPTY)\r\r
-#define YYEMPTY -2\r\r
-#define YYEOF 0\r\r
-#define YYACCEPT return(0)\r\r
-#define YYABORT return(1)\r\r
-#define YYERROR goto yyerrlab1\r\r
-/* Like YYERROR except do call yyerror.\r\r
- This remains here temporarily to ease the\r\r
- transition to the new meaning of YYERROR, for GCC.\r\r
- Once GCC version 2 has supplanted version 1, this can go. */\r\r
-#define YYFAIL goto yyerrlab\r\r
-#define YYRECOVERING() (!!yyerrstatus)\r\r
-#define YYBACKUP(token, value) \\r\r
-do \\r\r
- if (yychar == YYEMPTY && yylen == 1) \\r\r
- { yychar = (token), yylval = (value); \\r\r
- yychar1 = YYTRANSLATE (yychar); \\r\r
- YYPOPSTACK; \\r\r
- goto yybackup; \\r\r
- } \\r\r
- else \\r\r
- { yyerror ("syntax error: cannot back up"); YYERROR; } \\r\r
-while (0)\r\r
-\r\r
-#define YYTERROR 1\r\r
-#define YYERRCODE 256\r\r
-\r\r
-#ifndef YYPURE\r\r
-#define YYLEX yylex()\r\r
-#endif\r\r
-\r\r
-#ifdef YYPURE\r\r
-#ifdef YYLSP_NEEDED\r\r
-#ifdef YYLEX_PARAM\r\r
-#define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM)\r\r
-#else\r\r
-#define YYLEX yylex(&yylval, &yylloc)\r\r
-#endif\r\r
-#else /* not YYLSP_NEEDED */\r\r
-#ifdef YYLEX_PARAM\r\r
-#define YYLEX yylex(&yylval, YYLEX_PARAM)\r\r
-#else\r\r
-#define YYLEX yylex(&yylval)\r\r
-#endif\r\r
-#endif /* not YYLSP_NEEDED */\r\r
-#endif\r\r
-\r\r
-/* If nonreentrant, generate the variables here */\r\r
-\r\r
-#ifndef YYPURE\r\r
-\r\r
-int yychar; /* the lookahead symbol */\r\r
-YYSTYPE yylval; /* the semantic value of the */\r\r
- /* lookahead symbol */\r\r
-\r\r
-#ifdef YYLSP_NEEDED\r\r
-YYLTYPE yylloc; /* location data for the lookahead */\r\r
- /* symbol */\r\r
-#endif\r\r
-\r\r
-int yynerrs; /* number of parse errors so far */\r\r
-#endif /* not YYPURE */\r\r
-\r\r
-#if YYDEBUG != 0\r\r
-int yydebug; /* nonzero means print parse trace */\r\r
-/* Since this is uninitialized, it does not stop multiple parsers\r\r
- from coexisting. */\r\r
-#endif\r\r
-\r\r
-/* YYINITDEPTH indicates the initial size of the parser's stacks */\r\r
-\r\r
-#ifndef YYINITDEPTH\r\r
-#define YYINITDEPTH 200\r\r
-#endif\r\r
-\r\r
-/* YYMAXDEPTH is the maximum size the stacks can grow to\r\r
- (effective only if the built-in stack extension method is used). */\r\r
-\r\r
-#if YYMAXDEPTH == 0\r\r
-#undef YYMAXDEPTH\r\r
-#endif\r\r
-\r\r
-#ifndef YYMAXDEPTH\r\r
-#define YYMAXDEPTH 10000\r\r
-#endif\r\r
-\r\r
-/* Prevent warning if -Wstrict-prototypes. */\r\r
-#ifdef __GNUC__\r\r
-int yyparse (void);\r\r
-#endif\r\r
-\f\r\r
-#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */\r\r
-#define __yy_memcpy(FROM,TO,COUNT) __builtin_memcpy(TO,FROM,COUNT)\r\r
-#else /* not GNU C or C++ */\r\r
-#ifndef __cplusplus\r\r
-\r\r
-/* This is the most reliable way to avoid incompatibilities\r\r
- in available built-in functions on various systems. */\r\r
-static void\r\r
-__yy_memcpy (from, to, count)\r\r
- char *from;\r\r
- char *to;\r\r
- int count;\r\r
-{\r\r
- register char *f = from;\r\r
- register char *t = to;\r\r
- register int i = count;\r\r
-\r\r
- while (i-- > 0)\r\r
- *t++ = *f++;\r\r
-}\r\r
-\r\r
-#else /* __cplusplus */\r\r
-\r\r
-/* This is the most reliable way to avoid incompatibilities\r\r
- in available built-in functions on various systems. */\r\r
-static void\r\r
-__yy_memcpy (char *from, char *to, int count)\r\r
-{\r\r
- register char *f = from;\r\r
- register char *t = to;\r\r
- register int i = count;\r\r
-\r\r
- while (i-- > 0)\r\r
- *t++ = *f++;\r\r
-}\r\r
-\r\r
-#endif\r\r
-#endif\r\r
-\f\r\r
-#line 192 "bison.simple"\r\r
-\r\r
-/* The user can define YYPARSE_PARAM as the name of an argument to be passed\r\r
- into yyparse. The argument should have type void *.\r\r
- It should actually point to an object.\r\r
- Grammar actions can access the variable by casting it\r\r
- to the proper pointer type. */\r\r
-\r\r
-#ifdef YYPARSE_PARAM\r\r
-#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;\r\r
-#else\r\r
-#define YYPARSE_PARAM\r\r
-#define YYPARSE_PARAM_DECL\r\r
-#endif\r\r
-\r\r
-int\r\r
-yyparse(YYPARSE_PARAM)\r\r
- YYPARSE_PARAM_DECL\r\r
-{\r\r
- register int yystate;\r\r
- register int yyn;\r\r
- register short *yyssp;\r\r
- register YYSTYPE *yyvsp;\r\r
- int yyerrstatus; /* number of tokens to shift before error messages enabled */\r\r
- int yychar1 = 0; /* lookahead token as an internal (translated) token number */\r\r
-\r\r
- short yyssa[YYINITDEPTH]; /* the state stack */\r\r
- YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */\r\r
-\r\r
- short *yyss = yyssa; /* refer to the stacks thru separate pointers */\r\r
- YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */\r\r
-\r\r
-#ifdef YYLSP_NEEDED\r\r
- YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */\r\r
- YYLTYPE *yyls = yylsa;\r\r
- YYLTYPE *yylsp;\r\r
-\r\r
-#define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)\r\r
-#else\r\r
-#define YYPOPSTACK (yyvsp--, yyssp--)\r\r
-#endif\r\r
-\r\r
- int yystacksize = YYINITDEPTH;\r\r
-\r\r
-#ifdef YYPURE\r\r
- int yychar;\r\r
- YYSTYPE yylval;\r\r
- int yynerrs;\r\r
-#ifdef YYLSP_NEEDED\r\r
- YYLTYPE yylloc;\r\r
-#endif\r\r
-#endif\r\r
-\r\r
- YYSTYPE yyval; /* the variable used to return */\r\r
- /* semantic values from the action */\r\r
- /* routines */\r\r
-\r\r
- int yylen;\r\r
-\r\r
-#if YYDEBUG != 0\r\r
- if (yydebug)\r\r
- fprintf(stderr, "Starting parse\n");\r\r
-#endif\r\r
-\r\r
- yystate = 0;\r\r
- yyerrstatus = 0;\r\r
- yynerrs = 0;\r\r
- yychar = YYEMPTY; /* Cause a token to be read. */\r\r
-\r\r
- /* Initialize stack pointers.\r\r
- Waste one element of value and location stack\r\r
- so that they stay on the same level as the state stack.\r\r
- The wasted elements are never initialized. */\r\r
-\r\r
- yyssp = yyss - 1;\r\r
- yyvsp = yyvs;\r\r
-#ifdef YYLSP_NEEDED\r\r
- yylsp = yyls;\r\r
-#endif\r\r
-\r\r
-/* Push a new state, which is found in yystate . */\r\r
-/* In all cases, when you get here, the value and location stacks\r\r
- have just been pushed. so pushing a state here evens the stacks. */\r\r
-yynewstate:\r\r
-\r\r
- *++yyssp = yystate;\r\r
-\r\r
- if (yyssp >= yyss + yystacksize - 1)\r\r
- {\r\r
- /* Give user a chance to reallocate the stack */\r\r
- /* Use copies of these so that the &'s don't force the real ones into memory. */\r\r
- YYSTYPE *yyvs1 = yyvs;\r\r
- short *yyss1 = yyss;\r\r
-#ifdef YYLSP_NEEDED\r\r
- YYLTYPE *yyls1 = yyls;\r\r
-#endif\r\r
-\r\r
- /* Get the current used size of the three stacks, in elements. */\r\r
- int size = yyssp - yyss + 1;\r\r
-\r\r
-#ifdef yyoverflow\r\r
- /* Each stack pointer address is followed by the size of\r\r
- the data in use in that stack, in bytes. */\r\r
-#ifdef YYLSP_NEEDED\r\r
- /* This used to be a conditional around just the two extra args,\r\r
- but that might be undefined if yyoverflow is a macro. */\r\r
- yyoverflow("parser stack overflow",\r\r
- &yyss1, size * sizeof (*yyssp),\r\r
- &yyvs1, size * sizeof (*yyvsp),\r\r
- &yyls1, size * sizeof (*yylsp),\r\r
- &yystacksize);\r\r
-#else\r\r
- yyoverflow("parser stack overflow",\r\r
- &yyss1, size * sizeof (*yyssp),\r\r
- &yyvs1, size * sizeof (*yyvsp),\r\r
- &yystacksize);\r\r
-#endif\r\r
-\r\r
- yyss = yyss1; yyvs = yyvs1;\r\r
-#ifdef YYLSP_NEEDED\r\r
- yyls = yyls1;\r\r
-#endif\r\r
-#else /* no yyoverflow */\r\r
- /* Extend the stack our own way. */\r\r
- if (yystacksize >= YYMAXDEPTH)\r\r
- {\r\r
- yyerror("parser stack overflow");\r\r
- return 2;\r\r
- }\r\r
- yystacksize *= 2;\r\r
- if (yystacksize > YYMAXDEPTH)\r\r
- yystacksize = YYMAXDEPTH;\r\r
- yyss = (short *) alloca (yystacksize * sizeof (*yyssp));\r\r
- __yy_memcpy ((char *)yyss1, (char *)yyss, size * sizeof (*yyssp));\r\r
- yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp));\r\r
- __yy_memcpy ((char *)yyvs1, (char *)yyvs, size * sizeof (*yyvsp));\r\r
-#ifdef YYLSP_NEEDED\r\r
- yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp));\r\r
- __yy_memcpy ((char *)yyls1, (char *)yyls, size * sizeof (*yylsp));\r\r
-#endif\r\r
-#endif /* no yyoverflow */\r\r
-\r\r
- yyssp = yyss + size - 1;\r\r
- yyvsp = yyvs + size - 1;\r\r
-#ifdef YYLSP_NEEDED\r\r
- yylsp = yyls + size - 1;\r\r
-#endif\r\r
-\r\r
-#if YYDEBUG != 0\r\r
- if (yydebug)\r\r
- fprintf(stderr, "Stack size increased to %d\n", yystacksize);\r\r
-#endif\r\r
-\r\r
- if (yyssp >= yyss + yystacksize - 1)\r\r
- YYABORT;\r\r
- }\r\r
-\r\r
-#if YYDEBUG != 0\r\r
- if (yydebug)\r\r
- fprintf(stderr, "Entering state %d\n", yystate);\r\r
-#endif\r\r
-\r\r
- goto yybackup;\r\r
- yybackup:\r\r
-\r\r
-/* Do appropriate processing given the current state. */\r\r
-/* Read a lookahead token if we need one and don't already have one. */\r\r
-/* yyresume: */\r\r
-\r\r
- /* First try to decide what to do without reference to lookahead token. */\r\r
-\r\r
- yyn = yypact[yystate];\r\r
- if (yyn == YYFLAG)\r\r
- goto yydefault;\r\r
-\r\r
- /* Not known => get a lookahead token if don't already have one. */\r\r
-\r\r
- /* yychar is either YYEMPTY or YYEOF\r\r
- or a valid token in external form. */\r\r
-\r\r
- if (yychar == YYEMPTY)\r\r
- {\r\r
-#if YYDEBUG != 0\r\r
- if (yydebug)\r\r
- fprintf(stderr, "Reading a token: ");\r\r
-#endif\r\r
- yychar = YYLEX;\r\r
- }\r\r
-\r\r
- /* Convert token to internal form (in yychar1) for indexing tables with */\r\r
-\r\r
- if (yychar <= 0) /* This means end of input. */\r\r
- {\r\r
- yychar1 = 0;\r\r
- yychar = YYEOF; /* Don't call YYLEX any more */\r\r
-\r\r
-#if YYDEBUG != 0\r\r
- if (yydebug)\r\r
- fprintf(stderr, "Now at end of input.\n");\r\r
-#endif\r\r
- }\r\r
- else\r\r
- {\r\r
- yychar1 = YYTRANSLATE(yychar);\r\r
-\r\r
-#if YYDEBUG != 0\r\r
- if (yydebug)\r\r
- {\r\r
- fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);\r\r
- /* Give the individual parser a way to print the precise meaning\r\r
- of a token, for further debugging info. */\r\r
-#ifdef YYPRINT\r\r
- YYPRINT (stderr, yychar, yylval);\r\r
-#endif\r\r
- fprintf (stderr, ")\n");\r\r
- }\r\r
-#endif\r\r
- }\r\r
-\r\r
- yyn += yychar1;\r\r
- if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)\r\r
- goto yydefault;\r\r
-\r\r
- yyn = yytable[yyn];\r\r
-\r\r
- /* yyn is what to do for this token type in this state.\r\r
- Negative => reduce, -yyn is rule number.\r\r
- Positive => shift, yyn is new state.\r\r
- New state is final state => don't bother to shift,\r\r
- just return success.\r\r
- 0, or most negative number => error. */\r\r
-\r\r
- if (yyn < 0)\r\r
- {\r\r
- if (yyn == YYFLAG)\r\r
- goto yyerrlab;\r\r
- yyn = -yyn;\r\r
- goto yyreduce;\r\r
- }\r\r
- else if (yyn == 0)\r\r
- goto yyerrlab;\r\r
-\r\r
- if (yyn == YYFINAL)\r\r
- YYACCEPT;\r\r
-\r\r
- /* Shift the lookahead token. */\r\r
-\r\r
-#if YYDEBUG != 0\r\r
- if (yydebug)\r\r
- fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);\r\r
-#endif\r\r
-\r\r
- /* Discard the token being shifted unless it is eof. */\r\r
- if (yychar != YYEOF)\r\r
- yychar = YYEMPTY;\r\r
-\r\r
- *++yyvsp = yylval;\r\r
-#ifdef YYLSP_NEEDED\r\r
- *++yylsp = yylloc;\r\r
-#endif\r\r
-\r\r
- /* count tokens shifted since error; after three, turn off error status. */\r\r
- if (yyerrstatus) yyerrstatus--;\r\r
-\r\r
- yystate = yyn;\r\r
- goto yynewstate;\r\r
-\r\r
-/* Do the default action for the current state. */\r\r
-yydefault:\r\r
-\r\r
- yyn = yydefact[yystate];\r\r
- if (yyn == 0)\r\r
- goto yyerrlab;\r\r
-\r\r
-/* Do a reduction. yyn is the number of a rule to reduce with. */\r\r
-yyreduce:\r\r
- yylen = yyr2[yyn];\r\r
- if (yylen > 0)\r\r
- yyval = yyvsp[1-yylen]; /* implement default value of the action */\r\r
-\r\r
-#if YYDEBUG != 0\r\r
- if (yydebug)\r\r
- {\r\r
- int i;\r\r
-\r\r
- fprintf (stderr, "Reducing via rule %d (line %d), ",\r\r
- yyn, yyrline[yyn]);\r\r
-\r\r
- /* Print the symbols being reduced, and their result. */\r\r
- for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)\r\r
- fprintf (stderr, "%s ", yytname[yyrhs[i]]);\r\r
- fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);\r\r
- }\r\r
-#endif\r\r
-\r\r
-\r
- switch (yyn) {\r
-\r
-case 1:\r
-#line 51 "error_table.y"\r
-{ table_name = ds(yyvsp[-2].dynstr);\r
- current_token = table_name;\r
- put_ecs(); ;\r
- break;}\r
-case 2:\r
-#line 57 "error_table.y"\r
-{ current_token = yyvsp[-1].dynstr;\r
- yyval.dynstr = yyvsp[0].dynstr; ;\r
- break;}\r
-case 3:\r
-#line 60 "error_table.y"\r
-{ current_token = yyvsp[0].dynstr;\r
- set_table_fun(ds("1"));\r
- yyval.dynstr = yyvsp[0].dynstr;\r
- ;\r
- break;}\r
-case 4:\r
-#line 67 "error_table.y"\r
-{ current_token = yyvsp[0].dynstr;\r
- set_table_fun(yyvsp[0].dynstr);\r
- yyval.dynstr = yyvsp[0].dynstr; ;\r
- break;}\r
-case 5:\r
-#line 74 "error_table.y"\r
-{ current_token = yyvsp[0].dynstr;\r
- set_table_num(yyvsp[0].dynstr);\r
- yyval.dynstr = yyvsp[0].dynstr; ;\r
- break;}\r
-case 8:\r
-#line 84 "error_table.y"\r
-{ add_ec(yyvsp[-2].dynstr, yyvsp[0].dynstr);\r
- free(yyvsp[-2].dynstr);\r
- free(yyvsp[0].dynstr); ;\r
- break;}\r
-case 9:\r
-#line 88 "error_table.y"\r
-{ add_ec_val(yyvsp[-4].dynstr, yyvsp[-2].dynstr, yyvsp[0].dynstr);\r
- free(yyvsp[-4].dynstr);\r
- free(yyvsp[-2].dynstr);\r
- free(yyvsp[0].dynstr);\r
- ;\r
- break;}\r
-case 10:\r
-#line 96 "error_table.y"\r
-{ yyval.dynstr = ds(yyvsp[0].dynstr);\r
- current_token = yyval.dynstr; ;\r
- break;}\r
-case 11:\r
-#line 101 "error_table.y"\r
-{ yyval.dynstr = ds(yyvsp[0].dynstr);\r
- current_token = yyval.dynstr; ;\r
- break;}\r
-}\r
- /* the action file gets copied in in place of this dollarsign */\r\r
-#line 487 "bison.simple"\r\r
-\f\r\r
- yyvsp -= yylen;\r\r
- yyssp -= yylen;\r\r
-#ifdef YYLSP_NEEDED\r\r
- yylsp -= yylen;\r\r
-#endif\r\r
-\r\r
-#if YYDEBUG != 0\r\r
- if (yydebug)\r\r
- {\r\r
- short *ssp1 = yyss - 1;\r\r
- fprintf (stderr, "state stack now");\r\r
- while (ssp1 != yyssp)\r\r
- fprintf (stderr, " %d", *++ssp1);\r\r
- fprintf (stderr, "\n");\r\r
- }\r\r
-#endif\r\r
-\r\r
- *++yyvsp = yyval;\r\r
-\r\r
-#ifdef YYLSP_NEEDED\r\r
- yylsp++;\r\r
- if (yylen == 0)\r\r
- {\r\r
- yylsp->first_line = yylloc.first_line;\r\r
- yylsp->first_column = yylloc.first_column;\r\r
- yylsp->last_line = (yylsp-1)->last_line;\r\r
- yylsp->last_column = (yylsp-1)->last_column;\r\r
- yylsp->text = 0;\r\r
- }\r\r
- else\r\r
- {\r\r
- yylsp->last_line = (yylsp+yylen-1)->last_line;\r\r
- yylsp->last_column = (yylsp+yylen-1)->last_column;\r\r
- }\r\r
-#endif\r\r
-\r\r
- /* Now "shift" the result of the reduction.\r\r
- Determine what state that goes to,\r\r
- based on the state we popped back to\r\r
- and the rule number reduced by. */\r\r
-\r\r
- yyn = yyr1[yyn];\r\r
-\r\r
- yystate = yypgoto[yyn - YYNTBASE] + *yyssp;\r\r
- if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)\r\r
- yystate = yytable[yystate];\r\r
- else\r\r
- yystate = yydefgoto[yyn - YYNTBASE];\r\r
-\r\r
- goto yynewstate;\r\r
-\r\r
-yyerrlab: /* here on detecting error */\r\r
-\r\r
- if (! yyerrstatus)\r\r
- /* If not already recovering from an error, report this error. */\r\r
- {\r\r
- ++yynerrs;\r\r
-\r\r
-#ifdef YYERROR_VERBOSE\r\r
- yyn = yypact[yystate];\r\r
-\r\r
- if (yyn > YYFLAG && yyn < YYLAST)\r\r
- {\r\r
- int size = 0;\r\r
- char *msg;\r\r
- int x, count;\r\r
-\r\r
- count = 0;\r\r
- /* Start X at -yyn if nec to avoid negative indexes in yycheck. */\r\r
- for (x = (yyn < 0 ? -yyn : 0);\r\r
- x < (sizeof(yytname) / sizeof(char *)); x++)\r\r
- if (yycheck[x + yyn] == x)\r\r
- size += strlen(yytname[x]) + 15, count++;\r\r
- msg = (char *) malloc(size + 15);\r\r
- if (msg != 0)\r\r
- {\r\r
- strcpy(msg, "parse error");\r\r
-\r\r
- if (count < 5)\r\r
- {\r\r
- count = 0;\r\r
- for (x = (yyn < 0 ? -yyn : 0);\r\r
- x < (sizeof(yytname) / sizeof(char *)); x++)\r\r
- if (yycheck[x + yyn] == x)\r\r
- {\r\r
- strcat(msg, count == 0 ? ", expecting `" : " or `");\r\r
- strcat(msg, yytname[x]);\r\r
- strcat(msg, "'");\r\r
- count++;\r\r
- }\r\r
- }\r\r
- yyerror(msg);\r\r
- free(msg);\r\r
- }\r\r
- else\r\r
- yyerror ("parse error; also virtual memory exceeded");\r\r
- }\r\r
- else\r\r
-#endif /* YYERROR_VERBOSE */\r\r
- yyerror("parse error");\r\r
- }\r\r
-\r\r
- goto yyerrlab1;\r\r
-yyerrlab1: /* here on error raised explicitly by an action */\r\r
-\r\r
- if (yyerrstatus == 3)\r\r
- {\r\r
- /* if just tried and failed to reuse lookahead token after an error, discard it. */\r\r
-\r\r
- /* return failure if at end of input */\r\r
- if (yychar == YYEOF)\r\r
- YYABORT;\r\r
-\r\r
-#if YYDEBUG != 0\r\r
- if (yydebug)\r\r
- fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);\r\r
-#endif\r\r
-\r\r
- yychar = YYEMPTY;\r\r
- }\r\r
-\r\r
- /* Else will try to reuse lookahead token\r\r
- after shifting the error token. */\r\r
-\r\r
- yyerrstatus = 3; /* Each real token shifted decrements this */\r\r
-\r\r
- goto yyerrhandle;\r\r
-\r\r
-yyerrdefault: /* current state does not do anything special for the error token. */\r\r
-\r\r
-#if 0\r\r
- /* This is wrong; only states that explicitly want error tokens\r\r
- should shift them. */\r\r
- yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/\r\r
- if (yyn) goto yydefault;\r\r
-#endif\r\r
-\r\r
-yyerrpop: /* pop the current state because it cannot handle the error token */\r\r
-\r\r
- if (yyssp == yyss) YYABORT;\r\r
- yyvsp--;\r\r
- yystate = *--yyssp;\r\r
-#ifdef YYLSP_NEEDED\r\r
- yylsp--;\r\r
-#endif\r\r
-\r\r
-#if YYDEBUG != 0\r\r
- if (yydebug)\r\r
- {\r\r
- short *ssp1 = yyss - 1;\r\r
- fprintf (stderr, "Error: state stack now");\r\r
- while (ssp1 != yyssp)\r\r
- fprintf (stderr, " %d", *++ssp1);\r\r
- fprintf (stderr, "\n");\r\r
- }\r\r
-#endif\r\r
-\r\r
-yyerrhandle:\r\r
-\r\r
- yyn = yypact[yystate];\r\r
- if (yyn == YYFLAG)\r\r
- goto yyerrdefault;\r\r
-\r\r
- yyn += YYTERROR;\r\r
- if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)\r\r
- goto yyerrdefault;\r\r
-\r\r
- yyn = yytable[yyn];\r\r
- if (yyn < 0)\r\r
- {\r\r
- if (yyn == YYFLAG)\r\r
- goto yyerrpop;\r\r
- yyn = -yyn;\r\r
- goto yyreduce;\r\r
- }\r\r
- else if (yyn == 0)\r\r
- goto yyerrpop;\r\r
-\r\r
- if (yyn == YYFINAL)\r\r
- YYACCEPT;\r\r
-\r\r
-#if YYDEBUG != 0\r\r
- if (yydebug)\r\r
- fprintf(stderr, "Shifting error token, ");\r\r
-#endif\r\r
-\r\r
- *++yyvsp = yylval;\r\r
-#ifdef YYLSP_NEEDED\r\r
- *++yylsp = yylloc;\r\r
-#endif\r\r
-\r\r
- yystate = yyn;\r\r
- goto yynewstate;\r\r
-}\r\r
-#line 105 "error_table.y"\r
-\r
-/*\r
- *\r
- * Copyright 1986, 1987 by the MIT Student Information Processing Board\r
- *\r
- * For copyright info, see mit-sipb-cr.h.\r
- */\r
-#ifndef AFS_NT40_ENV\r
-#include <unistd.h>\r
-#endif\r
-#include <afs/param.h>\r
-#include <string.h>\r
-#include <assert.h>\r
-#include <ctype.h>\r
-#ifdef AFS_NT40_ENV\r
-#include <sys/types.h>\r
-#include <afs/afsutil.h>\r
-#else\r
-#include <sys/time.h>\r
-#endif\r
-#include <sys/timeb.h>\r
-#include "error_table.h"\r
-#include "mit-sipb-cr.h"\r
-#include <stdio.h>\r
-\r
-/* Copyright (C) 1998 Transarc Corporation. All rights reserved.\r
- *\r
- */\r
-\r
-extern FILE *hfile, *cfile, *msfile;\r
-extern int use_msf;\r
-\r
-static afs_int32 gensym_n = 0;\r
-\r
-char *gensym(const char *x)\r
-{\r
- char *symbol;\r
- if (!gensym_n) {\r
- struct timeval tv;\r
- gettimeofday(&tv, (void *)0);\r
- gensym_n = (tv.tv_sec%10000)*100 + tv.tv_usec/10000;\r
- }\r
- symbol = (char *)malloc(32 * sizeof(char));\r
- gensym_n++;\r
- sprintf(symbol, "et%ld", gensym_n);\r
- return(symbol);\r
-}\r
-\r
-char *\r
-ds(const char *string)\r
-{\r
- char *rv;\r
- rv = (char *)malloc(strlen(string)+1);\r
- strcpy(rv, string);\r
- return(rv);\r
-}\r
-\r
-char *\r
-quote(const char *string)\r
-{\r
- char *rv;\r
- rv = (char *)malloc(strlen(string)+3);\r
- strcpy(rv, "\"");\r
- strcat(rv, string);\r
- strcat(rv, "\"");\r
- return(rv);\r
-}\r
-\r
-afs_int32 table_number = 0;\r
-int current = 0;\r
-char **error_codes = (char **)NULL;\r
-\r
-void add_ec(const char *name, const char *description)\r
-{\r
- if (msfile) {\r
- if (current > 0)\r
-#ifndef sun\r
- fprintf(msfile, "%d\t%s\n", current, description);\r
-#else\r
- fprintf(msfile, "%d %s\n", current, description);\r
-#endif /* !sun */\r
- } else {\r
- fprintf(cfile, "\t\"%s\",\n", description);\r
- }\r
- if (error_codes == (char **)NULL) {\r
- error_codes = (char **)malloc(sizeof(char *));\r
- *error_codes = (char *)NULL;\r
- }\r
- error_codes = (char **)realloc((char *)error_codes,\r
- (current + 2)*sizeof(char *));\r
- error_codes[current++] = ds(name);\r
- error_codes[current] = (char *)NULL;\r
-}\r
-\r
-void add_ec_val(const char *name, const char *val, const char *description)\r
-{\r
- const int ncurrent = atoi(val);\r
- if (ncurrent < current) {\r
- printf("Error code %s (%d) out of order", name,\r
- current);\r
- return;\r
- }\r
- \r
- while (ncurrent > current) {\r
- if (!msfile)\r
- fputs("\t(char *)NULL,\n", cfile);\r
- current++;\r
- }\r
- if (msfile) {\r
- if (current > 0)\r
-#ifndef sun\r
- fprintf(msfile, "%d\t%s\n", current, description);\r
-#else\r
- fprintf(msfile, "%d %s\n", current, description);\r
-#endif /* ! sun */\r
- } else { \r
- fprintf(cfile, "\t\"%s\",\n", description);\r
- }\r
- if (error_codes == (char **)NULL) {\r
- error_codes = (char **)malloc(sizeof(char *));\r
- *error_codes = (char *)NULL;\r
- }\r
- error_codes = (char **)realloc((char *)error_codes,\r
- (current + 2)*sizeof(char *));\r
- error_codes[current++] = ds(name);\r
- error_codes[current] = (char *)NULL;\r
-} \r
-\r
-void put_ecs(void)\r
-{\r
- int i;\r
- for (i = 0; i < current; i++) {\r
- if (error_codes[i] != (char *)NULL)\r
- fprintf(hfile, "#define %-40s (%ldL)\n",\r
- error_codes[i], table_number + i);\r
- }\r
-}\r
-\r
-/*\r
- * char_to_num -- maps letters and numbers into a small numbering space\r
- * uppercase -> 1-26\r
- * lowercase -> 27-52\r
- * digits -> 53-62\r
- * underscore-> 63\r
- */\r
-\r
-static const char char_set[] =\r
- "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_";\r
-\r
-int char_to_num(char c)\r
-{\r
- const char *where;\r
- int diff;\r
-\r
- where = strchr (char_set, c);\r
- if (where) {\r
- diff = where - char_set + 1;\r
- assert (diff < (1 << ERRCODE_RANGE));\r
- return diff;\r
- }\r
- else if (isprint (c))\r
- fprintf (stderr,\r
- "Illegal character `%c' in error table name\n",\r
- c);\r
- else\r
- fprintf (stderr,\r
- "Illegal character %03o in error table name\n",\r
- c);\r
- exit (1);\r
-}\r
-\r
-void set_table_num(char *string)\r
-{ char ucname[6]; /* I think 5 is enough but et_name.c used 6... */\r
- extern char *ucstring();\r
-\r
- if (msfile) {\r
- set_table_1num(string);\r
- return;\r
- }\r
- if (strlen(string) > 4) {\r
- fprintf(stderr, "Table name %s too long, truncated ",\r
- string);\r
- string[4] = '\0';\r
- fprintf(stderr, "to %s\n", string);\r
- }\r
- string = ucstring (ucname, string, sizeof(ucname));\r
- if (char_to_num (string[0]) > char_to_num ('z')) {\r
- fprintf (stderr, "%s%s%s%s",\r
- "First character of error table name must be ",\r
- "a letter; name ``",\r
- string, "'' rejected\n");\r
- exit (1);\r
- }\r
- while (*string != '\0') {\r
- table_number = (table_number << BITS_PER_CHAR)\r
- + char_to_num(*string);\r
- string++;\r
- }\r
- table_number = table_number << ERRCODE_RANGE;\r
-}\r
-\r
-void set_table_fun(char *astring)\r
-{\r
- register char *tp;\r
- unsigned int tc;\r
-\r
- for(tp=astring; (tc = *tp) != 0; tp++) {\r
- if (!isdigit(tc)) {\r
- fprintf(stderr, "Table function '%s' must be a decimal integer.\n",\r
- astring);\r
- exit(1);\r
- }\r
- }\r
- if (msfile) \r
- table_number += (atoi(astring)) << 28;\r
-}\r
-\r
-/* for compatibility with old comerr's, we truncate package name to 4\r
- * characters, but only store first 3 in the error code. Note that this\r
- * function, as a side effect, truncates the table name down to 4 chars.\r
- */\r
-void set_table_1num(char *string)\r
-{\r
- afs_int32 temp;\r
- int ctr;\r
-\r
- if ((temp = strlen(string)) > 4) {\r
- fprintf(stderr, "Table name %s too long, truncated ",\r
- string);\r
- string[4] = '\0';\r
- fprintf(stderr, "to %s\n", string);\r
- }\r
- if (temp == 4) {\r
- fprintf(stderr, "Table name %s too long, only 3 characters fit in error code.\n",\r
- string);\r
- }\r
- if (char_to_1num (string[0]) > char_to_1num ('z')) {\r
- fprintf (stderr, "%s%s%s%s",\r
- "First character of error table name must be ",\r
- "a letter; name ``",\r
- string, "'' rejected\n");\r
- exit (1);\r
- }\r
- temp = 0;\r
- for(ctr=0; ctr < 3; ctr++) { /* copy at most 3 chars to integer */\r
- if (*string == '\0') break; /* and watch for early end */\r
- temp = (temp * 050) /* "radix fifty" is base 050 = 40 */\r
- + char_to_1num(*string);\r
- string++;\r
- }\r
- table_number += temp << 12;\r
-}\r
-\r
-/*\r
- * char_to_num -- maps letters and numbers into very small space\r
- * 0-9 -> 0-9\r
- * mixed case -> 10-35\r
- * _ -> 36\r
- * others are reserved\r
- */\r
-\r
-static const char char_1set[] =\r
- "abcdefghijklmnopqrstuvwxyz_0123456789";\r
-\r
-int char_to_1num(char c)\r
-{\r
- const char *where;\r
- int diff;\r
-\r
- if (isupper(c)) c = tolower(c);\r
-\r
- where = strchr (char_1set, c);\r
- if (where) {\r
- /* start at 1 so we can decode */\r
- diff = where - char_1set;\r
- assert (diff < 050); /* it is radix 50, after all */\r
- return diff;\r
- }\r
- else if (isprint (c))\r
- fprintf (stderr,\r
- "Illegal character `%c' in error table name\n",\r
- c);\r
- else\r
- fprintf (stderr,\r
- "Illegal character %03o in error table name\n",\r
- c);\r
- exit (1);\r
-}\r
-\r
-#ifdef AFS_NT40_ENV\r
-#include "et_lex.lex_nt.c"\r
-#else\r
-#include "et_lex.lex.c"\r
-#endif\r
+#include <afs/param.h>
+
+RCSID("$Header: /tmp/cvstemp/openafs/src/comerr/error_table_nt.c,v 1.1.1.4 2001/09/20 06:13:05 hartmans Exp $");
+
+
+/*
+ * If __STDC__ is defined, function prototypes in the SunOS 5.5.1 lex
+ * and yacc templates are visible. We turn this on explicitly on
+ * NT because the prototypes help supress certain warning from the
+ * Microsoft C compiler.
+ */
+
+#ifdef AFS_NT40_ENV
+#include <malloc.h>
+# ifndef __STDC__
+# define __STDC__ 1
+# endif
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "internal.h"
+
+char *current_token = (char *)NULL;
+extern char *table_name;
+
+char *ds(const char *string);
+char *quote(const char *string);
+void set_table_1num(char *string);
+int char_to_1num(char c);
+void add_ec(const char *name, const char *description);
+void add_ec_val(const char *name, const char *val, const char *description);
+void put_ecs(void);
+void set_table_num(char *string);
+void set_table_fun(char *astring);
+
+
+#line 38 "error_table.y"
+typedef union {
+ char *dynstr;
+} YYSTYPE;
+#line 45 "error_table.y"
+
+
+#ifndef YYLTYPE
+typedef
+ struct yyltype
+ {
+ int timestamp;
+ int first_line;
+ int first_column;
+ int last_line;
+ int last_column;
+ char *text;
+ }
+ yyltype;
+
+#define YYLTYPE yyltype
+#endif
+
+#include <stdio.h>
+
+#ifndef __cplusplus
+#ifndef __STDC__
+#define const
+#endif
+#endif
+
+
+
+#define YYFINAL 24
+#define YYFLAG -32768
+#define YYNTBASE 10
+
+#define YYTRANSLATE(x) ((unsigned)(x) <= 262 ? yytranslate[x] : 18)
+
+static const char yytranslate[] = { 0,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 8, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 9, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 1, 2, 3, 4, 5,
+ 6, 7
+};
+
+#if YYDEBUG != 0
+static const short yyprhs[] = { 0,
+ 0, 5, 8, 10, 12, 14, 17, 19, 24, 31,
+ 33
+};
+
+static const short yyrhs[] = { 3,
+ 11, 14, 5, 0, 12, 13, 0, 13, 0, 6,
+ 0, 6, 0, 14, 15, 0, 15, 0, 4, 16,
+ 8, 17, 0, 4, 16, 9, 6, 8, 17, 0,
+ 6, 0, 7, 0
+};
+
+#endif
+
+#if YYDEBUG != 0
+static const short yyrline[] = { 0,
+ 50, 56, 59, 66, 73, 79, 80, 83, 87, 95,
+ 100
+};
+
+static const char * const yytname[] = { "$","error","$undefined.","ERROR_TABLE",
+"ERROR_CODE_ENTRY","END","STRING","QUOTED_STRING","','","'='","error_table",
+"header","table_fun","table_id","error_codes","ec_entry","ec_name","description",
+""
+};
+#endif
+
+static const short yyr1[] = { 0,
+ 10, 11, 11, 12, 13, 14, 14, 15, 15, 16,
+ 17
+};
+
+static const short yyr2[] = { 0,
+ 4, 2, 1, 1, 1, 2, 1, 4, 6, 1,
+ 1
+};
+
+static const short yydefact[] = { 0,
+ 0, 4, 0, 0, 3, 0, 0, 7, 5, 2,
+ 10, 0, 1, 6, 0, 0, 11, 8, 0, 0,
+ 9, 0, 0, 0
+};
+
+static const short yydefgoto[] = { 22,
+ 3, 4, 5, 7, 8, 12, 18
+};
+
+static const short yypact[] = { 1,
+ -1, 2, 3, 4,-32768, 5, -4,-32768,-32768,-32768,
+-32768, -6,-32768,-32768, 6, 8,-32768,-32768, 0, 6,
+-32768, 9, 12,-32768
+};
+
+static const short yypgoto[] = {-32768,
+-32768,-32768, 11,-32768, 10,-32768, -2
+};
+
+
+#define YYLAST 18
+
+
+static const short yytable[] = { 6,
+ 13, 15, 16, 1, 2, -5, 6, 20, 23, 9,
+ 11, 24, 17, 19, 10, 0, 14, 21
+};
+
+static const short yycheck[] = { 4,
+ 5, 8, 9, 3, 6, 4, 4, 8, 0, 6,
+ 6, 0, 7, 6, 4, -1, 7, 20
+};
+/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
+#line 3 "bison.simple"
+
+/* Skeleton output parser for bison,
+ Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+/* As a special exception, when this file is copied by Bison into a
+ Bison output file, you may use that output file without restriction.
+ This special exception was added by the Free Software Foundation
+ in version 1.24 of Bison. */
+
+#ifndef alloca
+#ifdef __GNUC__
+#define alloca __builtin_alloca
+#else /* not GNU C. */
+#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi)
+#include <alloca.h>
+#else /* not sparc */
+#if defined (MSDOS) && !defined (__TURBOC__)
+#include <malloc.h>
+#else /* not MSDOS, or __TURBOC__ */
+#if defined(_AIX)
+#include <malloc.h>
+ #pragma alloca
+#else /* not MSDOS, __TURBOC__, or _AIX */
+#ifdef __hpux
+#ifdef __cplusplus
+extern "C" {
+void *alloca (unsigned int);
+};
+#else /* not __cplusplus */
+void *alloca ();
+#endif /* not __cplusplus */
+#endif /* __hpux */
+#endif /* not _AIX */
+#endif /* not MSDOS, or __TURBOC__ */
+#endif /* not sparc. */
+#endif /* not GNU C. */
+#endif /* alloca not defined. */
+
+/* This is the parser code that is written into each bison parser
+ when the %semantic_parser declaration is not specified in the grammar.
+ It was written by Richard Stallman by simplifying the hairy parser
+ used when %semantic_parser is specified. */
+
+/* Note: there must be only one dollar sign in this file.
+ It is replaced by the list of actions, each action
+ as one case of the switch. */
+
+#define yyerrok (yyerrstatus = 0)
+#define yyclearin (yychar = YYEMPTY)
+#define YYEMPTY -2
+#define YYEOF 0
+#define YYACCEPT return(0)
+#define YYABORT return(1)
+#define YYERROR goto yyerrlab1
+/* Like YYERROR except do call yyerror.
+ This remains here temporarily to ease the
+ transition to the new meaning of YYERROR, for GCC.
+ Once GCC version 2 has supplanted version 1, this can go. */
+#define YYFAIL goto yyerrlab
+#define YYRECOVERING() (!!yyerrstatus)
+#define YYBACKUP(token, value) \
+do \
+ if (yychar == YYEMPTY && yylen == 1) \
+ { yychar = (token), yylval = (value); \
+ yychar1 = YYTRANSLATE (yychar); \
+ YYPOPSTACK; \
+ goto yybackup; \
+ } \
+ else \
+ { yyerror ("syntax error: cannot back up"); YYERROR; } \
+while (0)
+
+#define YYTERROR 1
+#define YYERRCODE 256
+
+#ifndef YYPURE
+#define YYLEX yylex()
+#endif
+
+#ifdef YYPURE
+#ifdef YYLSP_NEEDED
+#ifdef YYLEX_PARAM
+#define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM)
+#else
+#define YYLEX yylex(&yylval, &yylloc)
+#endif
+#else /* not YYLSP_NEEDED */
+#ifdef YYLEX_PARAM
+#define YYLEX yylex(&yylval, YYLEX_PARAM)
+#else
+#define YYLEX yylex(&yylval)
+#endif
+#endif /* not YYLSP_NEEDED */
+#endif
+
+/* If nonreentrant, generate the variables here */
+
+#ifndef YYPURE
+
+int yychar; /* the lookahead symbol */
+YYSTYPE yylval; /* the semantic value of the */
+ /* lookahead symbol */
+
+#ifdef YYLSP_NEEDED
+YYLTYPE yylloc; /* location data for the lookahead */
+ /* symbol */
+#endif
+
+int yynerrs; /* number of parse errors so far */
+#endif /* not YYPURE */
+
+#if YYDEBUG != 0
+int yydebug; /* nonzero means print parse trace */
+/* Since this is uninitialized, it does not stop multiple parsers
+ from coexisting. */
+#endif
+
+/* YYINITDEPTH indicates the initial size of the parser's stacks */
+
+#ifndef YYINITDEPTH
+#define YYINITDEPTH 200
+#endif
+
+/* YYMAXDEPTH is the maximum size the stacks can grow to
+ (effective only if the built-in stack extension method is used). */
+
+#if YYMAXDEPTH == 0
+#undef YYMAXDEPTH
+#endif
+
+#ifndef YYMAXDEPTH
+#define YYMAXDEPTH 10000
+#endif
+
+/* Prevent warning if -Wstrict-prototypes. */
+#ifdef __GNUC__
+int yyparse (void);
+#endif
+\f
+#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
+#define __yy_memcpy(FROM,TO,COUNT) __builtin_memcpy(TO,FROM,COUNT)
+#else /* not GNU C or C++ */
+#ifndef __cplusplus
+
+/* This is the most reliable way to avoid incompatibilities
+ in available built-in functions on various systems. */
+static void
+__yy_memcpy (from, to, count)
+ char *from;
+ char *to;
+ int count;
+{
+ register char *f = from;
+ register char *t = to;
+ register int i = count;
+
+ while (i-- > 0)
+ *t++ = *f++;
+}
+
+#else /* __cplusplus */
+
+/* This is the most reliable way to avoid incompatibilities
+ in available built-in functions on various systems. */
+static void
+__yy_memcpy (char *from, char *to, int count)
+{
+ register char *f = from;
+ register char *t = to;
+ register int i = count;
+
+ while (i-- > 0)
+ *t++ = *f++;
+}
+
+#endif
+#endif
+\f
+#line 192 "bison.simple"
+
+/* The user can define YYPARSE_PARAM as the name of an argument to be passed
+ into yyparse. The argument should have type void *.
+ It should actually point to an object.
+ Grammar actions can access the variable by casting it
+ to the proper pointer type. */
+
+#ifdef YYPARSE_PARAM
+#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
+#else
+#define YYPARSE_PARAM
+#define YYPARSE_PARAM_DECL
+#endif
+
+int
+yyparse(YYPARSE_PARAM)
+ YYPARSE_PARAM_DECL
+{
+ register int yystate;
+ register int yyn;
+ register short *yyssp;
+ register YYSTYPE *yyvsp;
+ int yyerrstatus; /* number of tokens to shift before error messages enabled */
+ int yychar1 = 0; /* lookahead token as an internal (translated) token number */
+
+ short yyssa[YYINITDEPTH]; /* the state stack */
+ YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */
+
+ short *yyss = yyssa; /* refer to the stacks thru separate pointers */
+ YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */
+
+#ifdef YYLSP_NEEDED
+ YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */
+ YYLTYPE *yyls = yylsa;
+ YYLTYPE *yylsp;
+
+#define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
+#else
+#define YYPOPSTACK (yyvsp--, yyssp--)
+#endif
+
+ int yystacksize = YYINITDEPTH;
+
+#ifdef YYPURE
+ int yychar;
+ YYSTYPE yylval;
+ int yynerrs;
+#ifdef YYLSP_NEEDED
+ YYLTYPE yylloc;
+#endif
+#endif
+
+ YYSTYPE yyval; /* the variable used to return */
+ /* semantic values from the action */
+ /* routines */
+
+ int yylen;
+
+#if YYDEBUG != 0
+ if (yydebug)
+ fprintf(stderr, "Starting parse\n");
+#endif
+
+ yystate = 0;
+ yyerrstatus = 0;
+ yynerrs = 0;
+ yychar = YYEMPTY; /* Cause a token to be read. */
+
+ /* Initialize stack pointers.
+ Waste one element of value and location stack
+ so that they stay on the same level as the state stack.
+ The wasted elements are never initialized. */
+
+ yyssp = yyss - 1;
+ yyvsp = yyvs;
+#ifdef YYLSP_NEEDED
+ yylsp = yyls;
+#endif
+
+/* Push a new state, which is found in yystate . */
+/* In all cases, when you get here, the value and location stacks
+ have just been pushed. so pushing a state here evens the stacks. */
+yynewstate:
+
+ *++yyssp = yystate;
+
+ if (yyssp >= yyss + yystacksize - 1)
+ {
+ /* Give user a chance to reallocate the stack */
+ /* Use copies of these so that the &'s don't force the real ones into memory. */
+ YYSTYPE *yyvs1 = yyvs;
+ short *yyss1 = yyss;
+#ifdef YYLSP_NEEDED
+ YYLTYPE *yyls1 = yyls;
+#endif
+
+ /* Get the current used size of the three stacks, in elements. */
+ int size = yyssp - yyss + 1;
+
+#ifdef yyoverflow
+ /* Each stack pointer address is followed by the size of
+ the data in use in that stack, in bytes. */
+#ifdef YYLSP_NEEDED
+ /* This used to be a conditional around just the two extra args,
+ but that might be undefined if yyoverflow is a macro. */
+ yyoverflow("parser stack overflow",
+ &yyss1, size * sizeof (*yyssp),
+ &yyvs1, size * sizeof (*yyvsp),
+ &yyls1, size * sizeof (*yylsp),
+ &yystacksize);
+#else
+ yyoverflow("parser stack overflow",
+ &yyss1, size * sizeof (*yyssp),
+ &yyvs1, size * sizeof (*yyvsp),
+ &yystacksize);
+#endif
+
+ yyss = yyss1; yyvs = yyvs1;
+#ifdef YYLSP_NEEDED
+ yyls = yyls1;
+#endif
+#else /* no yyoverflow */
+ /* Extend the stack our own way. */
+ if (yystacksize >= YYMAXDEPTH)
+ {
+ yyerror("parser stack overflow");
+ return 2;
+ }
+ yystacksize *= 2;
+ if (yystacksize > YYMAXDEPTH)
+ yystacksize = YYMAXDEPTH;
+ yyss = (short *) alloca (yystacksize * sizeof (*yyssp));
+ __yy_memcpy ((char *)yyss1, (char *)yyss, size * sizeof (*yyssp));
+ yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp));
+ __yy_memcpy ((char *)yyvs1, (char *)yyvs, size * sizeof (*yyvsp));
+#ifdef YYLSP_NEEDED
+ yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp));
+ __yy_memcpy ((char *)yyls1, (char *)yyls, size * sizeof (*yylsp));
+#endif
+#endif /* no yyoverflow */
+
+ yyssp = yyss + size - 1;
+ yyvsp = yyvs + size - 1;
+#ifdef YYLSP_NEEDED
+ yylsp = yyls + size - 1;
+#endif
+
+#if YYDEBUG != 0
+ if (yydebug)
+ fprintf(stderr, "Stack size increased to %d\n", yystacksize);
+#endif
+
+ if (yyssp >= yyss + yystacksize - 1)
+ YYABORT;
+ }
+
+#if YYDEBUG != 0
+ if (yydebug)
+ fprintf(stderr, "Entering state %d\n", yystate);
+#endif
+
+ goto yybackup;
+ yybackup:
+
+/* Do appropriate processing given the current state. */
+/* Read a lookahead token if we need one and don't already have one. */
+/* yyresume: */
+
+ /* First try to decide what to do without reference to lookahead token. */
+
+ yyn = yypact[yystate];
+ if (yyn == YYFLAG)
+ goto yydefault;
+
+ /* Not known => get a lookahead token if don't already have one. */
+
+ /* yychar is either YYEMPTY or YYEOF
+ or a valid token in external form. */
+
+ if (yychar == YYEMPTY)
+ {
+#if YYDEBUG != 0
+ if (yydebug)
+ fprintf(stderr, "Reading a token: ");
+#endif
+ yychar = YYLEX;
+ }
+
+ /* Convert token to internal form (in yychar1) for indexing tables with */
+
+ if (yychar <= 0) /* This means end of input. */
+ {
+ yychar1 = 0;
+ yychar = YYEOF; /* Don't call YYLEX any more */
+
+#if YYDEBUG != 0
+ if (yydebug)
+ fprintf(stderr, "Now at end of input.\n");
+#endif
+ }
+ else
+ {
+ yychar1 = YYTRANSLATE(yychar);
+
+#if YYDEBUG != 0
+ if (yydebug)
+ {
+ fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
+ /* Give the individual parser a way to print the precise meaning
+ of a token, for further debugging info. */
+#ifdef YYPRINT
+ YYPRINT (stderr, yychar, yylval);
+#endif
+ fprintf (stderr, ")\n");
+ }
+#endif
+ }
+
+ yyn += yychar1;
+ if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
+ goto yydefault;
+
+ yyn = yytable[yyn];
+
+ /* yyn is what to do for this token type in this state.
+ Negative => reduce, -yyn is rule number.
+ Positive => shift, yyn is new state.
+ New state is final state => don't bother to shift,
+ just return success.
+ 0, or most negative number => error. */
+
+ if (yyn < 0)
+ {
+ if (yyn == YYFLAG)
+ goto yyerrlab;
+ yyn = -yyn;
+ goto yyreduce;
+ }
+ else if (yyn == 0)
+ goto yyerrlab;
+
+ if (yyn == YYFINAL)
+ YYACCEPT;
+
+ /* Shift the lookahead token. */
+
+#if YYDEBUG != 0
+ if (yydebug)
+ fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
+#endif
+
+ /* Discard the token being shifted unless it is eof. */
+ if (yychar != YYEOF)
+ yychar = YYEMPTY;
+
+ *++yyvsp = yylval;
+#ifdef YYLSP_NEEDED
+ *++yylsp = yylloc;
+#endif
+
+ /* count tokens shifted since error; after three, turn off error status. */
+ if (yyerrstatus) yyerrstatus--;
+
+ yystate = yyn;
+ goto yynewstate;
+
+/* Do the default action for the current state. */
+yydefault:
+
+ yyn = yydefact[yystate];
+ if (yyn == 0)
+ goto yyerrlab;
+
+/* Do a reduction. yyn is the number of a rule to reduce with. */
+yyreduce:
+ yylen = yyr2[yyn];
+ if (yylen > 0)
+ yyval = yyvsp[1-yylen]; /* implement default value of the action */
+
+#if YYDEBUG != 0
+ if (yydebug)
+ {
+ int i;
+
+ fprintf (stderr, "Reducing via rule %d (line %d), ",
+ yyn, yyrline[yyn]);
+
+ /* Print the symbols being reduced, and their result. */
+ for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
+ fprintf (stderr, "%s ", yytname[yyrhs[i]]);
+ fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
+ }
+#endif
+
+
+ switch (yyn) {
+
+case 1:
+#line 51 "error_table.y"
+{ table_name = ds(yyvsp[-2].dynstr);
+ current_token = table_name;
+ put_ecs(); ;
+ break;}
+case 2:
+#line 57 "error_table.y"
+{ current_token = yyvsp[-1].dynstr;
+ yyval.dynstr = yyvsp[0].dynstr; ;
+ break;}
+case 3:
+#line 60 "error_table.y"
+{ current_token = yyvsp[0].dynstr;
+ set_table_fun(ds("1"));
+ yyval.dynstr = yyvsp[0].dynstr;
+ ;
+ break;}
+case 4:
+#line 67 "error_table.y"
+{ current_token = yyvsp[0].dynstr;
+ set_table_fun(yyvsp[0].dynstr);
+ yyval.dynstr = yyvsp[0].dynstr; ;
+ break;}
+case 5:
+#line 74 "error_table.y"
+{ current_token = yyvsp[0].dynstr;
+ set_table_num(yyvsp[0].dynstr);
+ yyval.dynstr = yyvsp[0].dynstr; ;
+ break;}
+case 8:
+#line 84 "error_table.y"
+{ add_ec(yyvsp[-2].dynstr, yyvsp[0].dynstr);
+ free(yyvsp[-2].dynstr);
+ free(yyvsp[0].dynstr); ;
+ break;}
+case 9:
+#line 88 "error_table.y"
+{ add_ec_val(yyvsp[-4].dynstr, yyvsp[-2].dynstr, yyvsp[0].dynstr);
+ free(yyvsp[-4].dynstr);
+ free(yyvsp[-2].dynstr);
+ free(yyvsp[0].dynstr);
+ ;
+ break;}
+case 10:
+#line 96 "error_table.y"
+{ yyval.dynstr = ds(yyvsp[0].dynstr);
+ current_token = yyval.dynstr; ;
+ break;}
+case 11:
+#line 101 "error_table.y"
+{ yyval.dynstr = ds(yyvsp[0].dynstr);
+ current_token = yyval.dynstr; ;
+ break;}
+}
+ /* the action file gets copied in in place of this dollarsign */
+#line 487 "bison.simple"
+\f
+ yyvsp -= yylen;
+ yyssp -= yylen;
+#ifdef YYLSP_NEEDED
+ yylsp -= yylen;
+#endif
+
+#if YYDEBUG != 0
+ if (yydebug)
+ {
+ short *ssp1 = yyss - 1;
+ fprintf (stderr, "state stack now");
+ while (ssp1 != yyssp)
+ fprintf (stderr, " %d", *++ssp1);
+ fprintf (stderr, "\n");
+ }
+#endif
+
+ *++yyvsp = yyval;
+
+#ifdef YYLSP_NEEDED
+ yylsp++;
+ if (yylen == 0)
+ {
+ yylsp->first_line = yylloc.first_line;
+ yylsp->first_column = yylloc.first_column;
+ yylsp->last_line = (yylsp-1)->last_line;
+ yylsp->last_column = (yylsp-1)->last_column;
+ yylsp->text = 0;
+ }
+ else
+ {
+ yylsp->last_line = (yylsp+yylen-1)->last_line;
+ yylsp->last_column = (yylsp+yylen-1)->last_column;
+ }
+#endif
+
+ /* Now "shift" the result of the reduction.
+ Determine what state that goes to,
+ based on the state we popped back to
+ and the rule number reduced by. */
+
+ yyn = yyr1[yyn];
+
+ yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
+ if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
+ yystate = yytable[yystate];
+ else
+ yystate = yydefgoto[yyn - YYNTBASE];
+
+ goto yynewstate;
+
+yyerrlab: /* here on detecting error */
+
+ if (! yyerrstatus)
+ /* If not already recovering from an error, report this error. */
+ {
+ ++yynerrs;
+
+#ifdef YYERROR_VERBOSE
+ yyn = yypact[yystate];
+
+ if (yyn > YYFLAG && yyn < YYLAST)
+ {
+ int size = 0;
+ char *msg;
+ int x, count;
+
+ count = 0;
+ /* Start X at -yyn if nec to avoid negative indexes in yycheck. */
+ for (x = (yyn < 0 ? -yyn : 0);
+ x < (sizeof(yytname) / sizeof(char *)); x++)
+ if (yycheck[x + yyn] == x)
+ size += strlen(yytname[x]) + 15, count++;
+ msg = (char *) malloc(size + 15);
+ if (msg != 0)
+ {
+ strcpy(msg, "parse error");
+
+ if (count < 5)
+ {
+ count = 0;
+ for (x = (yyn < 0 ? -yyn : 0);
+ x < (sizeof(yytname) / sizeof(char *)); x++)
+ if (yycheck[x + yyn] == x)
+ {
+ strcat(msg, count == 0 ? ", expecting `" : " or `");
+ strcat(msg, yytname[x]);
+ strcat(msg, "'");
+ count++;
+ }
+ }
+ yyerror(msg);
+ free(msg);
+ }
+ else
+ yyerror ("parse error; also virtual memory exceeded");
+ }
+ else
+#endif /* YYERROR_VERBOSE */
+ yyerror("parse error");
+ }
+
+ goto yyerrlab1;
+yyerrlab1: /* here on error raised explicitly by an action */
+
+ if (yyerrstatus == 3)
+ {
+ /* if just tried and failed to reuse lookahead token after an error, discard it. */
+
+ /* return failure if at end of input */
+ if (yychar == YYEOF)
+ YYABORT;
+
+#if YYDEBUG != 0
+ if (yydebug)
+ fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
+#endif
+
+ yychar = YYEMPTY;
+ }
+
+ /* Else will try to reuse lookahead token
+ after shifting the error token. */
+
+ yyerrstatus = 3; /* Each real token shifted decrements this */
+
+ goto yyerrhandle;
+
+yyerrdefault: /* current state does not do anything special for the error token. */
+
+#if 0
+ /* This is wrong; only states that explicitly want error tokens
+ should shift them. */
+ yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/
+ if (yyn) goto yydefault;
+#endif
+
+yyerrpop: /* pop the current state because it cannot handle the error token */
+
+ if (yyssp == yyss) YYABORT;
+ yyvsp--;
+ yystate = *--yyssp;
+#ifdef YYLSP_NEEDED
+ yylsp--;
+#endif
+
+#if YYDEBUG != 0
+ if (yydebug)
+ {
+ short *ssp1 = yyss - 1;
+ fprintf (stderr, "Error: state stack now");
+ while (ssp1 != yyssp)
+ fprintf (stderr, " %d", *++ssp1);
+ fprintf (stderr, "\n");
+ }
+#endif
+
+yyerrhandle:
+
+ yyn = yypact[yystate];
+ if (yyn == YYFLAG)
+ goto yyerrdefault;
+
+ yyn += YYTERROR;
+ if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
+ goto yyerrdefault;
+
+ yyn = yytable[yyn];
+ if (yyn < 0)
+ {
+ if (yyn == YYFLAG)
+ goto yyerrpop;
+ yyn = -yyn;
+ goto yyreduce;
+ }
+ else if (yyn == 0)
+ goto yyerrpop;
+
+ if (yyn == YYFINAL)
+ YYACCEPT;
+
+#if YYDEBUG != 0
+ if (yydebug)
+ fprintf(stderr, "Shifting error token, ");
+#endif
+
+ *++yyvsp = yylval;
+#ifdef YYLSP_NEEDED
+ *++yylsp = yylloc;
+#endif
+
+ yystate = yyn;
+ goto yynewstate;
+}
+#line 105 "error_table.y"
+
+/*
+ *
+ * Copyright 1986, 1987 by the MIT Student Information Processing Board
+ *
+ * For copyright info, see mit-sipb-cr.h.
+ */
+#ifndef AFS_NT40_ENV
+#include <unistd.h>
+#endif
+#include <afs/param.h>
+#include <string.h>
+#include <assert.h>
+#include <ctype.h>
+#ifdef AFS_NT40_ENV
+#include <sys/types.h>
+#include <afs/afsutil.h>
+#else
+#include <sys/time.h>
+#endif
+#include <sys/timeb.h>
+#include "error_table.h"
+#include "mit-sipb-cr.h"
+#include <stdio.h>
+
+/* Copyright (C) 1998 Transarc Corporation. All rights reserved.
+ *
+ */
+
+extern FILE *hfile, *cfile, *msfile;
+extern int use_msf;
+
+static afs_int32 gensym_n = 0;
+
+char *gensym(const char *x)
+{
+ char *symbol;
+ if (!gensym_n) {
+ struct timeval tv;
+ gettimeofday(&tv, (void *)0);
+ gensym_n = (tv.tv_sec%10000)*100 + tv.tv_usec/10000;
+ }
+ symbol = (char *)malloc(32 * sizeof(char));
+ gensym_n++;
+ sprintf(symbol, "et%ld", gensym_n);
+ return(symbol);
+}
+
+char *
+ds(const char *string)
+{
+ char *rv;
+ rv = (char *)malloc(strlen(string)+1);
+ strcpy(rv, string);
+ return(rv);
+}
+
+char *
+quote(const char *string)
+{
+ char *rv;
+ rv = (char *)malloc(strlen(string)+3);
+ strcpy(rv, "\"");
+ strcat(rv, string);
+ strcat(rv, "\"");
+ return(rv);
+}
+
+afs_int32 table_number = 0;
+int current = 0;
+char **error_codes = (char **)NULL;
+
+void add_ec(const char *name, const char *description)
+{
+ if (msfile) {
+ if (current > 0)
+#ifndef sun
+ fprintf(msfile, "%d\t%s\n", current, description);
+#else
+ fprintf(msfile, "%d %s\n", current, description);
+#endif /* !sun */
+ } else {
+ fprintf(cfile, "\t\"%s\",\n", description);
+ }
+ if (error_codes == (char **)NULL) {
+ error_codes = (char **)malloc(sizeof(char *));
+ *error_codes = (char *)NULL;
+ }
+ error_codes = (char **)realloc((char *)error_codes,
+ (current + 2)*sizeof(char *));
+ error_codes[current++] = ds(name);
+ error_codes[current] = (char *)NULL;
+}
+
+void add_ec_val(const char *name, const char *val, const char *description)
+{
+ const int ncurrent = atoi(val);
+ if (ncurrent < current) {
+ printf("Error code %s (%d) out of order", name,
+ current);
+ return;
+ }
+
+ while (ncurrent > current) {
+ if (!msfile)
+ fputs("\t(char *)NULL,\n", cfile);
+ current++;
+ }
+ if (msfile) {
+ if (current > 0)
+#ifndef sun
+ fprintf(msfile, "%d\t%s\n", current, description);
+#else
+ fprintf(msfile, "%d %s\n", current, description);
+#endif /* ! sun */
+ } else {
+ fprintf(cfile, "\t\"%s\",\n", description);
+ }
+ if (error_codes == (char **)NULL) {
+ error_codes = (char **)malloc(sizeof(char *));
+ *error_codes = (char *)NULL;
+ }
+ error_codes = (char **)realloc((char *)error_codes,
+ (current + 2)*sizeof(char *));
+ error_codes[current++] = ds(name);
+ error_codes[current] = (char *)NULL;
+}
+
+void put_ecs(void)
+{
+ int i;
+ for (i = 0; i < current; i++) {
+ if (error_codes[i] != (char *)NULL)
+ fprintf(hfile, "#define %-40s (%ldL)\n",
+ error_codes[i], table_number + i);
+ }
+}
+
+/*
+ * char_to_num -- maps letters and numbers into a small numbering space
+ * uppercase -> 1-26
+ * lowercase -> 27-52
+ * digits -> 53-62
+ * underscore-> 63
+ */
+
+static const char char_set[] =
+ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_";
+
+int char_to_num(char c)
+{
+ const char *where;
+ int diff;
+
+ where = strchr (char_set, c);
+ if (where) {
+ diff = where - char_set + 1;
+ assert (diff < (1 << ERRCODE_RANGE));
+ return diff;
+ }
+ else if (isprint (c))
+ fprintf (stderr,
+ "Illegal character `%c' in error table name\n",
+ c);
+ else
+ fprintf (stderr,
+ "Illegal character %03o in error table name\n",
+ c);
+ exit (1);
+}
+
+void set_table_num(char *string)
+{
+ if (msfile) {
+ set_table_1num(string);
+ return;
+ }
+ if (strlen(string) > 4) {
+ fprintf(stderr, "Table name %s too long, truncated ",
+ string);
+ string[4] = '\0';
+ fprintf(stderr, "to %s\n", string);
+ }
+ if (char_to_num (string[0]) > char_to_num ('z')) {
+ fprintf (stderr, "%s%s%s%s",
+ "First character of error table name must be ",
+ "a letter; name ``",
+ string, "'' rejected\n");
+ exit (1);
+ }
+ while (*string != '\0') {
+ table_number = (table_number << BITS_PER_CHAR)
+ + char_to_num(*string);
+ string++;
+ }
+ table_number = table_number << ERRCODE_RANGE;
+}
+
+void set_table_fun(char *astring)
+{
+ register char *tp;
+ unsigned int tc;
+
+ for(tp=astring; (tc = *tp) != 0; tp++) {
+ if (!isdigit(tc)) {
+ fprintf(stderr, "Table function '%s' must be a decimal integer.\n",
+ astring);
+ exit(1);
+ }
+ }
+ if (msfile)
+ table_number += (atoi(astring)) << 28;
+}
+
+/* for compatibility with old comerr's, we truncate package name to 4
+ * characters, but only store first 3 in the error code. Note that this
+ * function, as a side effect, truncates the table name down to 4 chars.
+ */
+void set_table_1num(char *string)
+{
+ afs_int32 temp;
+ int ctr;
+
+ if ((temp = strlen(string)) > 4) {
+ fprintf(stderr, "Table name %s too long, truncated ",
+ string);
+ string[4] = '\0';
+ fprintf(stderr, "to %s\n", string);
+ }
+ if (temp == 4) {
+ fprintf(stderr, "Table name %s too long, only 3 characters fit in error code.\n",
+ string);
+ }
+ if (char_to_1num (string[0]) > char_to_1num ('z')) {
+ fprintf (stderr, "%s%s%s%s",
+ "First character of error table name must be ",
+ "a letter; name ``",
+ string, "'' rejected\n");
+ exit (1);
+ }
+ temp = 0;
+ for(ctr=0; ctr < 3; ctr++) { /* copy at most 3 chars to integer */
+ if (*string == '\0') break; /* and watch for early end */
+ temp = (temp * 050) /* "radix fifty" is base 050 = 40 */
+ + char_to_1num(*string);
+ string++;
+ }
+ table_number += temp << 12;
+}
+
+/*
+ * char_to_num -- maps letters and numbers into very small space
+ * 0-9 -> 0-9
+ * mixed case -> 10-35
+ * _ -> 36
+ * others are reserved
+ */
+
+static const char char_1set[] =
+ "abcdefghijklmnopqrstuvwxyz_0123456789";
+
+int char_to_1num(char c)
+{
+ const char *where;
+ int diff;
+
+ if (isupper(c)) c = tolower(c);
+
+ where = strchr (char_1set, c);
+ if (where) {
+ /* start at 1 so we can decode */
+ diff = where - char_1set;
+ assert (diff < 050); /* it is radix 50, after all */
+ return diff;
+ }
+ else if (isprint (c))
+ fprintf (stderr,
+ "Illegal character `%c' in error table name\n",
+ c);
+ else
+ fprintf (stderr,
+ "Illegal character %03o in error table name\n",
+ c);
+ exit (1);
+}
+
+#ifdef AFS_NT40_ENV
+#include "et_lex.lex_nt.c"
+#else
+#include "et_lex.lex.c"
+#endif
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/comerr/test/test.c,v 1.1.1.3 2001/07/14 22:21:15 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/comerr/test/test.c,v 1.1.1.4 2001/09/20 06:13:06 hartmans Exp $");
#include <stdio.h>
#include <errno.h>
printf("With 0: tgt-expired -> %s\n", error_message(KRB_MK_AP_TGTEXP));
- initialize_krb_error_table();
- initialize_krb_error_table();
+ initialize_KRB_error_table();
+ initialize_KRB_error_table();
printf("KRB error table initialized: base %d (%s), name %s\n",
- ERROR_TABLE_BASE_krb, error_message(ERROR_TABLE_BASE_krb),
- error_table_name(ERROR_TABLE_BASE_krb));
+ ERROR_TABLE_BASE_KRB, error_message(ERROR_TABLE_BASE_KRB),
+ error_table_name(ERROR_TABLE_BASE_KRB));
printf("With krb: tgt-expired -> %s\n",
error_message(KRB_MK_AP_TGTEXP));
- initialize_quux_error_table();
+ initialize_QUUX_error_table();
printf("QUUX error table initialized: base %d (%s), name %s\n",
- ERROR_TABLE_BASE_quux, error_message(ERROR_TABLE_BASE_quux),
- error_table_name(ERROR_TABLE_BASE_quux));
+ ERROR_TABLE_BASE_QUUX, error_message(ERROR_TABLE_BASE_QUUX),
+ error_table_name(ERROR_TABLE_BASE_QUUX));
printf("Msg for TGT-expired is '%s'\n",
error_message(KRB_MK_AP_TGTEXP));
- error_table krb
+ error_table KRB
error_code KRB_MK_AP_TKFIL,
"Can't read ticket file"
- error_table quux
+ error_table QUUX
ec FOO_ERR, "foo"
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/dauth/dlog.c,v 1.1.1.6 2001/09/11 14:32:24 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/dauth/dlog.c,v 1.1.1.7 2001/09/20 06:13:21 hartmans Exp $");
#include <afs/stds.h>
#include <sys/types.h>
zero_argc = argc;
zero_argv = argv;
- initialize_u_error_table();
- initialize_ktc_error_table();
- initialize_acfg_error_table();
+ initialize_U_error_table();
+ initialize_KTC_error_table();
+ initialize_ACFG_error_table();
ts = cmd_CreateSyntax((char *) 0, CommandProc, 0, "obtain Kerberos authentication");
install9x: install
clean::
- $(DEL) $(LIBFILE)
\ No newline at end of file
+ $(DEL) $(LIBFILE) $(GENERATED_FILES)
+
#ifdef AFS_NT40_ENV
#include "conf-winnt.h"
#else
+#ifdef AFS_XBSD_ENV
+#include "conf-i386-obsd.h"
+#else
#if defined(AFS_LINUX20_ENV) || defined(AFS_DJGPP_ENV)
#ifdef AFS_PPC_LINUX20_ENV
#include "conf-ppc-linux.h"
#endif
#endif /* AFS_LINUX20_ENV */
#endif /* AFS_NT40_ENV */
+#endif /* AFS_XBSD_ENV */
#endif /* NCR || X86 */
#endif /* __alpha */
#endif /* SGI */
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/des/read_pssword.c,v 1.1.1.6 2001/09/11 14:32:33 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/des/read_pssword.c,v 1.1.1.7 2001/09/20 06:13:27 hartmans Exp $");
#include <mit-cpyright.h>
#include <des.h>
#endif
static int intrupt;
-#if defined(AFS_SGI_ENV) || defined (AFS_AIX_ENV) || defined(AFS_FBSD_ENV) /*|| defined (AFS_HPUX_ENV) || defined(AFS_SUN5_ENV)*/
+#if defined(AFS_SGI_ENV) || defined (AFS_AIX_ENV) || defined(AFS_XBSD_ENV) /*|| defined (AFS_HPUX_ENV) || defined(AFS_SUN5_ENV)*/
#undef BSDUNIX
#endif
return ok;
}
-#if defined (AFS_AIX_ENV) || defined (AFS_HPUX_ENV) || defined(AFS_SGI_ENV) || defined(AFS_SUN_ENV) || defined(AFS_LINUX20_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
+#if defined (AFS_AIX_ENV) || defined (AFS_HPUX_ENV) || defined(AFS_SGI_ENV) || defined(AFS_SUN_ENV) || defined(AFS_LINUX20_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
static void catch(int);
#endif
{
int ok = 0, cnt1=0;
char *ptr;
-#if defined(AFS_HPUX_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
+#if defined(AFS_HPUX_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
register int fno;
struct sigaction newsig, oldsig;
struct termios save_ttyb, ttyb;
#endif
-#if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
+#if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
FILE *fi;
#endif
#if defined(AFS_SUN_ENV) && !defined(AFS_SUN5_ENV)
return -1;
}
-#if defined(AFS_HPUX_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
+#if defined(AFS_HPUX_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
if ((fi = fopen("/dev/tty", "r")) == NULL)
return -1;
setbuf(fi, (char *)NULL); /* We don't want any buffering for our i/o. */
if (!ok)
memset(s, 0, maxa);
printf("\n");
-#if defined(AFS_HPUX_ENV) || defined(AFS_FBSD_ENV)
+#if defined(AFS_HPUX_ENV) || defined(AFS_XBSD_ENV)
/*
* Restore the terminal to its previous characteristics.
* Restore the old signal handler for SIGINT.
#endif
-#if defined (AFS_AIX_ENV) || defined (AFS_HPUX_ENV) || defined(AFS_SGI_ENV) || defined(AFS_SUN_ENV) || defined(AFS_LINUX20_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
+#if defined (AFS_AIX_ENV) || defined (AFS_HPUX_ENV) || defined(AFS_SGI_ENV) || defined(AFS_SUN_ENV) || defined(AFS_LINUX20_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
static void
catch(int junk)
{
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/dir/buffer.c,v 1.1.1.5 2001/09/11 14:32:35 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/dir/buffer.c,v 1.1.1.6 2001/09/20 06:13:28 hartmans Exp $");
#include <stdlib.h>
#include <lock.h>
{*abuffers = nbuffers;
*acalls = calls;
*aios = ios;
+ return 0;
}
int DInit (abuffers)
register struct buffer *lp; /* pointer to a fairly-old buffer */
{/* Find a usable buffer slot */
register afs_int32 i;
- afs_int32 lt,pt;
+ afs_int32 lt;
register struct buffer **tbp;
if (lp && (lp->lockers == 0)) {
return lp;
}
+void
DRelease (bp,flag)
register struct buffer *bp;
int flag;
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/dir/salvage.c,v 1.1.1.5 2001/09/11 14:32:36 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/dir/salvage.c,v 1.1.1.6 2001/09/20 06:14:44 hartmans Exp $");
#include <sys/types.h>
#include <errno.h>
afs_int32 dot[3], dotdot[3], lfid[3], code, usedPages;
char tname[256];
register int i;
- register char *tp, tc;
+ register char *tp;
struct DirHeader *dhp;
struct DirEntry *ep;
int entry;
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/finale/translate_et.c,v 1.1.1.5 2001/07/14 22:21:53 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/finale/translate_et.c,v 1.1.1.6 2001/09/20 06:14:46 hartmans Exp $");
#include <afs/com_err.h>
#include <rx/rxkad.h>
nsa.sa_flags = SA_FULLDUMP;
sigaction(SIGSEGV, &nsa, NULL);
#endif
- initialize_ka_error_table();
- initialize_rxk_error_table();
- initialize_ktc_error_table();
- initialize_acfg_error_table();
- initialize_cmd_error_table();
- initialize_vl_error_table();
- initialize_pt_error_table();
- initialize_bz_error_table();
- initialize_u_error_table();
- initialize_vols_error_table();
+ initialize_KA_error_table();
+ initialize_RXK_error_table();
+ initialize_KTC_error_table();
+ initialize_ACFG_error_table();
+ initialize_CMD_error_table();
+ initialize_VL_error_table();
+ initialize_PT_error_table();
+ initialize_BZ_error_table();
+ initialize_U_error_table();
+ initialize_VOLS_error_table();
if (argc < 2) {
fprintf (stderr, "Usage is: %s [<code>]+\n", argv[0]);
clean::
$(DEL) $(KPASSWD_EXEFILE)
-
-
+ $(DEL) kauth.cs.c kauth.h kauth.ss.c kauth.xdr.c kautils.h
+ $(DEL) kaerrors.c
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/kauth/admin_tools.c,v 1.1.1.8 2001/09/11 14:32:52 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/kauth/admin_tools.c,v 1.1.1.9 2001/09/20 06:14:54 hartmans Exp $");
#include <afs/stds.h>
#include <afs/debug.h>
char *arock)
{
afs_int32 code;
- struct ktc_principal server;
#ifdef notdef
+ struct ktc_principal server;
+
if (as->parms[0].items) {
char *name = as->parms[0].items->data;
code = ka_ParseLoginName
#include <afs/param.h>
#endif
-RCSID("$Header: /tmp/cvstemp/openafs/src/kauth/authclient.c,v 1.1.1.7 2001/09/11 14:32:52 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/kauth/authclient.c,v 1.1.1.8 2001/09/20 06:14:55 hartmans Exp $");
#if defined(UKERNEL)
#include "../afs/sysincludes.h"
des_key_schedule schedule;
int version;
afs_int32 pwexpires;
- char bob[KA_TIMESTR_LEN];
LOCK_GLOBAL_MUTEX
aticket.SeqLen = auth_token->ticketLen;
#include <afs/param.h>
#endif
-RCSID("$Header: /tmp/cvstemp/openafs/src/kauth/client.c,v 1.1.1.6 2001/09/11 14:32:53 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/kauth/client.c,v 1.1.1.7 2001/09/20 06:14:55 hartmans Exp $");
#if defined(UKERNEL)
#include "../afs/sysincludes.h"
return 0;
}
inited++;
- initialize_u_error_table();
- initialize_ka_error_table();
- initialize_rxk_error_table();
- initialize_ktc_error_table();
- initialize_acfg_error_table();
+ initialize_U_error_table();
+ initialize_KA_error_table();
+ initialize_RXK_error_table();
+ initialize_KTC_error_table();
+ initialize_ACFG_error_table();
code = ka_CellConfig (AFSDIR_CLIENT_ETC_DIRPATH);
UNLOCK_GLOBAL_MUTEX
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/kauth/decode_ticket.c,v 1.1.1.4 2001/07/14 22:22:08 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/kauth/decode_ticket.c,v 1.1.1.5 2001/09/20 06:14:55 hartmans Exp $");
#include <des.h>
#include <afs/com_err.h>
char bob[KA_TIMESTR_LEN];
whoami = argv[0];
- initialize_rxk_error_table();
- initialize_ka_error_table();
+ initialize_RXK_error_table();
+ initialize_KA_error_table();
if (argc != 3) {
printf ("Usage is %s key ticket\n", whoami);
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/kauth/kaauxdb.c,v 1.1.1.4 2001/07/14 22:22:10 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/kauth/kaauxdb.c,v 1.1.1.5 2001/09/20 06:14:56 hartmans Exp $");
#include <fcntl.h>
#ifdef AFS_NT40_ENV
unsigned int nfailures, myshare;
afs_uint32 lasttime;
struct ubik_debug beaconinfo;
- afs_uint32 now;
/* if attempts is 0, that means there's no limit, so the id
* can't ever be locked...
# NOTE: KANOAUTH value is hardcoded in audit/audit.h, so if you make
# changes here, make sure that audit/audit.h is kept up to date.
-error_table ka
+error_table KA
ec KADATABASEINCONSISTENT, "AuthServer database is inconsistent"
ec KAEXIST, "user already exists"
ec KAIO, "Ubik I/O error"
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/kauth/kaprocs.c,v 1.1.1.7 2001/09/11 14:32:56 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/kauth/kaprocs.c,v 1.1.1.8 2001/09/20 06:14:57 hartmans Exp $");
#include <afs/stds.h>
#include <errno.h>
int code;
Date now;
int i;
- int reuse_p;
extern int MinHours;
afs_uint32 newsum;
afs_int32 caller;
afs_int32 tentry_offset; /* offset of entry */
struct kaentry tentry;
- unsigned char newvals[4], oldvals[4];
- int i;
+ unsigned char newvals[4];
COUNT_REQ (SetFields);
struct rx_call *call;
char *name;
EncryptionKey *password;
-{ int code = KANOAUTH;
+{
+ int code = KANOAUTH;
+ COUNT_REQ (GetPassword);
+
+#ifdef GETPASSWORD
+ {
afs_int32 to;
struct ubik_trans *tt;
struct kaentry tentry;
- COUNT_REQ (GetPassword);
-#ifdef GETPASSWORD
if (!name_instance_legal (name, "")) return KABADNAME;
/* only requests from this host work */
if (rx_HostOf(rx_PeerOf(rx_ConnectionOf(call))) != htonl(INADDR_LOOPBACK))
/* this isn't likely to be used because of string to key problems, so since
this is a temporary thing anyway, we'll use it here. */
- { extern char udpAuthPrincipal[256];
+ {
+ extern char udpAuthPrincipal[256];
+
save_principal (udpAuthPrincipal, name, 0, 0);
}
+
get_time (0,0,0); /* update random value */
code = FindBlock(tt, name, "", &to, &tentry);
if (code) goto abort;
memcpy(password, &tentry.key, sizeof (*password));
code = ubik_EndTrans (tt);
+ }
#endif
return code;
}
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/kauth/kas.c,v 1.1.1.4 2001/07/14 22:22:12 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/kauth/kas.c,v 1.1.1.5 2001/09/20 06:14:57 hartmans Exp $");
#include <afs/stds.h>
#ifdef AFS_AIX32_ENV
sigaction(SIGABRT, &nsa, NULL);
sigaction(SIGSEGV, &nsa, NULL);
#endif
- initialize_cmd_error_table();
- initialize_ktc_error_table();
- initialize_ka_error_table();
- initialize_acfg_error_table();
- initialize_u_error_table();
+ initialize_CMD_error_table();
+ initialize_KTC_error_table();
+ initialize_KA_error_table();
+ initialize_ACFG_error_table();
+ initialize_U_error_table();
#ifdef AFS_NT40_ENV
/* initialize winsock */
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/kauth/kaserver.c,v 1.1.1.7 2001/09/11 14:32:56 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/kauth/kaserver.c,v 1.1.1.8 2001/09/20 06:14:58 hartmans Exp $");
#include <afs/stds.h>
#include <sys/types.h>
int npwSums = KA_NPWSUMS; /* needs to be variable sometime */
#include <stdarg.h>
-#if !defined(AFS_NT40_ENV) && !defined(AFS_LINUX20_ENV) && !defined(AFS_DARWIN_ENV) && !defined(AFS_FBSD_ENV)
+#if !defined(AFS_NT40_ENV) && !defined(AFS_LINUX20_ENV) && !defined(AFS_DARWIN_ENV) && !defined(AFS_XBSD_ENV)
#undef vfprintf
#define vfprintf(stream,fmt,args) _doprnt(fmt,args,stream)
#endif
char ticket[MAXKTCTICKETLEN];
};
-#ifndef ERROR_TABLE_BASE_ka
+#ifndef ERROR_TABLE_BASE_KA
#define ka_ErrorString error_message
#undef KAMINERROR
-#define KAMINERROR ERROR_TABLE_BASE_ka
+#define KAMINERROR ERROR_TABLE_BASE_KA
#define KAMAXERROR (KAMINERROR+255)
#endif
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/kauth/klogin.c,v 1.1.1.6 2001/09/11 14:32:58 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/kauth/klogin.c,v 1.1.1.7 2001/09/20 06:15:00 hartmans Exp $");
-#if !defined(AFS_SUN_ENV) && !defined(AFS_AIX_ENV) && !defined(AFS_HPUX_ENV) && !defined(AFS_SGI_ENV) && !defined(AFS_SUN5_ENV) && !defined(AFS_LINUX20_ENV) && !defined(AFS_DARWIN_ENV) &&!defined(AFS_FBSD_ENV)
+#if !defined(AFS_SUN_ENV) && !defined(AFS_AIX_ENV) && !defined(AFS_HPUX_ENV) && !defined(AFS_SGI_ENV) && !defined(AFS_SUN5_ENV) && !defined(AFS_LINUX20_ENV) && !defined(AFS_DARWIN_ENV) && !defined(AFS_XBSD_ENV)
#include <sys/param.h>
#define quota(a,b,c,d) 0
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/kauth/krb_udp.c,v 1.1.1.9 2001/09/11 14:33:00 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/kauth/krb_udp.c,v 1.1.1.10 2001/09/20 06:15:00 hartmans Exp $");
#include <afs/stds.h>
#include <sys/types.h>
static FiveMinuteCheckLWP()
{
- struct timeval time;
printf("start 5 min check lwp\n");
return code;
}
-static err_packet (ksoc, pkt, code, reason)
+static int err_packet (ksoc, pkt, code, reason)
int ksoc;
struct packet *pkt;
afs_int32 code;
3/* nulls */ + (2 * sizeof(afs_int32)) + strlen (buf) + 1;
if (ans.len > sizeof(ans.data)) {
printf ("Answer packet too long\n");
- return;
+ return -1;
}
*answer++ = (unsigned char) KRB_PROT_VERSION;
code, ans.len);
else perror ("err_packet: sendto");
}
+ return 0;
}
+int
process_udp_auth (ksoc, pkt)
int ksoc;
struct packet *pkt;
if ((strlen(realm) > 0) && (strcmp (realm, lrealm) != 0)) {
err_packet (ksoc, pkt, KERB_ERR_NONNULL_REALM,
"null realm name not allowed");
- return;
+ return -1;
}
memcpy(&startTime, packet, sizeof(startTime));
packet += sizeof(startTime);
if (code < 0) {
err_packet (ksoc, pkt, KERB_ERR_BAD_LIFETIME,
"requested ticket lifetime invalid");
- return;
+ return -1;
}
getstr (sname);
getstr (sinst);
if ((packet - pkt->data) != pkt->len) {
err_packet (ksoc, pkt, KERB_ERR_PKT_LENGTH, "packet length inconsistent");
- return;
+ return -1;
}
pkt->rest = packet;
code = UDP_Authenticate (ksoc, &pkt->from, name, inst,
} else
err_packet (ksoc, pkt, code, (char *)error_message (code));
}
- return;
+ return 0;
}
+int
process_udp_appl (ksoc, pkt)
int ksoc;
struct packet *pkt;
authLen = *(unsigned char *)packet++;
if (ticketLen > sizeof(ticket)) {
err_packet (ksoc, pkt, KERB_ERR_TEXT_LENGTH, "ticket too long");
- return;
+ return -1;
}
memcpy(ticket, packet, ticketLen);
packet += ticketLen;
if (authLen > sizeof(auth)) {
err_packet (ksoc, pkt, KERB_ERR_TEXT_LENGTH, "authenticator too long");
- return;
+ return -1;
}
memcpy(auth, packet, authLen);
pkt->rest = packet + authLen;
if (code) {
if (code == KANOENT) code = KERB_ERR_PRINCIPAL_UNKNOWN;
err_packet (ksoc, pkt, code, (char*)error_message (code));
- return;
+ return -1;
}
+ return 0;
}
+void
process_udp_request (ksoc, pkt)
int ksoc;
struct packet *pkt;
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/kauth/rebuild.c,v 1.1.1.7 2001/09/11 14:33:02 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/kauth/rebuild.c,v 1.1.1.8 2001/09/20 06:15:01 hartmans Exp $");
#include <sys/types.h>
#include <sys/stat.h>
int fd;
FILE *out;
+void badEntry();
+
int listuheader, listkheader, listentries, verbose;
int readUbikHeader()
return(0);
}
+void
PrintHeader(header)
struct kaheader *header;
{
printf("stats.cpw commands = %d\n", header->stats.cpws);
}
+void
PrintEntry(index, entry)
afs_int32 index;
struct kaentry *entry;
return(principal);
}
+void
RebuildEntry(entryp)
struct kaentry *entryp;
{
char *arock;
{
afs_int32 code;
- int a;
char *dbFile;
char *outFile;
afs_int32 index;
exit (code != 0);
}
+void
badEntry(e, i)
afs_int32 e, i;
{
char *argv[];
{
struct cmd_syndesc *ts;
- struct cmd_item *ti;
setlinebuf(stdout);
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/kauth/test/test_getticket.c,v 1.1.1.5 2001/09/11 14:33:04 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/kauth/test/test_getticket.c,v 1.1.1.6 2001/09/20 06:15:03 hartmans Exp $");
#include <afs/stds.h>
#include <sys/types.h>
register struct cmd_syndesc *ts;
long code;
- initialize_u_error_table();
- initialize_cmd_error_table();
- initialize_rxk_error_table();
- initialize_ktc_error_table();
- initialize_acfg_error_table();
- initialize_ka_error_table();
+ initialize_U_error_table();
+ initialize_CMD_error_table();
+ initialize_RXK_error_table();
+ initialize_KTC_error_table();
+ initialize_ACFG_error_table();
+ initialize_KA_error_table();
ts = cmd_CreateSyntax (0, Main, 0, "Main program");
/* 0 */ cmd_AddParm (ts, "-patient", CMD_FLAG, CMD_OPTIONAL,
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/kauth/test/test_interim_ktc.c,v 1.1.1.5 2001/09/11 14:33:05 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/kauth/test/test_interim_ktc.c,v 1.1.1.6 2001/09/20 06:15:03 hartmans Exp $");
#include <afs/stds.h>
#include <afs/com_err.h>
srandom (1);
/* Initialize com_err error code hacking */
- initialize_u_error_table();
- initialize_ka_error_table();
- initialize_rxk_error_table();
- initialize_ktc_error_table();
- initialize_acfg_error_table();
+ initialize_U_error_table();
+ initialize_KA_error_table();
+ initialize_RXK_error_table();
+ initialize_KTC_error_table();
+ initialize_ACFG_error_table();
/* set defaults */
strcpy (cell, "");
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/kauth/test/test_rxkad_free.c,v 1.1.1.5 2001/09/11 14:33:05 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/kauth/test/test_rxkad_free.c,v 1.1.1.6 2001/09/20 06:15:03 hartmans Exp $");
#include <afs/stds.h>
#include <sys/types.h>
register struct cmd_syndesc *ts;
long code;
- initialize_u_error_table();
- initialize_cmd_error_table();
- initialize_rxk_error_table();
- initialize_ktc_error_table();
- initialize_acfg_error_table();
- initialize_ka_error_table();
+ initialize_U_error_table();
+ initialize_CMD_error_table();
+ initialize_RXK_error_table();
+ initialize_KTC_error_table();
+ initialize_ACFG_error_table();
+ initialize_KA_error_table();
ts = cmd_CreateSyntax (0, Main, 0, "Main program");
/* 0 */ cmd_AddParm (ts, "-number", CMD_SINGLE, CMD_OPTIONAL,
#include <afs/param.h>
#endif
-RCSID("$Header: /tmp/cvstemp/openafs/src/kauth/token.c,v 1.1.1.4 2001/07/14 22:22:17 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/kauth/token.c,v 1.1.1.5 2001/09/20 06:15:01 hartmans Exp $");
#if defined(UKERNEL)
#include "../afs/sysincludes.h"
afs_int32 now = time(0);
struct ktc_token token;
char cellname[MAXKTCREALMLEN];
- char realm[MAXKTCREALMLEN];
- struct ktc_principal client, server;
afs_int32 pwexpires;
LOCK_GLOBAL_MUTEX
#include <afs/param.h>
#endif
-RCSID("$Header: /tmp/cvstemp/openafs/src/kauth/user.c,v 1.1.1.7 2001/09/11 14:33:02 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/kauth/user.c,v 1.1.1.8 2001/09/20 06:15:02 hartmans Exp $");
#if defined(UKERNEL)
#include "../afs/sysincludes.h"
}
#endif
-#if !defined(AFS_NT40_ENV) && !defined(AFS_LINUX20_ENV) && !defined(AFS_USR_LINUX20_ENV) && !defined(AFS_FBSD_ENV)
+#if !defined(AFS_NT40_ENV) && !defined(AFS_LINUX20_ENV) && !defined(AFS_USR_LINUX20_ENV) && !defined(AFS_XBSD_ENV)
/* handle smoothly the case where no AFS system calls exists (yet) */
old = (int (*)())signal(SIGSYS, SIG_IGN);
#endif
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/libacl/aclprocs.c,v 1.1.1.6 2001/09/11 14:33:06 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/libacl/aclprocs.c,v 1.1.1.7 2001/09/20 06:15:05 hartmans Exp $");
#include <sys/types.h>
#ifdef AFS_NT40_ENV
register char *nextc;
register afs_int32 code;
int p,n;
- char tbuf[PR_MAXNAMELEN+1];
namelist lnames;
idlist lids;
#ifdef AFS_PTHREAD_ENV
assert(pthread_mutex_init(&acl_list_mutex, NULL) == 0);
#endif /* AFS_PTHREAD_ENV */
+ return 0;
}
int acl_IsAMember(aid,cps)
# License. For details, see the LICENSE file in the top-level source
# directory or online at http://www.openafs.org/dl/license10.html
-error_table ab
+error_table AB
ec ADMBOSSERVERNAMENULL, "the bos server name cannot be NULL"
ec ADMBOSSERVERHANDLEPNULL, "the bos server handle cannot be NULL"
ec ADMBOSSERVERHANDLENULL, "the bos server handle cannot be NULL"
# License. For details, see the LICENSE file in the top-level source
# directory or online at http://www.openafs.org/dl/license10.html
-error_table af
+error_table AF
ec ADMCFGNOTSUPPORTED, "the specified configuration option is not yet supported"
ec ADMCFGHOSTNAMENULL, "the host name parameter cannot be NULL"
ec ADMCFGHOSTNAMETOOLONG, "the host name parameter exceeds the maximum allowed length"
# License. For details, see the LICENSE file in the top-level source
# directory or online at http://www.openafs.org/dl/license10.html
-error_table al
+error_table AL
ec ADMCLIENTCELLHANDLENULL, "the cell handle parameter cannot be NULL"
ec ADMCLIENTCELLHANDLEPNULL, "the cell handle reference parameter cannot be NULL"
ec ADMCLIENTCELLHANDLEBADMAGIC, "the server handle parameter failed to pass the magic number test. Most likely the server handle is invalid, or has been overwritten by mistake."
# License. For details, see the LICENSE file in the top-level source
# directory or online at http://www.openafs.org/dl/license10.html
-error_table ac
+error_table AC
ec ADMNOMEM, "couldn't allocate memory necessary to fulfill request"
ec ADMNOPRIV, "insufficient privilege to complete operation"
ec ADMMUTEXINIT, "failed to initialize a mutex"
# License. For details, see the LICENSE file in the top-level source
# directory or online at http://www.openafs.org/dl/license10.html
-error_table ak
+error_table AK
ec ADMKASSERVERHANDLENULL, "the server handle parameter cannot be NULL"
ec ADMKASSERVERHANDLEBADMAGIC, "the server handle parameter failed to pass the magic number test. Most likely the server handle is invalid, or has been overwritten by mistake."
ec ADMKASSERVERHANDLENOTVALID, "the server handle parameter is marked invalid"
# License. For details, see the LICENSE file in the top-level source
# directory or online at http://www.openafs.org/dl/license10.html
-error_table am
+error_table AM
ec ADMMISCDIRECTORYNULL, "the directory parameter cannot be NULL."
ec ADMMISCUSERNULL, "the user parameter cannot be NULL."
ec ADMMISCACLNULL, "the acl parameter cannot be NULL."
# License. For details, see the LICENSE file in the top-level source
# directory or online at http://www.openafs.org/dl/license10.html
-error_table ap
+error_table AP
ec ADMPTSSERVERNULL, "the protection server parameter cannot be NULL"
ec ADMPTSUSERNAMENULL, "the user name parameter cannot be NULL"
ec ADMPTSUSERNAMETOOLONG, "the user name parameter is too long"
# License. For details, see the LICENSE file in the top-level source
# directory or online at http://www.openafs.org/dl/license10.html
-error_table au
+error_table AU
ec ADMUTILSERVERENTRYPNULL, "the server entry parameter cannot be NULL"
ec ADMUTILSERVERNAMENULL, "the server name parameter cannot be NULL"
ec ADMUTILSERVERADDRESSNULL, "the server address parameter cannot be NULL"
# License. For details, see the LICENSE file in the top-level source
# directory or online at http://www.openafs.org/dl/license10.html
-error_table av
+error_table AV
ec ADMVOSSERVERNULL, "the volume server parameter cannot be NULL"
ec ADMVOSCELLHANDLENULL, "the cell handle parameter cannot be NULL"
ec ADMVOSCELLHANDLEBADMAGIC, "the cell handle parameter failed to pass the magic number test. Most likely the cell handle is invalid, or has been overwritten by mistake."
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/adminutil/afs_utilAdmin.c,v 1.1.1.5 2001/07/14 22:22:23 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/adminutil/afs_utilAdmin.c,v 1.1.1.6 2001/09/20 06:15:11 hartmans Exp $");
#include <afs/stds.h>
#include <afs/afs_Admin.h>
static void init_once(void) {
- initialize_ka_error_table();
- initialize_rxk_error_table();
- initialize_ktc_error_table();
- initialize_acfg_error_table();
- initialize_cmd_error_table();
- initialize_vl_error_table();
- initialize_pt_error_table();
- initialize_bz_error_table();
- initialize_u_error_table();
- initialize_ab_error_table();
- initialize_af_error_table();
- initialize_al_error_table();
- initialize_ac_error_table();
- initialize_ak_error_table();
- initialize_am_error_table();
- initialize_ap_error_table();
- initialize_au_error_table();
- initialize_av_error_table();
- initialize_vols_error_table();
+ initialize_KA_error_table();
+ initialize_RXK_error_table();
+ initialize_KTC_error_table();
+ initialize_ACFG_error_table();
+ initialize_CMD_error_table();
+ initialize_VL_error_table();
+ initialize_PT_error_table();
+ initialize_BZ_error_table();
+ initialize_U_error_table();
+ initialize_AB_error_table();
+ initialize_AF_error_table();
+ initialize_AL_error_table();
+ initialize_AC_error_table();
+ initialize_AK_error_table();
+ initialize_AM_error_table();
+ initialize_AP_error_table();
+ initialize_AU_error_table();
+ initialize_AV_error_table();
+ initialize_VOLS_error_table();
error_init_done = 1;
}
#/* Copyright (C) 1995, 1989 Transarc Corporation - All rights reserved */
-# $Header: /tmp/cvstemp/openafs/src/libafs/MakefileProto.DARWIN.in,v 1.1.1.2 2001/09/11 14:33:26 hartmans Exp $
+# $Header: /tmp/cvstemp/openafs/src/libafs/MakefileProto.DARWIN.in,v 1.1.1.3 2001/09/20 06:15:23 hartmans Exp $
#
# MakefileProto for Digital Unix systems
#
afssrvlibexecdir=@afssrvlibexecdir@
afskerneldir=@afskerneldir@
SYS_NAME=@AFS_SYSNAME@
+DARWIN_INFOFILE=../@DARWIN_INFOFILE@
include config/Makefile.${SYS_NAME}
LIBAFS = libafs.o
LIBAFSNONFS = libafs.nonfs.o
-INST_LIBAFS = ${DESTDIR}${afskerneldir}/afs-nfs
-INST_LIBAFSNONFS = ${DESTDIR}${afskerneldir}/afs
-DEST_LIBAFS = ${DEST}/root.client/usr/vice/etc/afs.kext/Contents/MacOS/afs-nfs
-DEST_LIBAFSNONFS = ${DEST}/root.client/usr/vice/etc/afs.kext/Contents/MacOS/afs
+INST_LIBAFS = ${DESTDIR}${afskerneldir}/afs-nfs.kext
+INST_LIBAFSNONFS = ${DESTDIR}${afskerneldir}/afs.kext
+DEST_LIBAFS = ${DEST}/root.client/usr/vice/etc/afs-nfs.kext
+DEST_LIBAFSNONFS = ${DEST}/root.client/usr/vice/etc/afs.kext
libafs: $(LIBAFSNONFS) ;
-install_libafs: $(INST_LIBAFSNONFS) ;
-dest_libafs: $(DEST_LIBAFSNONFS) ;
+install_libafs: $(LIBAFSNONFS) ;
+ -mkdir -p ${INST_LIBAFSNONFS}
+ -mkdir -p ${INST_LIBAFSNONFS}/Contents
+ $(INSTALL) -f ${DARWIN_INFOFILE} ${INST_LIBAFSNONFS}/Contents/Info.plist
+ -mkdir -p ${INST_LIBAFSNONFS}/Contents/MacOS
+ $(INSTALL) -f ${LIBAFSNONFS} ${INST_LIBAFSNONFS}/Contents/MacOS/afs
+
+dest_libafs: $(LIBAFSNONFS) ;
+ -mkdir -p ${DEST_LIBAFSNONFS}
+ -mkdir -p ${DEST_LIBAFSNONFS}/Contents
+ $(INSTALL) -f ${DARWIN_INFOFILE} ${DEST_LIBAFSNONFS}/Contents/Info.plist
+ -mkdir -p ${DEST_LIBAFSNONFS}/Contents/MacOS
+ $(INSTALL) -f ${LIBAFSNONFS} ${DEST_LIBAFSNONFS}/Contents/MacOS/afs
-$(INST_LIBAFS): $(LIBAFS)
- $(INSTALL) -f $? $@
-
-$(INST_LIBAFSNONFS): $(LIBAFSNONFS)
- $(INSTALL) -f $? $@
-
-$(DEST_LIBAFS): $(LIBAFS)
- $(INSTALL) -f $? $@
-
-$(DEST_LIBAFSNONFS): $(LIBAFSNONFS)
- $(INSTALL) -f $? $@
-
${LIBAFS}: $(AFSAOBJS) $(AFSNFSOBJS)
$(LD) -r -o ${LIBAFS} ${AFSAOBJS} ${AFSNFSOBJS}
alpha_osf1 | alpha_osf20 | alpha_osf30 | alpha_osf32 | alpha_osf32c | alpha_dux?? ) \
${AS} -v -P -DOSF -I${TOP_INCDIR} -DASSEMBLER process.s; \
${AS} -v process.i -o process.o;; \
+ *_obsd* ) \
+ cp process.s process.S ; \
+ ${CC} -E -I${TOP_INCDIR} process.S >process.ss ; \
+ ${AS} process.ss -o process.o ; \
+ $(RM) -f process.S ;;\
hp_ux110 ) \
${CC} ${CFLAGS} -c process.c;; \
*) \
#include <sys/asm_linkage.h>
#include <sys/trap.h>
#else
+#ifdef AFS_XBSD_ENV
+#include <machine/trap.h>
+#define ST_FLUSH_WINDOWS ST_FLUSHWIN
+#define MINFRAME 92
+#define SA(x) (((x)+7)&~7)
+#define STACK_ALIGN 8
+#else /* SunOS 4: */
#include <sun4/asm_linkage.h>
#include <sun4/trap.h>
+#endif
#endif
.data
#ifdef AFS_SUN5_ENV
END(returnto)
#endif
-#if defined(AFS_NCR_ENV) || defined(AFS_X86_ENV) || defined(AFS_DJGPP_ENV)
+#if defined(AFS_NCR_ENV) || defined(AFS_X86_ENV) || defined(AFS_DJGPP_ENV) || defined(AFS_XBSD_ENV)
/* Sun 386i... I hope this does the right thing!!!
*
* Written by Derek Atkins <warlord@MIT.EDU>
.set newsp,16
-#ifdef AFS_DJGPP_ENV
+#if defined(AFS_DJGPP_ENV) || defined(AFS_XBSD_ENV)
.globl _PRE_Block
.globl _savecontext
_savecontext:
pushl %ebp /* New Frame! */
movl %esp,%ebp
pusha /* Push all registers */
-#ifdef AFS_DJGPP_ENV
+#if defined(AFS_DJGPP_ENV) || defined(AFS_XBSD_ENV)
movl $1,_PRE_Block /* Pre-emption code */
#else
movl $1,PRE_Block /* Pre-emption code */
/* Shouldnt be here....*/
-#ifdef AFS_DJGPP_ENV
+#if defined(AFS_DJGPP_ENV) || defined(AFS_XBSD_ENV)
call _abort
#else
call abort
/* stack offset */
.set area2,8
-#ifdef AFS_DJGPP_ENV
+#if defined(AFS_DJGPP_ENV) || defined(AFS_XBSD_ENV)
.globl _returnto
_returnto:
#else
movl area2(%ebp),%eax /* eax = area2 */
movl (%eax),%esp /* restore esp */
popa
-#ifdef AFS_DJGPP_ENV
+#if defined(AFS_DJGPP_ENV) || defined(AFS_XBSD_ENV)
movl $0,_PRE_Block /* clear it up... */
#else
movl $0,PRE_Block /* clear it up... */
/* I see, said the blind man, as he picked up his hammer and saw! */
pushl $1234
-#ifdef AFS_DJGPP_ENV
+#if defined(AFS_DJGPP_ENV) || defined(AFS_XBSD_ENV)
call _abort
#else
call abort
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/lwp/waitkey.c,v 1.1.1.8 2001/09/11 14:33:41 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/lwp/waitkey.c,v 1.1.1.9 2001/09/20 06:15:32 hartmans Exp $");
#include <stdio.h>
#include <sys/types.h>
if (stdin->_IO_read_ptr < stdin->_IO_read_end)
return 1;
#else
-#if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
+#if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
if (stdin->_bf._size > 0)
return 1;
#else
/*
* Set up the appropriate error tables.
*/
- initialize_cmd_error_table();
+ initialize_CMD_error_table();
/*
* Parse command line switches & execute the command, then get the
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/pinstall/install.c,v 1.1.1.6 2001/09/11 14:34:03 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/pinstall/install.c,v 1.1.1.7 2001/09/20 06:15:51 hartmans Exp $");
#include <stdio.h>
#include <pwd.h>
#if !defined(AFS_LINUX20_ENV) && !defined(AFS_DARWIN_ENV) && !defined(AFS_FBSD_ENV)
extern char *sys_errlist[];
#endif
-#if defined(AFS_AIX_ENV) || defined(AFS_HPUX_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_DECOSF_ENV) || defined(AFS_SGI_ENV) || defined(AFS_LINUX20_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
+#if defined(AFS_AIX_ENV) || defined(AFS_HPUX_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_DECOSF_ENV) || defined(AFS_SGI_ENV) || defined(AFS_LINUX20_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
extern struct passwd *getpwnam();
int stripcalled = 0;
#endif
return value;
}
-#if defined(AFS_HPUX_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_DECOSF_ENV) || defined(AFS_SGI_ENV) || defined(AFS_LINUX20_ENV) || defined(AFS_DARWIN_ENV)
+#if defined(AFS_HPUX_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_DECOSF_ENV) || defined(AFS_SGI_ENV) || defined(AFS_LINUX20_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_OBSD_ENV)
/*
* Implementation lifted from that for AIX 3.1, since there didn't seem to be any
* reason why it wouldn't work.
return -1;
}
+#ifndef AFS_OBSD_ENV
/*
* done the copy, now strip if desired.
*/
return -1;
}
}
+#endif
return status;
}
#endif /* AFS_HPUX_ENV */
char pnametmp[1024];
int pnamelen;
-#if defined (AFS_AIX_ENV) || defined(AFS_FBSD_ENV)
+#if defined (AFS_AIX_ENV) || defined(AFS_XBSD_ENV)
afs_int32 newcode;
static char diskBuffer[BUFSIZE]; /* must be static to avoid compiler bugs for large stuff */
#endif
continue;
}
}
-#if defined(AFS_AIX_ENV) || defined(AFS_HPUX_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_DECOSF_ENV) || defined(AFS_SGI_ENV) || defined(AFS_LINUX20_ENV) || defined(AFS_DARWIN_ENV)
+#if defined(AFS_AIX_ENV) || defined(AFS_HPUX_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_DECOSF_ENV) || defined(AFS_SGI_ENV) || defined(AFS_LINUX20_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_OBSD_ENV)
stripcalled = 0;
if (strip == 1 ||
((strip == -1 && ((istat.st_mode & 0111) == 0111) && stripName(newNames[i])) && AIXobject(fnames[i])))
prerror.h: pterror.h
${INSTALL} $? $@
- echo '#define ERROR_TABLE_BASE_pr ERROR_TABLE_BASE_pt' >> $@
+ echo '#define ERROR_TABLE_BASE_pr ERROR_TABLE_BASE_PT' >> $@
#
# Installation targets
ptprocs.obj \
utils.obj \
ptserver.res
-
+
PTSERVER_EXELIBS =\
$(DESTDIR)\lib\afsubik.lib \
$(INCFILEDIR)\afs\prclient.h: $(INCFILEDIR)\afs\ptclient.h
$(COPY) $(INCFILEDIR)\afs\ptclient.h $(INCFILEDIR)\afs\prclient.h
- $(ECHO) #define ERROR_TABLE_BASE_pr ERROR_TABLE_BASE_pt >> $(INCFILEDIR)\afs\prclient.h
+ $(ECHO) #define ERROR_TABLE_BASE_pr ERROR_TABLE_BASE_PT >> $(INCFILEDIR)\afs\prclient.h
############################################################################
# clean up
readgroup.exe: readgroup.obj $(LIBFILE) $(TEST_LIBS)
$(EXECONLINK)
-
+
readpwd.exe: readpwd.obj $(LIBFILE) $(TEST_LIBS)
$(EXECONLINK)
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/ptserver/db_verify.c,v 1.1.1.6 2001/09/11 14:34:06 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/ptserver/db_verify.c,v 1.1.1.7 2001/09/20 06:15:55 hartmans Exp $");
#include <afs/stds.h>
#include <sys/types.h>
struct prentry *e;
int indent;
{
- int i;
pr_PrintEntry (stderr, /*net order*/0, ea, e, indent);
return 0;
char *recreateFile;
struct misc_data misc; /* info & statistics */
- int a;
- char arg[100];
-
- initialize_pt_error_table();
- initialize_u_error_table();
+ initialize_PT_error_table();
+ initialize_U_error_table();
pr_dbaseName = AFSDIR_SERVER_PRDB_FILEPATH;
memset(&misc, 0, sizeof(misc));
char *argv[];
{
struct cmd_syndesc *ts;
- struct cmd_item *ti;
setlinebuf(stdout);
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/ptserver/display.c,v 1.1.1.4 2001/07/14 22:23:17 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/ptserver/display.c,v 1.1.1.5 2001/09/20 06:15:55 hartmans Exp $");
#include <afs/stds.h>
#include <sys/types.h>
{ struct tm *tm;
static char buffer[32];
static int this_year = 0;
- char year[6];
if (clock == 0) return "time-not-set ";
if (!this_year) {
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/ptserver/ptclient.c,v 1.1.1.5 2001/09/11 14:34:06 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/ptserver/ptclient.c,v 1.1.1.6 2001/09/20 06:15:56 hartmans Exp $");
#ifdef AFS_AIX32_ENV
#include <signal.h>
#endif
whoami = argv[0];
- initialize_pt_error_table();
+ initialize_PT_error_table();
strcpy(confdir, AFSDIR_CLIENT_ETC_DIRPATH);
cell = 0;
# NOTE: PRPERM value is hardcoded in audit/audit.h, so if you make
# changes here, make sure that audit/audit.h is kept up to date.
-error_table pt
+error_table PT
ec PREXIST, "Entry for name already exists"
ec PRIDEXIST, "Entry for id already exists"
ec PRNOIDS, "Couldn't allocate an id for this entry"
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/ptserver/ptprocs.c,v 1.1.1.6 2001/09/11 14:34:07 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/ptserver/ptprocs.c,v 1.1.1.7 2001/09/20 06:15:56 hartmans Exp $");
#include <afs/stds.h>
#include <ctype.h>
afs_int32 code;
struct ubik_trans *tt;
afs_int32 cid;
- afs_int32 temp, i, eof, pos, maxentries, f;
+ afs_int32 i, eof, pos, maxentries, f;
struct prentry tentry;
afs_int32 pollcount=0;
#include <afs/param.h>
#endif
-RCSID("$Header: /tmp/cvstemp/openafs/src/ptserver/ptuser.c,v 1.1.1.6 2001/09/11 14:34:08 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/ptserver/ptuser.c,v 1.1.1.7 2001/09/20 06:15:57 hartmans Exp $");
#if defined(UKERNEL)
#include "../afs/sysincludes.h"
afs_int32 i;
char cellstr[64];
- initialize_pt_error_table();
- initialize_rxk_error_table();
- initialize_acfg_error_table();
- initialize_ktc_error_table();
-/*
- initialize_lwp_error_table();
- initialize_rx_error_table();
-*/
+ initialize_PT_error_table();
+ initialize_RXK_error_table();
+ initialize_ACFG_error_table();
+ initialize_KTC_error_table();
if (strcmp(confDir, tconfDir)) {
/*
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/ptserver/readgroup.c,v 1.1.1.5 2001/09/11 14:34:09 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/ptserver/readgroup.c,v 1.1.1.6 2001/09/20 06:15:58 hartmans Exp $");
#include <stdio.h>
#ifndef AFS_NT40_ENV
#include "pterror.h"
int verbose = 0;
+void skip();
+void
report_error (code, name, gname)
afs_int32 code;
char *name;
char buf[3000];
FILE *fp;
char *ptr;
- char *aptr;
char *tmp;
char *cellname;
namelist lnames;
}
}
+void
skip(s)
char **s;
{
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/ptserver/testpt.c,v 1.1.1.6 2001/09/11 14:34:10 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/ptserver/testpt.c,v 1.1.1.7 2001/09/20 06:15:58 hartmans Exp $");
#include <ctype.h>
#include <errno.h>
struct cmd_syndesc *ts; /* ptr to parsed command line syntax */
whoami = argv[0];
- initialize_cmd_error_table();
- initialize_acfg_error_table();
- initialize_ktc_error_table();
- initialize_u_error_table();
- initialize_pt_error_table();
- initialize_rxk_error_table();
+ initialize_CMD_error_table();
+ initialize_ACFG_error_table();
+ initialize_KTC_error_table();
+ initialize_U_error_table();
+ initialize_PT_error_table();
+ initialize_RXK_error_table();
#ifdef AFS_NT40_ENV
/* initialize winsock */
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/ptserver/utils.c,v 1.1.1.6 2001/09/11 14:34:10 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/ptserver/utils.c,v 1.1.1.7 2001/09/20 06:15:59 hartmans Exp $");
#include <sys/types.h>
#include <lock.h>
char aname[PR_MAXNAMELEN];
afs_int32 *aid;
{
- register afs_int32 code;
afs_int32 temp;
struct prentry tentry;
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/rx/rx_getaddr.c,v 1.1.1.6 2001/07/14 22:23:28 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/rx/rx_getaddr.c,v 1.1.1.7 2001/09/20 06:16:03 hartmans Exp $");
#ifndef AFS_DJGPP_ENV
#ifndef KERNEL
#include <net/if.h>
#include <netinet/in.h>
#include <sys/ioctl.h>
-#if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
+#if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
#include <sys/sysctl.h>
#include <net/route.h>
#include <net/if_dl.h>
#undef socket
#endif /* UKERNEL */
-#if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
+#if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
#define ROUNDUP(a) \
((a) > 0 ? (1 + (((a) - 1) | (sizeof(long) - 1))) : sizeof(long))
#define ADVANCE(x, n) (x += ROUNDUP((n)->sa_len))
/* this function returns the total number of interface addresses
** the buffer has to be passed in by the caller
*/
-#if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
+#if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
int rx_getAllAddr (buffer,maxSize)
afs_int32 buffer[];
int maxSize; /* sizeof of buffer in afs_int32 units */
len = ifc.ifc_len / sizeof(struct ifreq);
if (len > NIFS)
len = NIFS;
-#if defined(AFS_AIX41_ENV) || defined (AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
+#if defined(AFS_AIX41_ENV) || defined (AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
if ( ifc.ifc_len > sizeof(ifs) ) /* safety check */
ifc.ifc_len = sizeof(ifs);
for ( cp = (char *)ifc.ifc_buf,
cplim= ifc.ifc_buf+ifc.ifc_len;
cp < cplim;
-#if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
+#if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
cp += _SIZEOF_ADDR_IFREQ(*ifr))
#else
cp += sizeof(ifr->ifr_name) + MAX(a->sin_len, sizeof(*a)))
#include <afsconfig.h>
#include "../afs/param.h"
-RCSID("$Header: /tmp/cvstemp/openafs/src/rx/rx_kcommon.c,v 1.1.1.7 2001/09/11 14:34:17 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/rx/rx_kcommon.c,v 1.1.1.8 2001/09/20 06:16:03 hartmans Exp $");
#include "../rx/rx_kcommon.h"
*/
-#if ! defined(AFS_AIX_ENV) && ! defined(AFS_SUN5_ENV) && ! defined(UKERNEL) && ! defined(AFS_LINUX20_ENV) && !defined (AFS_DARWIN_ENV) && !defined (AFS_FBSD_ENV)
+#if ! defined(AFS_AIX_ENV) && ! defined(AFS_SUN5_ENV) && ! defined(UKERNEL) && ! defined(AFS_LINUX20_ENV) && !defined (AFS_DARWIN_ENV) && !defined (AFS_XBSD_ENV)
/* Routine called during the afsd "-shutdown" process to put things back to
* the initial state.
*/
#else /* AFS_USERSPACE_IP_ADDR */
-#if !defined(AFS_AIX41_ENV) && !defined(AFS_DUX40_ENV) && !defined(AFS_DARWIN_ENV) && !defined(AFS_FBSD_ENV)
+#if !defined(AFS_AIX41_ENV) && !defined(AFS_DUX40_ENV) && !defined(AFS_DARWIN_ENV) && !defined(AFS_XBSD_ENV)
#define IFADDR2SA(f) (&((f)->ifa_addr))
#else /* AFS_AIX41_ENV */
#define IFADDR2SA(f) ((f)->ifa_addr)
memset(addrs, 0, sizeof(addrs));
memset(mtus, 0, sizeof(mtus));
-#if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
+#if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
TAILQ_FOREACH(ifn, &ifnet, if_link) {
if (i >= ADDRSPERSITE) break;
#else
for (ifn = ifnet; ifn != NULL && i < ADDRSPERSITE; ifn = ifn->if_next) {
#endif
rxmtu = (ifn->if_mtu - RX_IPUDP_SIZE);
-#if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
+#if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
TAILQ_FOREACH(ifad, &ifn->if_addrhead, ifa_link) {
if (i >= ADDRSPERSITE) break;
#else
/* if we're given an address, skip everything until we find it */
if (!*pifad)
-#if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
+#if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
*pifad = TAILQ_FIRST(&in_ifaddrhead);
#else
*pifad = in_ifaddr;
else {
if (((ppaddr & (*pifad)->ia_subnetmask) == (*pifad)->ia_subnet))
match_value = 2; /* don't find matching nets, just subnets */
-#if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
+#if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
*pifad = TAILQ_NEXT(*pifad, ia_link);
#else
*pifad = (*pifad)->ia_next;
#endif
}
-#if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
+#if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
for (ifa = *pifad; ifa; ifa = TAILQ_NEXT(ifa, ia_link) ) {
#else
for (ifa = *pifad; ifa; ifa = ifa->ia_next ) {
#endif
AFS_STATCNT(osi_NewSocket);
-#if (defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)) && defined(KERNEL_FUNNEL)
+#if (defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)) && defined(KERNEL_FUNNEL)
thread_funnel_switch(KERNEL_FUNNEL, NETWORK_FUNNEL);
#endif
#if defined(AFS_HPUX102_ENV)
#else
#ifdef AFS_SGI65_ENV
code = socreate(AF_INET, &newSocket, SOCK_DGRAM,IPPROTO_UDP);
-#elif defined(AFS_FBSD_ENV)
+#elif defined(AFS_XBSD_ENV)
code = socreate(AF_INET, &newSocket, SOCK_DGRAM,IPPROTO_UDP, curproc);
#else
code = socreate(AF_INET, &newSocket, SOCK_DGRAM, 0);
if (code)
osi_Panic("osi_NewSocket: last attempt to reserve 32K failed!\n");
}
-#if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
+#if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
myaddr.sin_len = sizeof(myaddr);
-#if defined(AFS_FBSD_ENV)
+#if defined(AFS_XBSD_ENV)
code = sobind(newSocket, (struct sockaddr *)&myaddr, curproc);
#else
code = sobind(newSocket, (struct sockaddr *)&myaddr);
nam = m_get(M_WAIT, MT_SONAME);
#endif
if (nam == NULL) {
-#if !defined(AFS_SUN5_ENV) && !defined(AFS_OSF_ENV) && !defined(AFS_SGI64_ENV) && !defined(AFS_FBSD_ENV)
+#if !defined(AFS_SUN5_ENV) && !defined(AFS_OSF_ENV) && !defined(AFS_SGI64_ENV) && !defined(AFS_XBSD_ENV)
setuerror(ENOBUFS);
#endif
goto bad;
BHV_PDATA(&bhv) = (void*)newSocket;
code = sobind(&bhv, nam);
m_freem(nam);
-#elif defined(AFS_FBSD_ENV)
+#elif defined(AFS_XBSD_ENV)
code = sobind(newSocket, nam, curproc);
#else
code = sobind(newSocket, nam);
#ifdef AFS_SUN5_ENV
rxk_ListenerPid = ttoproc(curthread)->p_pidp->pid_id;
#endif /* AFS_SUN5_ENV */
-#if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
+#if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
rxk_ListenerPid = current_proc()->p_pid;
#endif
#if defined(RX_ENABLE_LOCKS) && !defined(AFS_SUN5_ENV)
#endif /* AFS_SUN5_ENV */
}
-#if !defined(AFS_LINUX20_ENV) && !defined(AFS_SUN5_ENV) && !defined(AFS_DARWIN_ENV) && !defined(AFS_FBSD_ENV)
+#if !defined(AFS_LINUX20_ENV) && !defined(AFS_SUN5_ENV) && !defined(AFS_DARWIN_ENV) && !defined(AFS_XBSD_ENV)
/* The manner of stopping the rx listener thread may vary. Most unix's should
* be able to call soclose.
*/
#ifndef AFS_LINUX22_ENV
#include "../h/socketvar.h"
#include "../h/protosw.h"
-#if !defined(AFS_SUN5_ENV) && !defined(AFS_FBSD_ENV)
+#if !defined(AFS_SUN5_ENV) && !defined(AFS_XBSD_ENV)
#include "../h/domain.h"
#include "../h/dir.h"
#include "../h/buf.h"
#include "../h/mbuf.h"
#else
-#if defined(AFS_FBSD_ENV)
+#if defined(AFS_XBSD_ENV)
#include "../h/dirent.h"
#include "../h/socket.h"
#include "../h/domain.h"
#include "../h/buf.h"
#include "../h/mbuf.h"
-#endif /* AFS_FBSD_ENV */
+#endif /* AFS_XBSD_ENV */
#endif
#endif /* AFS_LINUX22_ENV */
#ifdef AFS_SGI62_ENV
extern int rxk_initDone;
-#if defined(AFS_FBSD_ENV)
+#if defined(AFS_XBSD_ENV)
extern struct domain inetdomain;
-#endif /* AFS_FBSD_ENV */
+#endif /* AFS_XBSD_ENV */
#endif /* _RX_KCOMMON_H_ */
#define MAX(a,b) ((a)>(b)?(a):(b))
#endif
#else /* AFS_NT40_ENV */
-#if !defined(AFS_DARWIN_ENV) && !defined(AFS_USR_DARWIN_ENV) && !defined(AFS_FBSD_ENV) && !defined(AFS_USR_FBSD_ENV)
+#if !defined(AFS_DARWIN_ENV) && !defined(AFS_USR_DARWIN_ENV) && !defined(AFS_XBSD_ENV) && !defined(AFS_USR_FBSD_ENV)
#include <sys/sysmacros.h> /* MIN, MAX on Solaris */
#endif
#include <sys/param.h> /* MIN, MAX elsewhere */
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/rx/rx_pthread.c,v 1.1.1.6 2001/07/14 22:23:34 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/rx/rx_pthread.c,v 1.1.1.7 2001/09/20 06:16:06 hartmans Exp $");
#include <sys/types.h>
#include <errno.h>
u_long host;
u_short port;
register struct rx_packet *p = (struct rx_packet *)0;
- unsigned long rfds;
- register unsigned long rrfds;
- struct clock cv;
- long nextPollTime; /* time to next poll FD before sleeping */
- int lastPollWorked, doingPoll; /* true iff last poll was useful */
- struct timeval tv, *tvp;
assert(pthread_mutex_lock(&listener_mutex)==0);
while (!listeners_started) {
exit(1);
}
AFS_SIGSET_RESTORE();
+ return 0;
}
printf("rxi_sendmsg failed, error %d\n", errno);
fflush(stdout);
}
+ return 0;
}
#include <afs/param.h>
#endif
-RCSID("$Header: /tmp/cvstemp/openafs/src/rx/rx_rdwr.c,v 1.1.1.8 2001/09/11 14:34:22 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/rx/rx_rdwr.c,v 1.1.1.9 2001/09/20 06:16:06 hartmans Exp $");
#ifdef KERNEL
#ifndef UKERNEL
-#if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
+#if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
#include "../afs/sysincludes.h"
#else
#include "../h/types.h"
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/rx/test/generator.c,v 1.1.1.5 2001/07/14 22:23:46 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/rx/test/generator.c,v 1.1.1.6 2001/09/20 06:16:15 hartmans Exp $");
#include <stdio.h>
#include <string.h>
fprintf(itl_h,
"int main (int argc, char *argv[]) {\n"
"\tint code;\n\n"
- "\tinitialize_cmd_error_table();\n"
+ "\tinitialize_CMD_error_table();\n"
"\tSetupRunCmd();\n"
"\tcode = cmd_Dispatch(argc, argv);\n\n"
"\treturn(code);\n"
"int main(int argc, char **argv) {\n"
"\tint code;\n"
- "\tinitialize_cmd_error_table();\n"
+ "\tinitialize_CMD_error_table();\n"
"\tSetupRunCmd();\n"
"\tcode = cmd_Dispatch(argc, argv);\n"
"\treturn(code);\n"
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/rxgen/rpc_main.c,v 1.1.1.7 2001/09/11 14:34:39 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/rxgen/rpc_main.c,v 1.1.1.8 2001/09/20 06:16:17 hartmans Exp $");
#include <limits.h>
#include <stdio.h>
static char *cmdname;
#ifdef AFS_SUN5_ENV
static char CPP[] = "/usr/ccs/lib/cpp";
-#elif defined(AFS_FBSD_ENV)
+#elif defined(AFS_XBSD_ENV)
static char CPP[] = "/usr/bin/cpp";
#elif defined(AFS_NT40_ENV)
static char CPP[MAXCMDLINE];
char *infile;
char *define;
{
- char *exec_args[MAXCPPARGS+10];
int nargs = 0;
- char **args;
char cpp_cmdline[MAXCMDLINE];
int i;
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/rxgen/rpc_parse.c,v 1.1.1.6 2001/09/11 14:34:40 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/rxgen/rpc_parse.c,v 1.1.1.7 2001/09/20 06:16:17 hartmans Exp $");
#include <stdlib.h>
#include <stdio.h>
definition *defp;
int *somefrees;
{
- proc1_list *plist, *plist1;
- list *listp;
- definition *defp1;
- int preserve_flag = 0;
-
f_print(fout, "#ifndef KERNEL\n");
f_print(fout, "\tafs_int32 %s%s%s%s();\n", prefix, ServerPrefix,
PackagePrefix[PackageIndex], defp->pc.proc_name);
# NOTE: RXKADNOAUTH value is hardcoded in audit/audit.h, so if you make
# changes here, make sure that audit/audit.h is kept up to date.
-error_table rxk
+error_table RXK
ec RXKADINCONSISTENCY, "Security module structure inconsistent"
ec RXKADPACKETSHORT, "Packet too short for security challenge"
ec RXKADLEVELFAIL, "Security level negotiation failed"
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/rxkad/rxkad_server.c,v 1.1.1.7 2001/09/11 14:34:43 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/rxkad/rxkad_server.c,v 1.1.1.8 2001/09/20 06:16:20 hartmans Exp $");
#include <afs/stds.h>
#include <sys/types.h>
IN struct rx_packet *apacket;
IN struct rx_connection *aconn;
{ struct rxkad_sconn *sconn;
- afs_int32 temp;
char *challenge;
int challengeSize;
struct rxkad_v2Challenge c_v2; /* version 2 */
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/rxkad/test/stress.c,v 1.1.1.5 2001/09/11 14:34:43 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/rxkad/test/stress.c,v 1.1.1.6 2001/09/20 06:16:20 hartmans Exp $");
#include <afs/stds.h>
#include <sys/types.h>
whoami = argv[0];
- initialize_rxk_error_table();
- initialize_rks_error_table();
- initialize_cmd_error_table();
+ initialize_RXK_error_table();
+ initialize_RKS_error_table();
+ initialize_CMD_error_table();
code = rx_Init (0);
rx_SetRxDeadTime(120);
# License. For details, see the LICENSE file in the top-level source
# directory or online at http://www.openafs.org/dl/license10.html
-error_table rks
+error_table RKS
ec RXKST_PROCESSCREATED, "process created, not yet started"
ec RXKST_PROCESSRUNNING, "process running, no error"
ec RXKST_BADARGS, "arguments illegal or inconsistent"
install: $(LIBFILE) $(INCFILES)
install9x: install
+
+clean::
+ $(DEL) rxstat.cs.c rxstat.h rxstat.ss.c rxstat.xdr.c
+
$(RM) -f syscall.ss syscall.i;; \
hp_ux11? ) \
touch syscall.o;; \
- i386_fbsd* ) \
+ i386_*bsd* ) \
touch syscall.o;; \
*) \
/lib/cpp ${SFLAGS} syscall.s syscall.ss; \
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/sys/pioctl_nt.c,v 1.1.1.5 2001/07/14 22:24:01 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/sys/pioctl_nt.c,v 1.1.1.6 2001/09/20 06:16:25 hartmans Exp $");
#include <afs/stds.h>
#include <windows.h>
HKEY parmKey;
DWORD dummyLen;
long code;
- int hostsize;
if (fileNamep) {
drivep = strchr(fileNamep, ':');
#ifndef AFS_WIN95_ENV
gethostname(hostName, sizeof(hostName));
#else
+ {
+ int hostsize;
/* DJGPP version of gethostname gets the NetBIOS
name of the machine, so that is what we are using for
the AFS server name instead of the DNS name. */
hostsize = sizeof(hostName);
GetComputerName(hostName, &hostsize);
+ }
#endif /* AFS_WIN95_ENV */
havehost:
$(DESTDIR)\lib\afs\afskauth.lib \
$(DESTDIR)\lib\afsubik.lib \
$(DESTDIR)\lib\afs\afsauth.lib \
-\
$(DESTDIR)\lib\afsrpc.lib \
$(DESTDIR)\lib\afsrxkad.lib \
$(DESTDIR)\lib\afsrx.lib \
$(DESTDIR)\lib\afslwp.lib \
-\
$(DESTDIR)\lib\afs\afsutil.lib \
$(DESTDIR)\lib\afs\afsusd.lib \
$(DESTDIR)\lib\afs\afspioctl.lib \
!ENDIF
$(DESTDIR)\lib\afsdes.lib
+
# $(DESTDIR)\lib\afsauthent.lib \
# $(DESTDIR)\lib\afsrpc.lib \
# $(DESTDIR)\lib\afs\afscmd.lib \
RXGEN=${TOP_SRCDIR}/rxgen/rxgen
COMPILE_ET=${TOP_SRCDIR}/comerr/compile_et
-all: test ukinstall ${TOP_LIBDIR}/libubik.a ${TOP_INCDIR}/ubik.h ${TOP_INCDIR}/ubik_int.h udebug utst_server utst_client
+all: ukinstall ${TOP_LIBDIR}/libubik.a ${TOP_INCDIR}/ubik.h ${TOP_INCDIR}/ubik_int.h udebug utst_server utst_client
utst_server: utst_server.o utst_int.ss.o utst_int.xdr.o libubik.a
${CC} ${CFLAGS} -o utst_server utst_server.o utst_int.ss.o utst_int.xdr.o libubik.a $(LIBS)
clean::
$(DEL) ubik_int.ss.c ubik_int.cs.c ubik_int.xdr.c
$(DEL) $(INCFILEDIR)\ubik_int.h uerrors.c $(INCFILEDIR)\ubik.h
+ $(DEL) ubik_int.h ubik.h
############################################################################
# test ubik
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/ubik/beacon.c,v 1.1.1.8 2001/09/11 14:34:55 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/ubik/beacon.c,v 1.1.1.9 2001/09/20 06:16:28 hartmans Exp $");
#include <sys/types.h>
#ifdef AFS_NT40_ENV
afs_uint32 aservers[]; /* list of all possible server addresses */
{
afs_uint32 myAddr[UBIK_MAX_INTERFACE_ADDR], *servList, tmpAddr;
- int count, index, found, i, j, totalServers, start, end;
+ int count, found, i, j, totalServers, start, end;
if (info)
totalServers = info->numServers;
updateUbikNetworkAddress(ubik_host)
afs_uint32 ubik_host[UBIK_MAX_INTERFACE_ADDR];
{
- int j, count, found, index, code = 0;
+ int j, count, code = 0;
UbikInterfaceAddr inAddr, outAddr;
struct rx_connection *conns[MAXSERVERS];
struct ubik_server *ts, *server[MAXSERVERS];
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/ubik/disk.c,v 1.1.1.5 2001/09/11 14:34:55 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/ubik/disk.c,v 1.1.1.6 2001/09/20 06:16:28 hartmans Exp $");
#include <sys/types.h>
#ifdef AFS_NT40_ENV
}
/* Take a buffer and mark it as the least recently used buffer */
-static int Dlru(abuf)
+static void Dlru(abuf)
struct buffer *abuf;
{
if (LruBuffer == abuf)
- return 0;
+ return;
/* Unthread from where it is in the list */
abuf->lru_next->lru_prev = abuf->lru_prev;
}
/* Take a buffer and mark it as the most recently used buffer */
-static int Dmru(abuf)
+static void Dmru(abuf)
struct buffer *abuf;
{
if (LruBuffer == abuf) {
LruBuffer = LruBuffer->lru_next;
- return 0;
+ return;
}
/* Unthread from where it is in the list */
abuf->lru_prev = LruBuffer->lru_prev;
LruBuffer->lru_prev->lru_next = abuf;
LruBuffer->lru_prev = abuf;
-
}
/* get a pointer to a particular buffer */
int page; {
/* Read a page from the disk. */
struct buffer *tb, *lastbuffer;
- afs_int32 trys, code;
+ afs_int32 code;
calls++;
lastbuffer = LruBuffer->lru_prev;
}
/* Release a buffer, specifying whether or not the buffer has been modified by the locker. */
-static DRelease (ap,flag)
+static void DRelease (ap,flag)
char *ap;
int flag; {
int index;
bp = &(Buffers[index]);
bp->lockers--;
if (flag) bp->dirty=1;
- return 0;
+ return;
}
/* flush all modified buffers, leaves dirty bits set (they're cleared
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/ubik/lock.c,v 1.1.1.5 2001/07/14 22:24:07 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/ubik/lock.c,v 1.1.1.6 2001/09/20 06:16:28 hartmans Exp $");
#include <sys/types.h>
#ifndef AFS_NT40_ENV
struct ubik_trans *atrans;
int atype, await;
{
- struct ubik_trans *tt;
struct ubik_dbase *dbase=atrans->dbase;
/* On first pass, initialize the lock */
}
/* Release the transaction lock */
+int
ulock_relLock(atrans)
struct ubik_trans *atrans;
{
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/ubik/remote.c,v 1.1.1.6 2001/09/11 14:34:56 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/ubik/remote.c,v 1.1.1.7 2001/09/20 06:16:29 hartmans Exp $");
#include <sys/types.h>
#ifdef AFS_NT40_ENV
#include "ubik_int.h"
int (*ubik_CheckRXSecurityProc)();
char *ubik_CheckRXSecurityRock;
+void printServerInfo();
/* routines for handling requests remotely-submitted by the sync site. These are
only write transactions (we don't propagate read trans), and there is at most one
register afs_int32 code;
register struct ubik_dbase *dbase;
char tbuffer[256];
- afs_int32 offset, t;
+ afs_int32 offset;
struct ubik_version tversion;
register int tlen;
struct rx_peer *tpeer;
return 0;
}
+void
printServerInfo()
{
struct ubik_server *ts;
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/ubik/ubik.c,v 1.1.1.7 2001/09/11 14:34:57 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/ubik/ubik.c,v 1.1.1.8 2001/09/20 06:16:30 hartmans Exp $");
#include <sys/types.h>
#ifdef AFS_NT40_ENV
extern void rx_ServerProc();
extern int rx_stackSize;
- initialize_u_error_table();
+ initialize_U_error_table();
tdb = (struct ubik_dbase *) malloc(sizeof(struct ubik_dbase));
tdb->pathName = (char *) malloc(strlen(pathName)+1);
#include <afs/param.h>
#endif
-RCSID("$Header: /tmp/cvstemp/openafs/src/ubik/ubikclient.c,v 1.1.1.5 2001/07/14 22:24:09 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/ubik/ubikclient.c,v 1.1.1.6 2001/09/20 06:16:30 hartmans Exp $");
#if defined(UKERNEL)
#include "../afs/sysincludes.h"
int offset;
register struct ubik_client *tc;
- initialize_u_error_table();
+ initialize_U_error_table();
if ( *aclient ) { /* the application is doing a re-initialization*/
LOCK_UBIK_CLIENT((*aclient))
# Ubik error table
-error_table u
+error_table U
ec UNOQUORUM, "no quorum elected"
ec UNOTSYNC, "not synchronization site (should work on sync site)"
ec UNHOSTS, "too many hosts"
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/ubik/vote.c,v 1.1.1.7 2001/09/11 14:34:59 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/ubik/vote.c,v 1.1.1.8 2001/09/20 06:16:31 hartmans Exp $");
#include <sys/types.h>
#ifdef AFS_NT40_ENV
afs_int32 awhich;
register struct ubik_sdebug_old *aparm; {
register struct ubik_server *ts;
- register int i;
+
for(ts=ubik_servers; ts; ts=ts->next) {
if (awhich-- == 0) {
/* we're done */
SVOTE_DebugOld(rxcall, aparm)
struct rx_call *rxcall;
register struct ubik_debug_old *aparm; {
- int i;
+
/* fill in the basic debug structure. Note the the RPC protocol transfers,
* integers in host order. */
# Local clean target; augments predefined clean target
clean::
+ $(DEL) update.cs.c update.ss.c update.xdr.c update.h
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/usd/usd_file.c,v 1.1.1.7 2001/09/11 14:35:03 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/usd/usd_file.c,v 1.1.1.8 2001/09/20 06:16:33 hartmans Exp $");
#include <errno.h>
#include <fcntl.h>
#endif
#include <sys/mtio.h>
#endif /* AFS_AIX_ENV */
-#ifdef AFS_DUX40_ENV
+#if defined(AFS_DUX40_ENV) || defined(AFS_OBSD_ENV)
#include <sys/ioctl.h>
#endif
#include <afs/debug.h>
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/uss/uss.c,v 1.1.1.4 2001/07/14 22:24:14 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/uss/uss.c,v 1.1.1.5 2001/09/20 06:16:34 hartmans Exp $");
#ifdef AFS_AIX32_ENV
#include <signal.h>
* In order to get error code -> error message translations to work,
* we have to initialize all error tables.
*/
- initialize_cmd_error_table();
- initialize_rxk_error_table();
- initialize_ktc_error_table();
- initialize_ka_error_table();
- initialize_acfg_error_table();
- initialize_vl_error_table();
- initialize_pt_error_table();
- initialize_u_error_table();
+ initialize_CMD_error_table();
+ initialize_RXK_error_table();
+ initialize_KTC_error_table();
+ initialize_KA_error_table();
+ initialize_ACFG_error_table();
+ initialize_VL_error_table();
+ initialize_PT_error_table();
+ initialize_U_error_table();
} /*InitETTables*/
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/vfsck/setup.c,v 1.1.1.4 2001/09/11 14:35:31 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/vfsck/setup.c,v 1.1.1.5 2001/09/20 06:16:47 hartmans Exp $");
#include <stdio.h>
#define VICE
dev = sname;
}
#endif
-#ifdef AFS_HPUX_ENV
hotroot = is_hotroot(dev);
/*
mounted = swap = 0;
if (!hotroot) {
mounted = is_mounted(dev,&st_mounted);
+#ifdef AFS_HPUX_ENV
swap = is_swap(st_mounted.st_rdev);
+#endif
}
- if (!fflag && !mflag) {
+ if (!fflag
+#ifdef AFS_HPUX_ENV
+&& !mflag
+#endif
+) {
if (hotroot) {
msgprintf("fsck: %s: root file system",dev);
if (preen)
}
#endif
-#ifdef AFS_HPUX_ENV
#include <sys/ustat.h>
+#ifdef AFS_HPUX_ENV
#include <sys/pstat.h>
+#endif
#include <sys/errno.h>
extern int errno;
return (0);
}
+#ifdef AFS_HPUX_ENV
+
#define PS_BURST 1
#ifdef AFS_HPUX102_ENV
#define PSTAT(P, N, I) pstat_getswap(P, sizeof(*P), (size_t)N, I)
return (match);
}
+#endif AFS_HPUX_ENV
+
+
is_pre_init(rdevnum)
dev_t rdevnum;
{
is_roroot()
{
+#ifndef UID_NO_CHANGE
+ struct stat stslash;
+
+ if (stat("/",&stslash) < 0)
+ return (0);
+ if ( chown("/", stslash.st_uid, stslash.st_gid) == 0 )
+ return(0);
+#else
if ( chown("/",UID_NO_CHANGE,GID_NO_CHANGE) == 0 )
return(0);
+#endif
else if (errno != EROFS ) {
printf ("fsck: chown failed: %d\n",errno);
return (0);
return (0);
}
-#endif
#if defined(AFS_HPUX110_ENV)
/*
# NOTE: VL_PERM value is hardcoded in audit/audit.h, so if you make
# changes here, make sure that audit/audit.h is kept up to date.
-error_table vl
+error_table VL
ec VL_IDEXIST, "Volume Id entry exists in vl database"
ec VL_IO, "I/O related error"
ec VL_NAMEEXIST, "Volume name entry exists in vl database"
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/vlserver/vlclient.c,v 1.1.1.5 2001/09/11 14:35:38 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/vlserver/vlclient.c,v 1.1.1.6 2001/09/20 06:16:56 hartmans Exp $");
#include <afs/stds.h>
#include <sys/types.h>
#include "vlserver.h"
#include "vlclient.h"
+void fill_listattributes_entry();
+void display_listattributes_entry();
+void display_entry();
+void display_entryN();
+void display_update_entry();
+void dump_stats();
+void GetArgs();
+void print_usage();
+void fill_entry();
+void fill_update_entry();
extern int VL_GetAddrsU(), VL_RegisterAddrs();
#define VL_NUMBER_OPCODESX 34
{
register struct cmd_item *ti;
register afs_int32 code, server = 0, sawserver=0;
- afs_int32 i, id, voltype;
+ afs_int32 id, voltype;
struct vldbentry entry;
char *cmd = 0, *cellp=0;
struct VldbUpdateEntry updateentry;
} else if (!strcmp(oper,"checkhash")) {
int index, count, num=0, num1=0, num2 = 0, num3=0, num31=0, num4=0, num41=0, next_index;
struct vldbentry tentry;
- struct Vlent *vl1;
VL = SVL = (struct Vlent *) malloc(ALLOCNT * sizeof(struct Vlent));
if (VL == NULL) {
} else if (!strcmp(oper,"fixhash")) {
int index, count, num=0, num1=0, num2 = 0, next_index, x=0;
struct vldbentry tentry;
- struct Vlent *vl1;
VL = SVL = (struct Vlent *) malloc(ALLOCNT * sizeof(struct Vlent));
if (VL == NULL) {
int nentries, i;
afs_uint32 *addrp;
bulkaddrs addrs;
- struct vldbentry *entry;
struct VLCallBack vlcb;
addrs.bulkaddrs_val = 0;
int nentries1, nentries2, i, j, x, y, unique, found;
afs_uint32 *addrp1, *addrp2;
bulkaddrs addrs1, addrs2;
- struct vldbentry *entry;
struct VLCallBack vlcb;
ListAddrByAttributes attrs;
afsUUID uuid;
int i;
afs_uint32 *addrp, tad;
bulkaddrs addrs;
- struct vldbentry *entry;
afsUUID uuid;
memset(&uuid, 0, sizeof(uuid));
extern struct hostent *hostutil_GetHostByName();
struct hostent *h1, *h2;
afs_uint32 a1, a2;
- unsigned char n1[80], n2[80];
printf("changing %s", *argp);
h1 = hostutil_GetHostByName(&(*argp)[0]);
}
} else if (!strcmp(oper,"caid")) {
afs_uint32 a1, a2;
- unsigned char n1[80], n2[80];
sscanf(&(*argp)[0], "%d", &a1);
printf("changing %d (0x%x)", a1, a1);
}
+void
fill_entry(entry, argp, nargs)
struct vldbentry *entry;
char **argp;
sscanf(&(*argp)[0], "%d", &entry->cloneId);
}
-
+void
fill_update_entry(entry, argp, nargs)
struct VldbUpdateEntry *entry;
char **argp;
}
}
-
+void
fill_listattributes_entry(entry, argp, nargs)
struct VldbListByAttributes *entry;
char **argp;
entry->Mask |= VLLIST_FLAG;
}
+void
display_listattributes_entry(entry, error)
struct VldbListByAttributes *entry;
int error;
#define volumetype_string(type) (type == RWVOL? "read/write":type == ROVOL? "readonly":type == BACKVOL? "backup":"unknown")
+void
display_entry(entry, error)
struct vldbentry *entry;
int error;
printf("%12u\t%10d\t%10x\n", entry->serverNumber[i], entry->serverPartition[i], entry->serverFlags[i]);
}
+void
display_entryN(entry, error)
struct nvldbentry *entry;
int error;
}
}
-
+void
display_update_entry(entry, error)
struct VldbUpdateEntry *entry;
int error;
}
}
+void
dump_stats(stats, vital_header)
vldstats *stats;
vital_vlheader *vital_header;
printf("total %s entries=%d\n", volumetype_string(i), ntohl(vital_header->totalEntries[i]));
}
+void
GetArgs(line,args, nargs)
register char *line;
register char **args;
}
}
+void
print_usage()
{
printf("Valid Commands:\n");
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/vlserver/vldb_check.c,v 1.1.1.5 2001/09/11 14:35:38 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/vlserver/vldb_check.c,v 1.1.1.6 2001/09/20 06:16:56 hartmans Exp $");
#include <sys/types.h>
#include <sys/stat.h>
char *volname;
{
unsigned int hash;
- int i;
char *vchar;
hash = 0;
char *volname;
{
char *map;
- int slen;
+ size_t slen;
map = LEGALCHARS;
slen = strlen(volname);
}
}
+void
readSIT(base, addr)
int base;
int addr;
* Record what type of entry it is and its address in the record array.
* Remember what the maximum volume id we found is and check against the header.
*/
+void
ReadAllEntries(header)
struct vlheader *header;
{
FollowFreeChain(header)
struct vlheader *header;
{
- int count=0;
+ afs_int32 count=0;
struct nvlentry vlentry;
afs_uint32 addr;
- afs_int32 i, type, rindex;
+ afs_int32 type, rindex;
/* Now follow the Free Chain */
if (verbose)
readentry(addr, &vlentry, &type);
if (type != FR) {
printf("Free Chain %d: Bad entry at %u: Not a valid free vlentry (0x%x)\n",
- i, addr, type);
+ count, addr, type);
continue;
}
struct vlheader *header;
{
int mhblocks=0;
- struct nvlentry vlentry;
- afs_uint32 addr;
afs_int32 i, j, m, rindex;
afs_int32 mhentries, regentries;
afs_int32 caddrs[VL_MAX_ADDREXTBLKS];
record[rindex].addr, caddrs[i], rindex);
}
if (record[rindex].type & FRC) {
- printf("MH Blocks Chain %d: Bad entry at %u: Already a MH block\n", i, addr);
+ printf("MH Blocks Chain %d: Bad entry at %u: Already a MH block\n", i, record[rindex].addr);
break;
}
record[rindex].type |= MHC;
}
+int
WorkerBee(as, arock)
struct cmd_syndesc *as;
char *arock;
char **argv;
{
struct cmd_syndesc *ts;
- struct cmd_item *ti;
setlinebuf(stdout);
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/vlserver/vlprocs.c,v 1.1.1.5 2001/09/11 14:35:39 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/vlserver/vlprocs.c,v 1.1.1.6 2001/09/20 06:16:57 hartmans Exp $");
#include <sys/types.h>
#include <stdio.h>
struct rx_call *rxcall;
afs_int32 ip1, ip2;
{ struct ubik_trans *trans;
- afs_int32 errorcode, blockindex;
- struct nvlentry tentry;
+ afs_int32 errorcode;
COUNT_REQ (VLCHANGEADDR);
if (!afsconf_SuperUser(vldb_confdir, rxcall, (char *)0)) {
VldbentryLast = VldbentryFirst + allocCount;
/* Handle the attribute by volume id totally separate of the rest (thus additional Mask values are ignored if VLLIST_VOLUMEID is set!) */
if (attributes->Mask & VLLIST_VOLUMEID) {
- afs_int32 blockindex, chain;
- struct nvlentry tempentry;
+ afs_int32 blockindex;
blockindex = FindByID(trans, attributes->volumeid, -1, &tentry, &errorcode);
if (blockindex == 0) {
VldbentryLast = VldbentryFirst + allocCount;
/* Handle the attribute by volume id totally separate of the rest (thus additional Mask values are ignored if VLLIST_VOLUMEID is set!) */
if (attributes->Mask & VLLIST_VOLUMEID) {
- afs_int32 blockindex, chain;
- struct nvlentry tempentry;
+ afs_int32 blockindex;
blockindex = FindByID(trans, attributes->volumeid, -1, &tentry, &errorcode);
if (blockindex == 0) {
int errorcode=0, maxCount=VLDBALLOCCOUNT;
struct ubik_trans *trans;
struct nvlentry tentry;
- struct nvldbentry *Vldbentry=0, *VldbentryFirst=0, *VldbentryLast=0, tVldbentry;
+ struct nvldbentry *Vldbentry=0, *VldbentryFirst=0, *VldbentryLast=0;
afs_int32 blockindex=0, count=0, k, match, matchindex;
int serverindex=-1; /* no server found */
int findserver=0, findpartition=0, findflag=0, findname=0;
{
afs_int32 code;
struct ubik_trans *trans;
- int cnt, h, i, j, k, m, hostslot, base, index;
+ int cnt, h, i, j, k, m, base, index;
struct extentaddr *exp = 0, *tex;
afsUUID tuuid;
afs_uint32 addrs[VL_MAXIPADDRS_PERMH];
- afs_int32 fbase, findex;
+ afs_int32 fbase;
int count, willChangeEntry, foundUuidEntry, willReplaceCnt;
int WillReplaceEntry, WillChange[MAXSERVERID+1], FoundUuid, ReplaceEntry;
int srvidx, mhidx;
afsUUID *uuidpo;
afs_int32 *uniquifier, *nentries;
bulkaddrs *addrsp;
-{ register afs_int32 errorcode, index=-1, op, offset;
+{ register afs_int32 errorcode, index=-1, offset;
struct ubik_trans *trans;
- int nservers, i, j, k, base=0;
+ int nservers, i, j, base=0;
struct extentaddr *exp=0;
afsUUID tuuid;
afs_uint32 *taddrp, taddr;
int base, index, mhidx;
afsUUID tuuid;
afs_int32 blockindex, count;
- int pollcount;
+ int pollcount = 0;
struct nvlentry tentry;
if (!atrans)
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/vlserver/vlutils.c,v 1.1.1.5 2001/09/11 14:35:40 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/vlserver/vlutils.c,v 1.1.1.6 2001/09/20 06:16:58 hartmans Exp $");
#include <sys/types.h>
#ifdef AFS_NT40_ENV
afs_int32 offset;
char *buffer;
afs_int32 length; {
- struct vlentry oentry, *oep;
+ struct vlentry oentry;
struct nvlentry nentry, *nep;
char *bufp;
register afs_int32 i;
afs_int32 offset;
char *buffer;
afs_int32 length; {
- struct vlentry *oep, *obufp, tentry;
+ struct vlentry *oep, tentry;
struct nvlentry *nep, *nbufp;
char *bufp = (char *)&tentry;
register afs_int32 i;
*expp = exp;
*basep = base;
if (vldbversion != VLDBVERSION_4) {
- vldbversion != VLDBVERSION_4;
cheader.vital_header.vldbversion = htonl(VLDBVERSION_4);
code = write_vital_vlheader(trans);
if (code) ERROR_EXIT(VL_IO);
VLog(0, ("[%d]#%d: %10d %d %d (%s)\n", hashindex, i, tentry.volumeId[0],
tentry.nextIdHash[0], tentry.nextNameHash, tentry.name));
}
+ return 0;
}
VLog(0, ("[%d]#%d: %10d %d %d (%s)\n", hashindex, i, tentry.volumeId[0],
tentry.nextIdHash[0], tentry.nextNameHash, tentry.name));
}
+ return 0;
}
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/vol/clone.c,v 1.1.1.5 2001/09/11 14:35:41 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/vol/clone.c,v 1.1.1.6 2001/09/20 06:16:58 hartmans Exp $");
#include <sys/types.h>
#include <stdio.h>
struct clone_items *last;
};
+void CloneVolume();
+void CloneVolume_r();
+
static ci_AddItem(ah, aino)
Inode aino;
struct clone_head *ah; {
return error;
}
+void
CloneVolume(error, original, new, old)
Error *error;
Volume *original, *new, *old;
VOL_UNLOCK
}
+void
CloneVolume_r(rerror, original, new, old)
Error *rerror;
Volume *original, *new, *old;
#include <sys/param.h>
#include <afsconfig.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/vol/devname.c,v 1.1.1.6 2001/09/11 14:35:41 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/vol/devname.c,v 1.1.1.7 2001/09/20 06:16:59 hartmans Exp $");
#include <afs/param.h>
#include <rx/xdr.h>
#ifdef AFS_SUN5_ENV
#include <sys/fs/ufs_fs.h>
#else
-#if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
+#if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
#include <ufs/ufs/dinode.h>
#include <ufs/ffs/fs.h>
#else
#endif
#endif
#else /* AFS_VFSINCL_ENV */
-#if !defined(AFS_AIX_ENV) && !defined(AFS_LINUX22_ENV) && !defined(AFS_FBSD_ENV)
+#if !defined(AFS_AIX_ENV) && !defined(AFS_LINUX22_ENV) && !defined(AFS_XBSD_ENV)
#include <sys/fs.h>
#endif
#endif /* AFS_VFSINCL_ENV */
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/vol/listinodes.c,v 1.1.1.7 2001/07/14 22:24:55 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/vol/listinodes.c,v 1.1.1.8 2001/09/20 06:17:00 hartmans Exp $");
#ifndef AFS_NAMEI_ENV
#ifdef AFS_LINUX20_ENV
#ifdef AFS_SUN5_ENV
#include <sys/fs/ufs_fs.h>
#else
-#if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
+#if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
#include <ufs/ufs/dinode.h>
#include <ufs/ffs/fs.h>
#define itod ino_to_fsba
if (
(super.fs.fs_magic != FS_MAGIC)
|| (super.fs.fs_ncg < 1)
-#if defined(AFS_SUN_ENV) || defined(AFS_OSF_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
+#if defined(AFS_SUN_ENV) || defined(AFS_OSF_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
|| (super.fs.fs_cpg < 1)
#else
|| (super.fs.fs_cpg < 1 || super.fs.fs_cpg > MAXCPG)
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/vol/vnode.c,v 1.1.1.5 2001/09/11 14:35:47 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/vol/vnode.c,v 1.1.1.6 2001/09/20 06:17:02 hartmans Exp $");
#include <errno.h>
#include <stdio.h>
struct VnodeClassInfo VnodeClassInfo[nVNODECLASSES];
private int moveHash();
+void StickOnLruChain_r();
+void VPutVnode_r();
#define BAD_IGET -1000
}
if (nVnodes == 0)
- return;
+ return 0;
va = (byte *) calloc(nVnodes,vcp->residentSize);
assert (va != NULL);
}
va += vcp->residentSize;
}
+ return 0;
}
LWP_CurrentProcess(&vnp->writer);
#endif /* AFS_PTHREAD_ENV */
/* Sanity check: is this vnode really not in use? */
- { int n;
+ {
int size;
IHandle_t *ihP = vp->vnodeIndex[class].handle;
FdHandle_t *fdP;
int TrustVnodeCacheEntry = 1;
/* This variable is bogus--when it's set to 0, the hash chains fill
up with multiple versions of the same vnode. Should fix this!! */
-
+void
VPutVnode(ec,vnp)
Error *ec;
register Vnode *vnp;
VOL_UNLOCK
}
+void
VPutVnode_r(ec,vnp)
Error *ec;
register Vnode *vnp;
vnp->hashNext = VnodeHashTable[newHash];
VnodeHashTable[newHash] = vnp;
vnp->hashIndex = newHash;
+ return 0;
}
+void
StickOnLruChain_r(vnp,vcp)
register Vnode *vnp;
register struct VnodeClassInfo *vcp;
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/vol/vol-salvage.c,v 1.1.1.7 2001/09/11 14:35:48 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/vol/vol-salvage.c,v 1.1.1.8 2001/09/20 06:17:02 hartmans Exp $");
#include <stdlib.h>
#include <stdio.h>
#ifdef AFS_SUN5_ENV
#include <sys/fs/ufs_inode.h>
#else
-#if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
+#if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
#include <ufs/ufs/dinode.h>
#include <ufs/ffs/fs.h>
#else
#ifdef AFS_OSF_ENV
#include <ufs/inode.h>
#else /* AFS_OSF_ENV */
-#if !defined(AFS_LINUX20_ENV) && !defined(AFS_FBSD_ENV)
+#if !defined(AFS_LINUX20_ENV) && !defined(AFS_XBSD_ENV)
#include <sys/inode.h>
#endif
#endif
int GetInodeSummary(char *path, VolumeId singleVolumeNumber)
{
struct stat status;
- int summaryFd, forceSal, err;
+ int forceSal, err;
struct ViceInodeInfo *ip;
struct InodeSummary summary;
char summaryFileName[50];
struct VnodeClassInfo *vcp = &VnodeClassInfo[class];
char buf[SIZEOF_LARGEDISKVNODE];
struct VnodeDiskObject *vnode = (struct VnodeDiskObject *) buf;
- int code;
int size;
StreamHandle_t *file;
int vnodeIndex;
char buf[4096];
IHandle_t *srcH, *destH;
FdHandle_t *srcFdP, *destFdP;
- register int n;
+ register int n = 0;
IH_INIT(srcH, device, rwvolume, inode1);
srcFdP = IH_OPEN(srcH);
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/vol/volume.c,v 1.1.1.9 2001/09/11 14:35:50 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/vol/volume.c,v 1.1.1.10 2001/09/20 06:17:03 hartmans Exp $");
#include <rx/xdr.h>
#include <afs/afsint.h>
#ifdef AFS_SUN5_ENV
#include <sys/fs/ufs_fs.h>
#else
-#if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
+#if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
#include <ufs/ufs/dinode.h>
#include <ufs/ffs/fs.h>
#else
#endif
#endif
#else /* AFS_VFSINCL_ENV */
-#if !defined(AFS_AIX_ENV) && !defined(AFS_LINUX20_ENV) && !defined(AFS_FBSD_ENV)
+#if !defined(AFS_AIX_ENV) && !defined(AFS_LINUX20_ENV) && !defined(AFS_XBSD_ENV)
#include <sys/fs.h>
#endif
#endif /* AFS_VFSINCL_ENV */
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/vol/vutil.c,v 1.1.1.6 2001/09/11 14:35:51 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/vol/vutil.c,v 1.1.1.7 2001/09/20 06:17:04 hartmans Exp $");
#include <stdio.h>
#include <sys/types.h>
#include <strings.h>
#endif
+void AssignVolumeName();
+void AssignVolumeName_r();
+void ClearVolumeStats();
+void ClearVolumeStats_r();
+
#define nFILES (sizeof (stuff)/sizeof(struct stuff))
no parent */
{
VolumeDiskData vol;
- int fd, fd1, i;
+ int fd, i;
char headerName[32], volumePath[64];
- struct stat status;
Device device;
struct DiskPartition *partition;
struct VolumeDiskHeader diskHeader;
- int code;
IHandle_t *handle;
FdHandle_t *fdP;
Inode nearInode=0;
-
-
*ec = 0;
memset(&vol, 0, sizeof (vol));
vol.id = volumeId;
}
+void
AssignVolumeName(vol, name, ext)
register VolumeDiskData *vol;
char *name,*ext;
VOL_UNLOCK
}
+void
AssignVolumeName_r(vol, name, ext)
register VolumeDiskData *vol;
char *name,*ext;
return(code);
}
+void
ClearVolumeStats(vol)
register VolumeDiskData *vol;
{
VOL_UNLOCK
}
+void
ClearVolumeStats_r(vol)
register VolumeDiskData *vol;
{
# Local clean target; augments predefined clean target
clean::
-
-
+ $(DEL) volerr.c volser.h
+ $(DEL) volint.cs.c volint.h volint.ss.c volint.xdr.c volser.h
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/volser/common.c,v 1.1.1.4 2001/07/14 22:25:07 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/volser/common.c,v 1.1.1.5 2001/09/20 06:17:06 hartmans Exp $");
#include <stdio.h>
#include <afs/afsutil.h>
abort();
}
+void
InitErrTabs()
{
- initialize_ka_error_table();
- initialize_rxk_error_table();
- initialize_ktc_error_table();
- initialize_acfg_error_table();
- initialize_cmd_error_table();
- initialize_vl_error_table();
- initialize_vols_error_table();
+ initialize_KA_error_table();
+ initialize_RXK_error_table();
+ initialize_KTC_error_table();
+ initialize_ACFG_error_table();
+ initialize_CMD_error_table();
+ initialize_VL_error_table();
+ initialize_VOLS_error_table();
return;
}
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/volser/dumpstuff.c,v 1.1.1.6 2001/09/11 14:35:53 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/volser/dumpstuff.c,v 1.1.1.7 2001/09/20 06:17:07 hartmans Exp $");
#include <sys/types.h>
#include <ctype.h>
{
int code = 0, lcode = 0, error = 0;
afs_int32 pad = 0, offset;
- int n, nbytes, howMany;
+ int n, nbytes, howMany, howBig;
byte *p;
struct stat status;
int size;
#endif
#ifdef AFS_NT40_ENV
- howMany = 4096; /* Page size */
+ howBig = _filelength(handleP->fd_fd);
+ howMany = 4096;
+
#else
fstat(handleP->fd_fd, &status);
+ howBig = status.st_size;
+
#ifdef AFS_AIX_ENV
/* Unfortunately in AIX valuable fields such as st_blksize are
* gone from the stat structure.
howMany = tstatfs.f_bsize;
#else
howMany = status.st_blksize;
-#endif
+#endif /* AFS_AIX_ENV */
#endif /* AFS_NT40_ENV */
+
size = FDH_SIZE(handleP);
code = DumpInt32(iodp, tag, size);
if (code) {
*/
memset(p+n, 0, howMany-n);
if (!pad)
- offset = (status.st_size - nbytes) + n;
+ offset = (howBig - nbytes) + n;
pad += (howMany-n);
/* Now seek over the data we could not get. An error here means we
char buf[SIZEOF_LARGEDISKVNODE];
struct VnodeDiskObject *vnode = (struct VnodeDiskObject *) buf;
StreamHandle_t *file;
- IHandle_t *handle;
FdHandle_t *fdP;
int size;
int flag;
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/volser/lockprocs.c,v 1.1.1.4 2001/07/14 22:25:07 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/volser/lockprocs.c,v 1.1.1.5 2001/09/20 06:17:07 hartmans Exp $");
#include <sys/types.h>
#ifdef AFS_NT40_ENV
}
/* Changes the rw site only */
+void
SetAValue (entry, oserver, opart, nserver, npart, type)
struct nvldbentry *entry;
afs_int32 oserver, opart, nserver, npart, type;
# NOTE: VOLSERBAD_ACCESS value is hardcoded in audit/audit.h, so if you
# make changes here, make sure that audit/audit.h is kept up to date.
-error_table vols
+error_table VOLS
ec VOLSERTRELE_ERROR, "internal error releasing transaction"
ec VOLSERNO_OP, "unknown internal error"
ec VOLSERREAD_DUMPERROR, "badly formatted dump"
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/volser/volprocs.c,v 1.1.1.6 2001/09/11 14:35:55 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/volser/volprocs.c,v 1.1.1.7 2001/09/20 06:17:08 hartmans Exp $");
#include <stdio.h>
#include <sys/types.h>
struct rx_call *acid;
struct pIDs *partIds;
{
- struct stat rbuf, pbuf;
char namehead[9];
+ struct stat rbuf, pbuf;
int code;
char i;
+
+ strcpy(namehead, "/vicep"); /*7 including null terminator*/
+
#ifdef AFS_NT40_ENV
/* Just return attached partitions. */
- strcpy(namehead, "/vicep");
namehead[7] = '\0';
for (i=0; i<26; i++) {
namehead[6] = i + 'a';
partIds->partIds[i] = VGetPartition(namehead, 0) ? i : -1;
}
#else
- strcpy(namehead, "/vicep"); /*7 including null terminator*/
- code = stat("/",&rbuf); /*interested in buf->st_dev*/
+ (void) stat("/",&rbuf); /*interested in buf->st_dev*/
for(i = 0 ; i < 26 ; i++){
else partIds->partIds[i ] = -1;
}
else partIds->partIds[i ] = -1;
-
-
}
#endif
return 0;
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/volser/vos.c,v 1.1.1.6 2001/09/11 14:35:57 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/volser/vos.c,v 1.1.1.7 2001/09/20 06:17:10 hartmans Exp $");
#include <sys/types.h>
#ifdef AFS_NT40_ENV
if (vcode == RXGEN_OPCODE) {
/* Vlserver not running with ListAttributesN2. Fall back */
vcode = VLDB_ListAttributes(&attributes, ¢ries, &arrayEntries);
- nextindex == -1;
+ nextindex = -1;
}
if (vcode) {
fprintf(STDERR,"Could not access the VLDB for attributes\n");
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/volser/vsprocs.c,v 1.1.1.6 2001/09/11 14:35:57 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/volser/vsprocs.c,v 1.1.1.7 2001/09/20 06:17:11 hartmans Exp $");
#include <stdio.h>
#include <sys/types.h>
extern int VL_ReleaseLock();
extern int VL_DeleteEntry();
+void MapNetworkToHost();
+void MapHostToNetwork();
+
struct release {
afs_int32 time;
afs_int32 vldbEntryIndex;
};
/*map the partition <partId> into partition name <partName>*/
+void
MapPartIdIntoName(partId, partName)
afs_int32 partId;
char *partName;
strcpy(partName,"/vicep");
partName[6] = partId + 'a';
partName[7] = '\0';
- return 0;
+ return;
} else if (partId < VOLMAXPARTS) {
strcpy(partName,"/vicep");
partId -= 26;
partName[6] = 'a' + (partId/26);
partName[7] = 'a' + (partId%26);
partName[8] = '\0';
- return 0;
+ return;
}
}
afs_int32 offset;
- initialize_ka_error_table();
- initialize_rxk_error_table();
- initialize_ktc_error_table();
- initialize_acfg_error_table();
- initialize_cmd_error_table();
- initialize_vl_error_table();
+ initialize_KA_error_table();
+ initialize_RXK_error_table();
+ initialize_KTC_error_table();
+ initialize_ACFG_error_table();
+ initialize_CMD_error_table();
+ initialize_VL_error_table();
offset = errcode & ((1<<ERRCODE_RANGE)-1);
fprintf(STDERR,"%s: %s\n",error_table_name (errcode), error_message (errcode));
void EnumerateEntry(entry)
struct nvldbentry *entry;
{
- int i;
- char pname[10];
- int isMixed = 0;
fprintf(STDOUT,"\n");
fprintf(STDOUT,"%s \n",entry->name);
afs_int32 aid;
{
register struct rx_connection *aconn;
- register afs_int32 code;
afs_int32 error;
- afs_int32 rcode,vcode;
+ afs_int32 vcode;
struct nvldbentry entry,storeEntry;/*the new vldb entry */
aconn = (struct rx_connection *)0;
struct rx_connection *conn;
afs_int32 vid, part, flags;
{
- afs_int32 acode, bcode, ccode, rcode, tid;
+ afs_int32 acode, ccode, rcode, tid;
ccode = rcode = tid = 0;
acode = AFSVolTransCreate(conn, vid, part, flags, &tid);
afs_int32 cloneVolId, roVolId;
struct replica *replicas=0;
struct nvldbentry entry,storeEntry;
- int i, volcount, k, m, n, fullrelease, vldbindex;
+ int i, volcount, m, fullrelease, vldbindex;
int failure;
struct restoreCookie cookie;
struct rx_connection **toconns=0;
afs_int32 clonetid=0, onlinetid;
afs_int32 fromtid=0;
afs_uint32 fromdate, thisdate;
- int ix, si, s;
+ int s;
manyDests tr;
manyResults results;
int rwindex, roindex, roclone, roexists;
int idx, j;
afs_int32 code, error = 0;
struct nvldbentry entry, storeEntry;
- int sameserver;
char pname[10];
int pass=0, islocked=0, createentry, addvolume, modified, mod;
afs_int32 rwvolid;
afs_int32 *modified;
{
afs_int32 code, error=0;
- int idx;
struct nvldbentry storeEntry;
int islocked=0, mod, modentry, delentry=0;
- int foundro, pass=0;
+ int pass=0;
if (modified) *modified = 0;
if (verbose) {
/*maps the host addresses in <old > (present in network byte order) to
that in< new> (present in host byte order )*/
+void
MapNetworkToHost(old, new)
struct nvldbentry *old, *new;
{
new->volumeId[BACKVOL] = old->volumeId[BACKVOL];
new->cloneId = old->cloneId;
new->flags = old->flags;
-
}
/*maps the host entries in <entry> which are present in host byte order to network byte order */
+void
MapHostToNetwork(entry)
struct nvldbentry *entry;
{
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/volser/vsutils.c,v 1.1.1.7 2001/09/11 14:35:58 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/volser/vsutils.c,v 1.1.1.8 2001/09/20 06:17:12 hartmans Exp $");
#include <afs/stds.h>
#ifdef AFS_NT40_ENV
struct nvldbentry *entryp;
{
struct vldbentry oentry;
- register int code, (*nproc)();
+ register int code;
if (newvlserver == 1) {
tryold:
struct nvldbentry *entryp;
{
struct vldbentry oentry;
- register int code, (*nproc)();
+ register int code;
if (newvlserver == 1) {
tryold:
struct nvldbentry *entryp;
{
struct vldbentry oentry;
- register int code, (*nproc)();
+ register int code;
if (newvlserver == 1) {
tryold:
struct nvldbentry *entryp;
{
struct vldbentry oentry;
- register int code, (*nproc)();
+ register int code;
if (newvlserver == 1) {
tryold:
VLDB_IsSameAddrs(serv1, serv2, errorp)
afs_int32 serv1, serv2, *errorp;
{
- struct vldbentry oentry;
- register int code, (*nproc)();
+ register int code;
ListAddrByAttributes attrs;
bulkaddrs addrs;
afs_uint32 *addrp, nentries, unique, i, j, f1, f2;
char *str,*ptr, volname[VOLSER_OLDMAXVOLNAME+1];
int tryname, curval;
struct nvldbentry entry;
- afs_int32 vcode;
+ afs_int32 vcode = 0;
int total;
*errp = 0;