From 1be42dc7ad7ee533d1bc42d74517223c423b06de Mon Sep 17 00:00:00 2001 From: Sam Hartman Date: Thu, 20 Sep 2001 06:17:12 +0000 Subject: [PATCH] This commit was generated by cvs2svn to compensate for changes in r348, which included commits to RCS files with non-trunk default branches. --- NEWS | 43 +- README.CVS | 38 +- configure-libafs.in | 18 +- src/WINNT/afs_setup_utils/afsrm.c | 2 +- src/WINNT/afsadmsvr/NTMakefile | 12 +- src/WINNT/afsd/cm_config.c | 2 +- src/WINNT/afsd/cm_utils.h | 2 +- src/WINNT/afsreg/test/regman.c | 2 +- src/WINNT/afssvrcfg/afscfg.cpp | 10 - src/WINNT/license/lang/NTMakefile | 2 + src/afs/VNOPS/afs_vnop_write.c | 6 +- src/afs/afs_analyze.c | 18 +- src/afs/afs_callback.c | 6 +- src/afs/afs_trace.et | 2 +- src/afs/afs_volume.c | 9 +- src/afs/sysincludes.h | 34 + src/afsd/Makefile.in | 2 - src/afsd/afsd.c | 4 +- src/auth/NTMakefile | 3 +- src/auth/acfg_errors.et | 2 +- src/auth/authcon.c | 6 +- src/auth/cellconfig.c | 22 +- src/auth/ktc_errors.et | 2 +- src/auth/userok.c | 3 +- src/bozo/NTMakefile | 1 + src/bozo/bos.c | 7 +- src/bozo/boserr.et | 2 +- src/bozo/bosoprocs.c | 4 +- src/bozo/bosserver.c | 7 +- src/bozo/cronbnodeops.c | 3 +- src/bozo/fsbnodeops.c | 3 +- src/bubasics/butc_errs.et | 2 +- src/bubasics/butm_errs.et | 2 +- src/bubasics/butx_errs.et | 2 +- src/bucoord/NTMakefile | 1 + src/bucoord/bucoord_errs.et | 2 +- src/bucoord/main.c | 28 +- src/budb/NTMakefile | 3 +- src/budb/budb_errs.et | 2 +- src/budb/server.c | 4 +- src/butc/tcmain.c | 26 +- src/butm/butm_test.c | 4 +- src/butm/test_ftm.c | 4 +- src/cmd/NTMakefile | 2 +- src/cmd/cmd.c | 8 +- src/cmd/cmd_errors.et | 2 +- src/cmd/test/itest.c | 4 +- src/comerr/compile_et.c | 11 +- src/comerr/error_table.y | 7 +- src/comerr/error_table_nt.c | 2461 ++++++++--------- src/comerr/test/test.c | 16 +- src/comerr/test/test1.et | 2 +- src/comerr/test/test2.et | 2 +- src/dauth/dlog.c | 8 +- src/des/NTMakefile | 3 +- src/des/andrew-conf.h | 4 + src/des/read_pssword.c | 16 +- src/dir/buffer.c | 6 +- src/dir/salvage.c | 4 +- src/finale/translate_et.c | 22 +- src/kauth/NTMakefile | 4 +- src/kauth/admin_tools.c | 5 +- src/kauth/authclient.c | 3 +- src/kauth/client.c | 12 +- src/kauth/decode_ticket.c | 6 +- src/kauth/kaauxdb.c | 3 +- src/kauth/kaerrors.et | 2 +- src/kauth/kaprocs.c | 21 +- src/kauth/kas.c | 12 +- src/kauth/kaserver.c | 4 +- src/kauth/kautils.p.h | 4 +- src/kauth/klogin.c | 4 +- src/kauth/krb_udp.c | 26 +- src/kauth/rebuild.c | 10 +- src/kauth/test/test_getticket.c | 14 +- src/kauth/test/test_interim_ktc.c | 12 +- src/kauth/test/test_rxkad_free.c | 14 +- src/kauth/token.c | 4 +- src/kauth/user.c | 4 +- src/libacl/aclprocs.c | 4 +- src/libadmin/adminutil/afs_AdminBosErrors.et | 2 +- src/libadmin/adminutil/afs_AdminCfgErrors.et | 2 +- .../adminutil/afs_AdminClientErrors.et | 2 +- .../adminutil/afs_AdminCommonErrors.et | 2 +- src/libadmin/adminutil/afs_AdminKasErrors.et | 2 +- src/libadmin/adminutil/afs_AdminMiscErrors.et | 2 +- src/libadmin/adminutil/afs_AdminPtsErrors.et | 2 +- src/libadmin/adminutil/afs_AdminUtilErrors.et | 2 +- src/libadmin/adminutil/afs_AdminVosErrors.et | 2 +- src/libadmin/adminutil/afs_utilAdmin.c | 40 +- src/libafs/MakefileProto.DARWIN.in | 38 +- src/lwp/Makefile.in | 5 + src/lwp/process.s | 22 +- src/lwp/waitkey.c | 4 +- src/package/package.c | 2 +- src/pinstall/install.c | 12 +- src/ptserver/Makefile.in | 2 +- src/ptserver/NTMakefile | 6 +- src/ptserver/db_verify.c | 11 +- src/ptserver/display.c | 3 +- src/ptserver/ptclient.c | 4 +- src/ptserver/pterror.et | 2 +- src/ptserver/ptprocs.c | 4 +- src/ptserver/ptuser.c | 14 +- src/ptserver/readgroup.c | 6 +- src/ptserver/testpt.c | 14 +- src/ptserver/utils.c | 3 +- src/rx/rx_getaddr.c | 12 +- src/rx/rx_kcommon.c | 32 +- src/rx/rx_kcommon.h | 10 +- src/rx/rx_packet.h | 2 +- src/rx/rx_pthread.c | 10 +- src/rx/rx_rdwr.c | 4 +- src/rx/test/generator.c | 6 +- src/rxgen/rpc_main.c | 6 +- src/rxgen/rpc_parse.c | 7 +- src/rxkad/rxkad_errs.et | 2 +- src/rxkad/rxkad_server.c | 3 +- src/rxkad/test/stress.c | 8 +- src/rxkad/test/stress_errs.et | 2 +- src/rxstat/NTMakefile | 4 + src/sys/Makefile.in | 2 +- src/sys/pioctl_nt.c | 6 +- src/tbutc/NTMakefile | 3 +- src/ubik/Makefile.in | 2 +- src/ubik/NTMakefile | 1 + src/ubik/beacon.c | 6 +- src/ubik/disk.c | 17 +- src/ubik/lock.c | 4 +- src/ubik/remote.c | 6 +- src/ubik/ubik.c | 4 +- src/ubik/ubikclient.c | 4 +- src/ubik/uerrors.et | 2 +- src/ubik/vote.c | 6 +- src/update/NTMakefile | 1 + src/usd/usd_file.c | 4 +- src/uss/uss.c | 18 +- src/vfsck/setup.c | 29 +- src/vlserver/vl_errors.et | 2 +- src/vlserver/vlclient.c | 34 +- src/vlserver/vldb_check.c | 19 +- src/vlserver/vlprocs.c | 23 +- src/vlserver/vlutils.c | 9 +- src/vol/clone.c | 7 +- src/vol/devname.c | 6 +- src/vol/listinodes.c | 6 +- src/vol/vnode.c | 14 +- src/vol/vol-salvage.c | 11 +- src/vol/volume.c | 6 +- src/vol/vutil.c | 17 +- src/volser/NTMakefile | 4 +- src/volser/common.c | 17 +- src/volser/dumpstuff.c | 16 +- src/volser/lockprocs.c | 3 +- src/volser/volerr.et | 2 +- src/volser/volprocs.c | 13 +- src/volser/vos.c | 4 +- src/volser/vsprocs.c | 41 +- src/volser/vsutils.c | 15 +- 159 files changed, 1996 insertions(+), 1809 deletions(-) diff --git a/NEWS b/NEWS index f1096ccad..da8a0eea7 100644 --- a/NEWS +++ b/NEWS @@ -1,14 +1,49 @@ -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. diff --git a/README.CVS b/README.CVS index 10e708263..5f3533d73 100644 --- a/README.CVS +++ b/README.CVS @@ -8,6 +8,42 @@ Do not use the CVS tree unless you know what you're doing. 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) diff --git a/configure-libafs.in b/configure-libafs.in index 0b03d484b..af5bb9d3a 100644 --- a/configure-libafs.in +++ b/configure-libafs.in @@ -1,7 +1,7 @@ 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, @@ -189,6 +189,10 @@ case $system in MKAFS_OSTYPE=FBSD AC_MSG_RESULT(i386_fbsd) ;; + *-openbsd*) + MKAFS_OSTYPE=OBSD + AC_MSG_RESULT(i386_obsd) + ;; *) AC_MSG_RESULT($system) ;; @@ -210,15 +214,18 @@ else ;; 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" @@ -461,6 +468,7 @@ AC_SUBST(TOP_LIBDIR) AC_SUBST(DEST) AC_SUBST(WITH_OBSOLETE) AC_SUBST(WITH_INSECURE) +AC_SUBST(DARWIN_INFOFILE) AC_OUTPUT( \ Makefile \ diff --git a/src/WINNT/afs_setup_utils/afsrm.c b/src/WINNT/afs_setup_utils/afsrm.c index 5970cb49e..1761a76fa 100644 --- a/src/WINNT/afs_setup_utils/afsrm.c +++ b/src/WINNT/afs_setup_utils/afsrm.c @@ -50,7 +50,7 @@ int main(int argc, char *argv[]) int code; /* initialize command syntax */ - initialize_cmd_error_table(); + initialize_CMD_error_table(); SetupCmd(); /* execute command */ diff --git a/src/WINNT/afsadmsvr/NTMakefile b/src/WINNT/afsadmsvr/NTMakefile index 6e581040a..0e5de4c1a 100644 --- a/src/WINNT/afsadmsvr/NTMakefile +++ b/src/WINNT/afsadmsvr/NTMakefile @@ -123,11 +123,21 @@ afsapplib_primary : 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) @@ -141,7 +151,7 @@ install : \ 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 diff --git a/src/WINNT/afsd/cm_config.c b/src/WINNT/afsd/cm_config.c index 2e1261b20..a3ef82f3f 100644 --- a/src/WINNT/afsd/cm_config.c +++ b/src/WINNT/afsd/cm_config.c @@ -113,8 +113,8 @@ long cm_SearchCellFile(char *cellNamep, char *newCellNamep, 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 diff --git a/src/WINNT/afsd/cm_utils.h b/src/WINNT/afsd/cm_utils.h index 4184bf84e..2f514783e 100644 --- a/src/WINNT/afsd/cm_utils.h +++ b/src/WINNT/afsd/cm_utils.h @@ -17,7 +17,7 @@ typedef struct cm_space { } 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); diff --git a/src/WINNT/afsreg/test/regman.c b/src/WINNT/afsreg/test/regman.c index c8d95cbb3..a02b96eaf 100644 --- a/src/WINNT/afsreg/test/regman.c +++ b/src/WINNT/afsreg/test/regman.c @@ -344,7 +344,7 @@ int main(int argc, char *argv[]) whoami = argv[0]; /* initialize command syntax */ - initialize_cmd_error_table(); + initialize_CMD_error_table(); SetupVptCmd(); SetupDirCmd(); diff --git a/src/WINNT/afssvrcfg/afscfg.cpp b/src/WINNT/afssvrcfg/afscfg.cpp index 2420915eb..2f41449dc 100644 --- a/src/WINNT/afssvrcfg/afscfg.cpp +++ b/src/WINNT/afssvrcfg/afscfg.cpp @@ -180,16 +180,6 @@ int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrev, LPSTR pszCmdLineA, int nCm 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(); diff --git a/src/WINNT/license/lang/NTMakefile b/src/WINNT/license/lang/NTMakefile index 09c3572ae..89c784446 100644 --- a/src/WINNT/license/lang/NTMakefile +++ b/src/WINNT/license/lang/NTMakefile @@ -24,3 +24,5 @@ install : @$(DESTDIR)\bin\sgml2rtf -1252 es_ES.ide @$(DESTDIR)\bin\sgml2rtf -1252 de_DE.ide +clean :: + $(DEL) *.rtf diff --git a/src/afs/VNOPS/afs_vnop_write.c b/src/afs/VNOPS/afs_vnop_write.c index 9a5c9b082..204243d52 100644 --- a/src/afs/VNOPS/afs_vnop_write.c +++ b/src/afs/VNOPS/afs_vnop_write.c @@ -20,7 +20,7 @@ #include #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 */ @@ -171,7 +171,7 @@ afs_MemWrite(avc, auio, aio, acred, noLock) 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. @@ -280,7 +280,7 @@ afs_MemWrite(avc, auio, aio, acred, noLock) 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. diff --git a/src/afs/afs_analyze.c b/src/afs/afs_analyze.c index 8b958ef5e..3c3af3e5b 100644 --- a/src/afs/afs_analyze.c +++ b/src/afs/afs_analyze.c @@ -13,7 +13,7 @@ #include #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 */ @@ -48,13 +48,13 @@ RCSID("$Header: /tmp/cvstemp/openafs/src/afs/afs_analyze.c,v 1.1.1.6 2001/07/14 /* 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 */ @@ -481,7 +481,7 @@ int afs_Analyze(aconn, acode, afid, areq, op, locktype, cellp) 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; @@ -525,7 +525,7 @@ int afs_Analyze(aconn, acode, afid, areq, op, locktype, cellp) 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)++; @@ -561,8 +561,8 @@ int afs_Analyze(aconn, acode, afid, areq, op, locktype, cellp) } } } - 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; } diff --git a/src/afs/afs_callback.c b/src/afs/afs_callback.c index a447223d7..100949b67 100644 --- a/src/afs/afs_callback.c +++ b/src/afs/afs_callback.c @@ -16,7 +16,7 @@ #include #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*/ @@ -1160,7 +1160,7 @@ int SRXAFSCB_GetCellServDB( t_name[i] = '\0'; if (p_name) - bcopy(p_name, t_name, i); + memcpy(t_name, p_name, i); ReleaseReadLock(&afs_xcell); @@ -1237,7 +1237,7 @@ int SRXAFSCB_GetLocalCell( t_name[plen] = '\0'; if (p_name) - bcopy(p_name, t_name, plen); + memcpy(t_name, p_name, plen); ReleaseReadLock(&afs_xcell); diff --git a/src/afs/afs_trace.et b/src/afs/afs_trace.et index ad4fc9751..42dd71547 100644 --- a/src/afs/afs_trace.et +++ b/src/afs/afs_trace.et @@ -5,7 +5,7 @@ # 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)" diff --git a/src/afs/afs_volume.c b/src/afs/afs_volume.c index d197e5863..81f9caf70 100644 --- a/src/afs/afs_volume.c +++ b/src/afs/afs_volume.c @@ -18,7 +18,7 @@ #include #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 */ @@ -56,12 +56,11 @@ extern struct srvAddr *afs_srvAddrs[NSERVERS]; /* Hashed by server's ip */ 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 */ diff --git a/src/afs/sysincludes.h b/src/afs/sysincludes.h index 0475cedf9..14c42fbd7 100644 --- a/src/afs/sysincludes.h +++ b/src/afs/sysincludes.h @@ -10,6 +10,39 @@ #ifndef __AFS_SYSINCLUDESH__ #define __AFS_SYSINCLUDESH__ 1 +#ifdef AFS_OBSD_ENV +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#else /* AFS_OBSD_ENV */ #ifdef AFS_LINUX22_ENV #include #include @@ -336,5 +369,6 @@ struct vfspage; /* for vnode.h compiler warnings */ #endif /* AFS_OSF_ENV */ #endif /* AFS_LINUX22_ENV */ +#endif /* AFS_OBSD_ENV */ #endif /* __AFS_SYSINCLUDESH__ so idempotent */ diff --git a/src/afsd/Makefile.in b/src/afsd/Makefile.in index 77e253219..cc5b65b98 100644 --- a/src/afsd/Makefile.in +++ b/src/afsd/Makefile.in @@ -118,8 +118,6 @@ dest: ${DEST}/root.client/usr/vice/etc/afsd ${DEST}/etc/vsys ${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*) \ diff --git a/src/afsd/afsd.c b/src/afsd/afsd.c index b9547960b..25830a36c 100644 --- a/src/afsd/afsd.c +++ b/src/afsd/afsd.c @@ -55,7 +55,7 @@ #include #include -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 @@ -146,7 +146,7 @@ void set_staticaddrs(void); #if AFS_HAVE_STATVFS #include #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 #endif #endif diff --git a/src/auth/NTMakefile b/src/auth/NTMakefile index c9aa3af70..5d9cb48d8 100644 --- a/src/auth/NTMakefile +++ b/src/auth/NTMakefile @@ -108,6 +108,7 @@ install9x: install clean:: $(DEL) acfg_errors.c ktc_errors.c $(DEL) $(INCFILEDIR)\auth.h $(INCFILEDIR)\cellconfig.h - + $(DEL) auth.h cellconfig.h setkey: $(SETKEY_EXEFILE) + diff --git a/src/auth/acfg_errors.et b/src/auth/acfg_errors.et index 22ab28962..913f21e56 100644 --- a/src/auth/acfg_errors.et +++ b/src/auth/acfg_errors.et @@ -9,7 +9,7 @@ # 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" diff --git a/src/auth/authcon.c b/src/auth/authcon.c index 472f9eee0..be3b2951c 100644 --- a/src/auth/authcon.c +++ b/src/auth/authcon.c @@ -14,7 +14,7 @@ #include #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" @@ -99,9 +99,7 @@ rxkad_level enclevel; { 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); diff --git a/src/auth/cellconfig.c b/src/auth/cellconfig.c index 666b2769d..99227e4c9 100644 --- a/src/auth/cellconfig.c +++ b/src/auth/cellconfig.c @@ -10,7 +10,7 @@ #include #include -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 #include @@ -191,10 +191,15 @@ register struct afsconf_dir *adir; { 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); @@ -202,14 +207,11 @@ register struct afsconf_dir *adir; { 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); @@ -238,7 +240,7 @@ register char *adir; { /* The "AFSCONF" environment (or contents of "/.AFSCONF") will be typically set to something like "/afs//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 */ @@ -557,7 +559,8 @@ afsconf_GetAfsdbInfo(acellName, aservice, acellInfo) 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]; @@ -654,7 +657,8 @@ struct afsconf_cell *acellInfo; { register afs_int32 i; int tservice; char *tcell; - int cnLen, ambig; + size_t cnLen; + int ambig; char tbuffer[64]; LOCK_GLOBAL_MUTEX diff --git a/src/auth/ktc_errors.et b/src/auth/ktc_errors.et index 2de18f8a7..510a852e8 100644 --- a/src/auth/ktc_errors.et +++ b/src/auth/ktc_errors.et @@ -9,7 +9,7 @@ # 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" diff --git a/src/auth/userok.c b/src/auth/userok.c index 689aac59c..acf454b40 100644 --- a/src/auth/userok.c +++ b/src/auth/userok.c @@ -10,7 +10,7 @@ #include #include -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 #include @@ -231,7 +231,6 @@ register char *auser; { char tbuffer[256]; register bufio_p bp; char tname[64]; - register char *tp; register int flag; register afs_int32 code; int rc; diff --git a/src/bozo/NTMakefile b/src/bozo/NTMakefile index bccef34d9..4653dc80c 100644 --- a/src/bozo/NTMakefile +++ b/src/bozo/NTMakefile @@ -144,3 +144,4 @@ install: $(BOS_LIBFILE) $(BOSSERVER_EXEFILE) $(CL_BOS_EXEFILE) $(INCFILES) # Local clean target; augments predefined clean target clean:: + $(DEL) bnode.h boserr.c bosint.cs.c bosint.h bosint.ss.c bosint.xdr.c diff --git a/src/bozo/bos.c b/src/bozo/bos.c index c9ac6d37f..3f9603b63 100644 --- a/src/bozo/bos.c +++ b/src/bozo/bos.c @@ -10,7 +10,7 @@ #include #include -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 #include @@ -387,6 +387,7 @@ register struct cmd_syndesc *as; { printf("\n"); } } + return 0; } static UnInstall(as) @@ -1791,8 +1792,8 @@ main(argc, argv) 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"); diff --git a/src/bozo/boserr.et b/src/bozo/boserr.et index 9bc9701ee..458bbcada 100644 --- a/src/bozo/boserr.et +++ b/src/bozo/boserr.et @@ -10,7 +10,7 @@ # 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" diff --git a/src/bozo/bosoprocs.c b/src/bozo/bosoprocs.c index 1a74ad848..23d69e8d6 100644 --- a/src/bozo/bosoprocs.c +++ b/src/bozo/bosoprocs.c @@ -10,7 +10,7 @@ #include #include -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 #include @@ -147,7 +147,6 @@ BOZO_GetDates(acall, aname, atime, abakTime, aoldTime) 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]; @@ -1191,6 +1190,7 @@ int initBosEntryStats() 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) diff --git a/src/bozo/bosserver.c b/src/bozo/bosserver.c index fe4255429..5e418ff06 100644 --- a/src/bozo/bosserver.c +++ b/src/bozo/bosserver.c @@ -10,7 +10,7 @@ #include #include -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 #include @@ -52,6 +52,9 @@ extern int BOZO_ExecuteRequest(); 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]; @@ -666,7 +669,6 @@ char **envp; int noAuth = 0; struct ktc_encryptionKey tkey; int i; - pid_t newSessionID; char namebuf[AFSDIR_PATH_MAX]; #ifdef AFS_AIX32_ENV @@ -919,6 +921,7 @@ char **envp; 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]; diff --git a/src/bozo/cronbnodeops.c b/src/bozo/cronbnodeops.c index a3b30926b..42394173b 100644 --- a/src/bozo/cronbnodeops.c +++ b/src/bozo/cronbnodeops.c @@ -10,7 +10,7 @@ #include #include -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 #include @@ -120,6 +120,7 @@ register struct cronbnode *abnode; { if (temp < 1) temp = 1; /* temp is when to start dude */ bnode_SetTimeout(abnode, temp); } + return 0; } static int cron_restartp (abnode) diff --git a/src/bozo/fsbnodeops.c b/src/bozo/fsbnodeops.c index ed47e073d..189b2bf4b 100644 --- a/src/bozo/fsbnodeops.c +++ b/src/bozo/fsbnodeops.c @@ -10,7 +10,7 @@ #include #include -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 #include @@ -397,6 +397,7 @@ struct fsbnode *abnode; { } } SetNeedsClock(abnode); + return 0; } static int fs_getstat(abnode, astatus) diff --git a/src/bubasics/butc_errs.et b/src/bubasics/butc_errs.et index 9c1d7cf10..65bc6d65d 100644 --- a/src/bubasics/butc_errs.et +++ b/src/bubasics/butc_errs.et @@ -7,7 +7,7 @@ # 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 " diff --git a/src/bubasics/butm_errs.et b/src/bubasics/butm_errs.et index 641edeb0d..3e72fdb5d 100644 --- a/src/bubasics/butm_errs.et +++ b/src/bubasics/butm_errs.et @@ -9,7 +9,7 @@ # 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" diff --git a/src/bubasics/butx_errs.et b/src/bubasics/butx_errs.et index ea839a7a8..428e72d1c 100644 --- a/src/bubasics/butx_errs.et +++ b/src/bubasics/butx_errs.et @@ -8,7 +8,7 @@ # 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" diff --git a/src/bucoord/NTMakefile b/src/bucoord/NTMakefile index 79c59d8af..bc2437b26 100644 --- a/src/bucoord/NTMakefile +++ b/src/bucoord/NTMakefile @@ -110,4 +110,5 @@ install: $(INCFILES) $(LIBFILE) $(EXEFILE) # Local clean target; augments predefined clean target clean:: + $(DEL) bc.h bucoord_errs.c diff --git a/src/bucoord/bucoord_errs.et b/src/bucoord/bucoord_errs.et index 098801066..5e3bbbeaf 100644 --- a/src/bucoord/bucoord_errs.et +++ b/src/bucoord/bucoord_errs.et @@ -7,7 +7,7 @@ # 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" diff --git a/src/bucoord/main.c b/src/bucoord/main.c index 8871b9a50..d6a95a070 100644 --- a/src/bucoord/main.c +++ b/src/bucoord/main.c @@ -10,7 +10,7 @@ #include #include -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 #include @@ -108,18 +108,18 @@ osi_audit() {return 0;} */ 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(); } /* @@ -232,7 +232,7 @@ static int backupInit() extern statusWatcher(); /* Initialization */ - initialize_cmd_error_table(); + initialize_CMD_error_table(); /* don't run more than once */ if (initd) diff --git a/src/budb/NTMakefile b/src/budb/NTMakefile index 08da52d7d..278bf71b8 100644 --- a/src/budb/NTMakefile +++ b/src/budb/NTMakefile @@ -116,5 +116,4 @@ install: $(INCFILES) $(LIBFILE) $(EXEFILE) clean:: $(DEL) budb_errs.c budb_errs.h budb.h budb_client.h - - + $(DEL) budb.cs.c budb.ss.c budb.xdr.c diff --git a/src/budb/budb_errs.et b/src/budb/budb_errs.et index 5e58764ac..6d64c3469 100644 --- a/src/budb/budb_errs.et +++ b/src/budb/budb_errs.et @@ -12,7 +12,7 @@ # 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" diff --git a/src/budb/server.c b/src/budb/server.c index 9b6dc1a85..e422d45a3 100644 --- a/src/budb/server.c +++ b/src/budb/server.c @@ -10,7 +10,7 @@ #include #include -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 @@ -339,7 +339,7 @@ main(argc, argv) #endif osi_audit(BUDB_StartEvent, 0, AUD_END); - initialize_budb_error_table(); + initialize_BUDB_error_table(); initializeArgHandler(); /* Initialize dirpaths */ diff --git a/src/butc/tcmain.c b/src/butc/tcmain.c index 99bc27211..ea35f8966 100644 --- a/src/butc/tcmain.c +++ b/src/butc/tcmain.c @@ -10,7 +10,7 @@ #include #include -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 #include @@ -838,20 +838,20 @@ char *arock; { 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) { diff --git a/src/butm/butm_test.c b/src/butm/butm_test.c index ee0377d72..95574ab84 100644 --- a/src/butm/butm_test.c +++ b/src/butm/butm_test.c @@ -10,7 +10,7 @@ #include #include -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 #include @@ -71,7 +71,7 @@ main (argc, argv) /* ------------- * General Setup * ------------- */ - initialize_butm_error_table(); + initialize_BUTM_error_table(); tapeInfo.structVersion = BUTM_MAJORVERSION; diff --git a/src/butm/test_ftm.c b/src/butm/test_ftm.c index 7ffdcf206..5a1b34da3 100644 --- a/src/butm/test_ftm.c +++ b/src/butm/test_ftm.c @@ -10,7 +10,7 @@ #include #include -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 #include @@ -114,7 +114,7 @@ main (argc, argv) TestInfo ti; whoami = argv[0]; - initialize_butm_error_table(); + initialize_BUTM_error_table(); if (argc < 2) goto usage; diff --git a/src/cmd/NTMakefile b/src/cmd/NTMakefile index 2661949cc..2d2fa5732 100644 --- a/src/cmd/NTMakefile +++ b/src/cmd/NTMakefile @@ -38,7 +38,7 @@ install: $(LIBFILE) $(INCFILES) install9x: install clean:: - $(DEL) cmd_errors.c + $(DEL) cmd_errors.c cmd.h $(DEL) $(LIBFILE) test tests: diff --git a/src/cmd/cmd.c b/src/cmd/cmd.c index 5e62296ca..cf9823232 100644 --- a/src/cmd/cmd.c +++ b/src/cmd/cmd.c @@ -10,7 +10,7 @@ #include #include -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 #include @@ -68,7 +68,7 @@ static int FindType(as, aname) register struct cmd_syndesc *as; register char *aname; { register int i; - int cmdlen; + size_t cmdlen; int ambig; int best; @@ -95,7 +95,7 @@ int *aambig; char *aname; { register struct cmd_syndesc *ts; struct cmd_syndesc *best; - int cmdLen; + size_t cmdLen; int ambig; cmdLen = strlen(aname); @@ -199,7 +199,7 @@ void PrintFlagHelp(as) 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 */ diff --git a/src/cmd/cmd_errors.et b/src/cmd/cmd_errors.et index 5b20ff6dd..91834975c 100644 --- a/src/cmd/cmd_errors.et +++ b/src/cmd/cmd_errors.et @@ -7,7 +7,7 @@ # */ -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" diff --git a/src/cmd/test/itest.c b/src/cmd/test/itest.c index 2340df5ba..73a1485db 100644 --- a/src/cmd/test/itest.c +++ b/src/cmd/test/itest.c @@ -10,7 +10,7 @@ #include #include -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 @@ -54,7 +54,7 @@ char **argv; { long code; char *tv[100]; - initialize_cmd_error_table(); + initialize_CMD_error_table(); ts = cmd_CreateSyntax("apple", cproc1, (char *) 0, "describe apple"); diff --git a/src/comerr/compile_et.c b/src/comerr/compile_et.c index 6d5b60b30..66c4d7491 100644 --- a/src/comerr/compile_et.c +++ b/src/comerr/compile_et.c @@ -11,7 +11,7 @@ #include #include -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 #include @@ -133,6 +133,7 @@ int main (argc, argv) int argc; char **argv; { char const * const *cpp; int got_language = 0; char *got_include = 0; + char lcname[6]; #ifdef AFS_AIX32_ENV /* @@ -364,6 +365,14 @@ int main (argc, argv) int argc; char **argv; { 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); diff --git a/src/comerr/error_table.y b/src/comerr/error_table.y index 16b5a28d4..755426990 100644 --- a/src/comerr/error_table.y +++ b/src/comerr/error_table.y @@ -2,7 +2,7 @@ #include #include -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 $"); /* * @@ -276,9 +276,7 @@ int char_to_num(char c) } 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; @@ -289,7 +287,6 @@ void set_table_num(char *string) 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 ", diff --git a/src/comerr/error_table_nt.c b/src/comerr/error_table_nt.c index f37ed7ad5..8c218caca 100755 --- a/src/comerr/error_table_nt.c +++ b/src/comerr/error_table_nt.c @@ -1,1233 +1,1230 @@ - -/* 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" - + +/* 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 -#include - -RCSID("$Header: /tmp/cvstemp/openafs/src/comerr/error_table_nt.c,v 1.1.1.3 2001/07/14 22:21:14 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 -# ifndef __STDC__ -# define __STDC__ 1 -# endif -#endif - -#include -#include -#include - -#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 - -#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 -#else /* not sparc */ -#if defined (MSDOS) && !defined (__TURBOC__) -#include -#else /* not MSDOS, or __TURBOC__ */ -#if defined(_AIX) -#include - #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 - -#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 - -#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" - - 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 -#endif -#include -#include -#include -#include -#ifdef AFS_NT40_ENV -#include -#include -#else -#include -#endif -#include -#include "error_table.h" -#include "mit-sipb-cr.h" -#include - -/* 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) -{ char ucname[6]; /* I think 5 is enough but et_name.c used 6... */ - extern char *ucstring(); - - 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); - } - 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 ", - "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 + +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 +# ifndef __STDC__ +# define __STDC__ 1 +# endif +#endif + +#include +#include +#include + +#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 + +#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 +#else /* not sparc */ +#if defined (MSDOS) && !defined (__TURBOC__) +#include +#else /* not MSDOS, or __TURBOC__ */ +#if defined(_AIX) +#include + #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 + +#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 + +#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" + + 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 +#endif +#include +#include +#include +#include +#ifdef AFS_NT40_ENV +#include +#include +#else +#include +#endif +#include +#include "error_table.h" +#include "mit-sipb-cr.h" +#include + +/* 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 diff --git a/src/comerr/test/test.c b/src/comerr/test/test.c index 012c01738..4a347e3bc 100644 --- a/src/comerr/test/test.c +++ b/src/comerr/test/test.c @@ -1,7 +1,7 @@ #include #include -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 #include @@ -27,18 +27,18 @@ main() 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)); diff --git a/src/comerr/test/test1.et b/src/comerr/test/test1.et index 4c7b77f0e..b66a4e98b 100644 --- a/src/comerr/test/test1.et +++ b/src/comerr/test/test1.et @@ -1,4 +1,4 @@ - error_table krb + error_table KRB error_code KRB_MK_AP_TKFIL, "Can't read ticket file" diff --git a/src/comerr/test/test2.et b/src/comerr/test/test2.et index 55ad74ead..549e14c82 100644 --- a/src/comerr/test/test2.et +++ b/src/comerr/test/test2.et @@ -1,4 +1,4 @@ - error_table quux + error_table QUUX ec FOO_ERR, "foo" diff --git a/src/dauth/dlog.c b/src/dauth/dlog.c index 04ecfd2f8..9191bdfe0 100644 --- a/src/dauth/dlog.c +++ b/src/dauth/dlog.c @@ -71,7 +71,7 @@ #include #include -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 #include @@ -400,9 +400,9 @@ main (argc, argv) 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"); diff --git a/src/des/NTMakefile b/src/des/NTMakefile index 1f15d978b..2c47be427 100644 --- a/src/des/NTMakefile +++ b/src/des/NTMakefile @@ -138,4 +138,5 @@ install: $(GENERATED_FILES) $(LIBFILE) $(INCFILES) install9x: install clean:: - $(DEL) $(LIBFILE) \ No newline at end of file + $(DEL) $(LIBFILE) $(GENERATED_FILES) + diff --git a/src/des/andrew-conf.h b/src/des/andrew-conf.h index c294e857a..edf8d0e1e 100644 --- a/src/des/andrew-conf.h +++ b/src/des/andrew-conf.h @@ -39,6 +39,9 @@ #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" @@ -74,6 +77,7 @@ Figure out what the machine looks like and fix this file to include it. #endif #endif /* AFS_LINUX20_ENV */ #endif /* AFS_NT40_ENV */ +#endif /* AFS_XBSD_ENV */ #endif /* NCR || X86 */ #endif /* __alpha */ #endif /* SGI */ diff --git a/src/des/read_pssword.c b/src/des/read_pssword.c index 6a8115785..0de08feac 100644 --- a/src/des/read_pssword.c +++ b/src/des/read_pssword.c @@ -14,7 +14,7 @@ #include #include -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 #include @@ -62,7 +62,7 @@ static int intrupt; #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 @@ -112,7 +112,7 @@ lose: 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 @@ -134,12 +134,12 @@ des_read_pw_string(s,maxa,prompt,verify) { 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) @@ -172,7 +172,7 @@ des_read_pw_string(s,maxa,prompt,verify) 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. */ @@ -310,7 +310,7 @@ lose: 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. @@ -400,7 +400,7 @@ sig_restore() #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) { diff --git a/src/dir/buffer.c b/src/dir/buffer.c index 218ee7568..acd09aa5d 100644 --- a/src/dir/buffer.c +++ b/src/dir/buffer.c @@ -10,7 +10,7 @@ #include #include -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 #include @@ -75,6 +75,7 @@ int DStat (abuffers, acalls, aios) {*abuffers = nbuffers; *acalls = calls; *aios = ios; + return 0; } int DInit (abuffers) @@ -215,7 +216,7 @@ struct buffer *newslot (afid, apage, lp) 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)) { @@ -263,6 +264,7 @@ struct buffer *newslot (afid, apage, lp) return lp; } +void DRelease (bp,flag) register struct buffer *bp; int flag; diff --git a/src/dir/salvage.c b/src/dir/salvage.c index f7022389e..b41639069 100644 --- a/src/dir/salvage.c +++ b/src/dir/salvage.c @@ -12,7 +12,7 @@ #include #include -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 #include @@ -393,7 +393,7 @@ int DirSalvage (fromFile, toFile, vn, vu, pvn, pvu) 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; diff --git a/src/finale/translate_et.c b/src/finale/translate_et.c index 009552d73..b23dd7d2e 100644 --- a/src/finale/translate_et.c +++ b/src/finale/translate_et.c @@ -10,7 +10,7 @@ #include #include -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 #include @@ -55,16 +55,16 @@ main (argc, argv) 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 []+\n", argv[0]); diff --git a/src/kauth/NTMakefile b/src/kauth/NTMakefile index 7a48d4c06..def0154fe 100644 --- a/src/kauth/NTMakefile +++ b/src/kauth/NTMakefile @@ -219,6 +219,6 @@ $(DESTDIR)\etc\kas.exe: $(DESTDIR)\root.server\usr\afs\bin\kas.exe clean:: $(DEL) $(KPASSWD_EXEFILE) - - + $(DEL) kauth.cs.c kauth.h kauth.ss.c kauth.xdr.c kautils.h + $(DEL) kaerrors.c diff --git a/src/kauth/admin_tools.c b/src/kauth/admin_tools.c index b64a3b9d7..2f018803e 100644 --- a/src/kauth/admin_tools.c +++ b/src/kauth/admin_tools.c @@ -15,7 +15,7 @@ #include #include -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 #include @@ -1449,9 +1449,10 @@ static ForgetTicket ( 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 diff --git a/src/kauth/authclient.c b/src/kauth/authclient.c index 9ed8803b8..93e71f2a1 100644 --- a/src/kauth/authclient.c +++ b/src/kauth/authclient.c @@ -16,7 +16,7 @@ #include #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" @@ -637,7 +637,6 @@ afs_int32 ka_GetToken ( des_key_schedule schedule; int version; afs_int32 pwexpires; - char bob[KA_TIMESTR_LEN]; LOCK_GLOBAL_MUTEX aticket.SeqLen = auth_token->ticketLen; diff --git a/src/kauth/client.c b/src/kauth/client.c index 7a9ed426c..1c61bb925 100644 --- a/src/kauth/client.c +++ b/src/kauth/client.c @@ -14,7 +14,7 @@ #include #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" @@ -294,11 +294,11 @@ afs_int32 ka_Init(int flags) /* reserved for future use. */ 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 diff --git a/src/kauth/decode_ticket.c b/src/kauth/decode_ticket.c index 0e9bd3328..e556e9c89 100644 --- a/src/kauth/decode_ticket.c +++ b/src/kauth/decode_ticket.c @@ -10,7 +10,7 @@ #include #include -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 #include @@ -35,8 +35,8 @@ int main ( 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); diff --git a/src/kauth/kaauxdb.c b/src/kauth/kaauxdb.c index e0093ecff..3749ae79d 100644 --- a/src/kauth/kaauxdb.c +++ b/src/kauth/kaauxdb.c @@ -14,7 +14,7 @@ #include #include -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 #ifdef AFS_NT40_ENV @@ -165,7 +165,6 @@ int kaux_islocked( 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... diff --git a/src/kauth/kaerrors.et b/src/kauth/kaerrors.et index 1051410b6..910dac92e 100644 --- a/src/kauth/kaerrors.et +++ b/src/kauth/kaerrors.et @@ -12,7 +12,7 @@ # 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" diff --git a/src/kauth/kaprocs.c b/src/kauth/kaprocs.c index 4c6e422a1..7c9cd31e5 100644 --- a/src/kauth/kaprocs.c +++ b/src/kauth/kaprocs.c @@ -10,7 +10,7 @@ #include #include -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 #include @@ -707,7 +707,6 @@ impose_reuse_limits ( password, tentry ) int code; Date now; int i; - int reuse_p; extern int MinHours; afs_uint32 newsum; @@ -1277,8 +1276,7 @@ afs_int32 kamSetFields (call, aname, ainstance, aflags, 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); @@ -1953,13 +1951,16 @@ afs_int32 kamGetPassword (call, name, password) 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)) @@ -1968,9 +1969,12 @@ afs_int32 kamGetPassword (call, name, password) /* 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; @@ -1984,6 +1988,7 @@ afs_int32 kamGetPassword (call, name, password) memcpy(password, &tentry.key, sizeof (*password)); code = ubik_EndTrans (tt); + } #endif return code; } diff --git a/src/kauth/kas.c b/src/kauth/kas.c index c502e8c53..4e3c40cae 100644 --- a/src/kauth/kas.c +++ b/src/kauth/kas.c @@ -11,7 +11,7 @@ #include #include -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 #ifdef AFS_AIX32_ENV @@ -59,11 +59,11 @@ int main ( 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 */ diff --git a/src/kauth/kaserver.c b/src/kauth/kaserver.c index 06c35809b..be036dfaa 100644 --- a/src/kauth/kaserver.c +++ b/src/kauth/kaserver.c @@ -10,7 +10,7 @@ #include #include -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 #include @@ -55,7 +55,7 @@ int MinHours = 0; int npwSums = KA_NPWSUMS; /* needs to be variable sometime */ #include -#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 diff --git a/src/kauth/kautils.p.h b/src/kauth/kautils.p.h index da3756c97..717775f87 100644 --- a/src/kauth/kautils.p.h +++ b/src/kauth/kautils.p.h @@ -428,10 +428,10 @@ struct ka_getTicketAnswer { 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 diff --git a/src/kauth/klogin.c b/src/kauth/klogin.c index 2b76696fe..f96c02530 100644 --- a/src/kauth/klogin.c +++ b/src/kauth/klogin.c @@ -21,9 +21,9 @@ #include #include -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 #define quota(a,b,c,d) 0 diff --git a/src/kauth/krb_udp.c b/src/kauth/krb_udp.c index 009e8be33..bf9093cc7 100644 --- a/src/kauth/krb_udp.c +++ b/src/kauth/krb_udp.c @@ -15,7 +15,7 @@ #include #include -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 #include @@ -100,7 +100,6 @@ int fiveminutes=300; static FiveMinuteCheckLWP() { - struct timeval time; printf("start 5 min check lwp\n"); @@ -554,7 +553,7 @@ fail: 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; @@ -576,7 +575,7 @@ static err_packet (ksoc, pkt, code, reason) 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; @@ -601,8 +600,10 @@ static err_packet (ksoc, pkt, code, reason) code, ans.len); else perror ("err_packet: sendto"); } + return 0; } +int process_udp_auth (ksoc, pkt) int ksoc; struct packet *pkt; @@ -632,7 +633,7 @@ process_udp_auth (ksoc, 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); @@ -644,13 +645,13 @@ process_udp_auth (ksoc, pkt) 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, @@ -665,9 +666,10 @@ process_udp_auth (ksoc, pkt) } else err_packet (ksoc, pkt, code, (char *)error_message (code)); } - return; + return 0; } +int process_udp_appl (ksoc, pkt) int ksoc; struct packet *pkt; @@ -689,13 +691,13 @@ process_udp_appl (ksoc, 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; @@ -703,10 +705,12 @@ process_udp_appl (ksoc, pkt) 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; diff --git a/src/kauth/rebuild.c b/src/kauth/rebuild.c index 64cf2dff3..f33baa1c0 100644 --- a/src/kauth/rebuild.c +++ b/src/kauth/rebuild.c @@ -10,7 +10,7 @@ #include #include -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 #include @@ -41,6 +41,8 @@ char *whoami = "kadb_check"; int fd; FILE *out; +void badEntry(); + int listuheader, listkheader, listentries, verbose; int readUbikHeader() @@ -82,6 +84,7 @@ int readUbikHeader() return(0); } +void PrintHeader(header) struct kaheader *header; { @@ -100,6 +103,7 @@ PrintHeader(header) printf("stats.cpw commands = %d\n", header->stats.cpws); } +void PrintEntry(index, entry) afs_int32 index; struct kaentry *entry; @@ -221,6 +225,7 @@ char *EntryName(entryp) return(principal); } +void RebuildEntry(entryp) struct kaentry *entryp; { @@ -365,7 +370,6 @@ WorkerBee (as, arock) char *arock; { afs_int32 code; - int a; char *dbFile; char *outFile; afs_int32 index; @@ -556,6 +560,7 @@ WorkerBee (as, arock) exit (code != 0); } +void badEntry(e, i) afs_int32 e, i; { @@ -585,7 +590,6 @@ main (argc, argv) char *argv[]; { struct cmd_syndesc *ts; - struct cmd_item *ti; setlinebuf(stdout); diff --git a/src/kauth/test/test_getticket.c b/src/kauth/test/test_getticket.c index 38dcb795a..114aea84b 100644 --- a/src/kauth/test/test_getticket.c +++ b/src/kauth/test/test_getticket.c @@ -10,7 +10,7 @@ #include #include -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 #include @@ -472,12 +472,12 @@ int main(argc, argv) 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, diff --git a/src/kauth/test/test_interim_ktc.c b/src/kauth/test/test_interim_ktc.c index 7905cd101..f2c0c22e1 100644 --- a/src/kauth/test/test_interim_ktc.c +++ b/src/kauth/test/test_interim_ktc.c @@ -18,7 +18,7 @@ #include #include -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 #include @@ -733,11 +733,11 @@ main (argc, argv) 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, ""); diff --git a/src/kauth/test/test_rxkad_free.c b/src/kauth/test/test_rxkad_free.c index 95516417f..7387e002e 100644 --- a/src/kauth/test/test_rxkad_free.c +++ b/src/kauth/test/test_rxkad_free.c @@ -10,7 +10,7 @@ #include #include -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 #include @@ -340,12 +340,12 @@ int main(argc, argv) 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, diff --git a/src/kauth/token.c b/src/kauth/token.c index 90db9f595..14598411e 100644 --- a/src/kauth/token.c +++ b/src/kauth/token.c @@ -18,7 +18,7 @@ #include #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" @@ -320,8 +320,6 @@ afs_int32 ka_VerifyUserToken( 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 diff --git a/src/kauth/user.c b/src/kauth/user.c index 8cca463ea..668bfd578 100644 --- a/src/kauth/user.c +++ b/src/kauth/user.c @@ -17,7 +17,7 @@ #include #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" @@ -186,7 +186,7 @@ afs_int32 ka_UserAuthenticateGeneral ( } #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 diff --git a/src/libacl/aclprocs.c b/src/libacl/aclprocs.c index 2377a4c13..37eba2424 100644 --- a/src/libacl/aclprocs.c +++ b/src/libacl/aclprocs.c @@ -16,7 +16,7 @@ #include #include -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 #ifdef AFS_NT40_ENV @@ -222,7 +222,6 @@ struct acl_accessList **acl; register char *nextc; register afs_int32 code; int p,n; - char tbuf[PR_MAXNAMELEN+1]; namelist lnames; idlist lids; @@ -377,6 +376,7 @@ char *version; #ifdef AFS_PTHREAD_ENV assert(pthread_mutex_init(&acl_list_mutex, NULL) == 0); #endif /* AFS_PTHREAD_ENV */ + return 0; } int acl_IsAMember(aid,cps) diff --git a/src/libadmin/adminutil/afs_AdminBosErrors.et b/src/libadmin/adminutil/afs_AdminBosErrors.et index bbb11ab7b..1d4a55466 100644 --- a/src/libadmin/adminutil/afs_AdminBosErrors.et +++ b/src/libadmin/adminutil/afs_AdminBosErrors.et @@ -5,7 +5,7 @@ # 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" diff --git a/src/libadmin/adminutil/afs_AdminCfgErrors.et b/src/libadmin/adminutil/afs_AdminCfgErrors.et index 1ba332802..58729984b 100644 --- a/src/libadmin/adminutil/afs_AdminCfgErrors.et +++ b/src/libadmin/adminutil/afs_AdminCfgErrors.et @@ -5,7 +5,7 @@ # 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" diff --git a/src/libadmin/adminutil/afs_AdminClientErrors.et b/src/libadmin/adminutil/afs_AdminClientErrors.et index 98b2609b9..b76513f24 100644 --- a/src/libadmin/adminutil/afs_AdminClientErrors.et +++ b/src/libadmin/adminutil/afs_AdminClientErrors.et @@ -5,7 +5,7 @@ # 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." diff --git a/src/libadmin/adminutil/afs_AdminCommonErrors.et b/src/libadmin/adminutil/afs_AdminCommonErrors.et index a20f420a9..1f54af665 100644 --- a/src/libadmin/adminutil/afs_AdminCommonErrors.et +++ b/src/libadmin/adminutil/afs_AdminCommonErrors.et @@ -5,7 +5,7 @@ # 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" diff --git a/src/libadmin/adminutil/afs_AdminKasErrors.et b/src/libadmin/adminutil/afs_AdminKasErrors.et index bd1c6e5e8..d6fdce391 100644 --- a/src/libadmin/adminutil/afs_AdminKasErrors.et +++ b/src/libadmin/adminutil/afs_AdminKasErrors.et @@ -5,7 +5,7 @@ # 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" diff --git a/src/libadmin/adminutil/afs_AdminMiscErrors.et b/src/libadmin/adminutil/afs_AdminMiscErrors.et index 9dd9a4a41..2dcb393c5 100644 --- a/src/libadmin/adminutil/afs_AdminMiscErrors.et +++ b/src/libadmin/adminutil/afs_AdminMiscErrors.et @@ -5,7 +5,7 @@ # 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." diff --git a/src/libadmin/adminutil/afs_AdminPtsErrors.et b/src/libadmin/adminutil/afs_AdminPtsErrors.et index c751e2899..72a1dcdb8 100644 --- a/src/libadmin/adminutil/afs_AdminPtsErrors.et +++ b/src/libadmin/adminutil/afs_AdminPtsErrors.et @@ -5,7 +5,7 @@ # 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" diff --git a/src/libadmin/adminutil/afs_AdminUtilErrors.et b/src/libadmin/adminutil/afs_AdminUtilErrors.et index d139eccbe..e60c2e5ea 100644 --- a/src/libadmin/adminutil/afs_AdminUtilErrors.et +++ b/src/libadmin/adminutil/afs_AdminUtilErrors.et @@ -5,7 +5,7 @@ # 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" diff --git a/src/libadmin/adminutil/afs_AdminVosErrors.et b/src/libadmin/adminutil/afs_AdminVosErrors.et index 0e560c158..158688ade 100644 --- a/src/libadmin/adminutil/afs_AdminVosErrors.et +++ b/src/libadmin/adminutil/afs_AdminVosErrors.et @@ -5,7 +5,7 @@ # 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." diff --git a/src/libadmin/adminutil/afs_utilAdmin.c b/src/libadmin/adminutil/afs_utilAdmin.c index e0b5c559a..d792c2e25 100644 --- a/src/libadmin/adminutil/afs_utilAdmin.c +++ b/src/libadmin/adminutil/afs_utilAdmin.c @@ -10,7 +10,7 @@ #include #include -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 #include @@ -59,25 +59,25 @@ static int error_init_done; 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; } diff --git a/src/libafs/MakefileProto.DARWIN.in b/src/libafs/MakefileProto.DARWIN.in index 91315c3b1..f4d95f5a1 100644 --- a/src/libafs/MakefileProto.DARWIN.in +++ b/src/libafs/MakefileProto.DARWIN.in @@ -1,5 +1,5 @@ #/* 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 # @@ -20,6 +20,7 @@ afssrvsbindir=@afssrvsbindir@ afssrvlibexecdir=@afssrvlibexecdir@ afskerneldir=@afskerneldir@ SYS_NAME=@AFS_SYSNAME@ +DARWIN_INFOFILE=../@DARWIN_INFOFILE@ include config/Makefile.${SYS_NAME} @@ -87,29 +88,28 @@ setup: 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} diff --git a/src/lwp/Makefile.in b/src/lwp/Makefile.in index 553460a09..ffb0679ff 100644 --- a/src/lwp/Makefile.in +++ b/src/lwp/Makefile.in @@ -82,6 +82,11 @@ process.o : process.s process.c 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;; \ *) \ diff --git a/src/lwp/process.s b/src/lwp/process.s index d24af7c89..f6f38a1c5 100644 --- a/src/lwp/process.s +++ b/src/lwp/process.s @@ -349,8 +349,16 @@ _returnto: #include #include #else +#ifdef AFS_XBSD_ENV +#include +#define ST_FLUSH_WINDOWS ST_FLUSHWIN +#define MINFRAME 92 +#define SA(x) (((x)+7)&~7) +#define STACK_ALIGN 8 +#else /* SunOS 4: */ #include #include +#endif #endif .data #ifdef AFS_SUN5_ENV @@ -1153,7 +1161,7 @@ LEAF(returnto,1) 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 @@ -1187,7 +1195,7 @@ LEAF(returnto,1) .set newsp,16 -#ifdef AFS_DJGPP_ENV +#if defined(AFS_DJGPP_ENV) || defined(AFS_XBSD_ENV) .globl _PRE_Block .globl _savecontext _savecontext: @@ -1199,7 +1207,7 @@ 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 */ @@ -1215,7 +1223,7 @@ L1: /* Shouldnt be here....*/ -#ifdef AFS_DJGPP_ENV +#if defined(AFS_DJGPP_ENV) || defined(AFS_XBSD_ENV) call _abort #else call abort @@ -1229,7 +1237,7 @@ L1: /* stack offset */ .set area2,8 -#ifdef AFS_DJGPP_ENV +#if defined(AFS_DJGPP_ENV) || defined(AFS_XBSD_ENV) .globl _returnto _returnto: #else @@ -1241,7 +1249,7 @@ returnto: 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... */ @@ -1251,7 +1259,7 @@ returnto: /* 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 diff --git a/src/lwp/waitkey.c b/src/lwp/waitkey.c index 42b38199d..17e4e4562 100644 --- a/src/lwp/waitkey.c +++ b/src/lwp/waitkey.c @@ -22,7 +22,7 @@ #include #include -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 #include @@ -164,7 +164,7 @@ int LWP_WaitForKeystroke(int seconds) 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 diff --git a/src/package/package.c b/src/package/package.c index ca74bd302..3bb55b05e 100644 --- a/src/package/package.c +++ b/src/package/package.c @@ -338,7 +338,7 @@ main(argc, argv) /* * Set up the appropriate error tables. */ - initialize_cmd_error_table(); + initialize_CMD_error_table(); /* * Parse command line switches & execute the command, then get the diff --git a/src/pinstall/install.c b/src/pinstall/install.c index e20034e2d..9d06ea8ba 100644 --- a/src/pinstall/install.c +++ b/src/pinstall/install.c @@ -49,7 +49,7 @@ Generic install command. Options are: #include #include -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 #include @@ -89,7 +89,7 @@ extern int sys_nerr; #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 @@ -152,7 +152,7 @@ atoo(astr) 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. @@ -204,6 +204,7 @@ char *iname, *oname; { return -1; } +#ifndef AFS_OBSD_ENV /* * done the copy, now strip if desired. */ @@ -234,6 +235,7 @@ char *iname, *oname; { return -1; } } +#endif return status; } @@ -473,7 +475,7 @@ main (argc, argv) #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 @@ -684,7 +686,7 @@ main (argc, argv) 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]))) diff --git a/src/ptserver/Makefile.in b/src/ptserver/Makefile.in index cb365a2eb..bf9eb2d76 100644 --- a/src/ptserver/Makefile.in +++ b/src/ptserver/Makefile.in @@ -147,7 +147,7 @@ ubik.o: ubik.c ${INCLS} 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 diff --git a/src/ptserver/NTMakefile b/src/ptserver/NTMakefile index 7c9d2bfc9..02ea65629 100644 --- a/src/ptserver/NTMakefile +++ b/src/ptserver/NTMakefile @@ -51,7 +51,7 @@ PTSERVER_EXEOBJS =\ ptprocs.obj \ utils.obj \ ptserver.res - + PTSERVER_EXELIBS =\ $(DESTDIR)\lib\afsubik.lib \ @@ -163,7 +163,7 @@ $(INCFILEDIR)\afs\prerror.h: $(INCFILEDIR)\afs\pterror.h $(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 @@ -180,7 +180,7 @@ TEST_LIBS = $(PTS_EXELIBS) readgroup.exe: readgroup.obj $(LIBFILE) $(TEST_LIBS) $(EXECONLINK) - + readpwd.exe: readpwd.obj $(LIBFILE) $(TEST_LIBS) $(EXECONLINK) diff --git a/src/ptserver/db_verify.c b/src/ptserver/db_verify.c index 318b65df9..d40f9426f 100644 --- a/src/ptserver/db_verify.c +++ b/src/ptserver/db_verify.c @@ -12,7 +12,7 @@ extern int errno; #include #include -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 #include @@ -222,7 +222,6 @@ int PrintEntryError (misc, ea, e, indent) struct prentry *e; int indent; { - int i; pr_PrintEntry (stderr, /*net order*/0, ea, e, indent); return 0; @@ -1045,11 +1044,8 @@ WorkerBee (as, arock) 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)); @@ -1099,7 +1095,6 @@ main (argc, argv) char *argv[]; { struct cmd_syndesc *ts; - struct cmd_item *ti; setlinebuf(stdout); diff --git a/src/ptserver/display.c b/src/ptserver/display.c index edf612b8a..1e3fe5f23 100644 --- a/src/ptserver/display.c +++ b/src/ptserver/display.c @@ -10,7 +10,7 @@ #include #include -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 #include @@ -32,7 +32,6 @@ static char *pr_TimeToString (time_t clock) { 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) { diff --git a/src/ptserver/ptclient.c b/src/ptserver/ptclient.c index f90061dfc..cc9dda4c5 100644 --- a/src/ptserver/ptclient.c +++ b/src/ptserver/ptclient.c @@ -10,7 +10,7 @@ #include #include -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 @@ -184,7 +184,7 @@ char **argv; #endif whoami = argv[0]; - initialize_pt_error_table(); + initialize_PT_error_table(); strcpy(confdir, AFSDIR_CLIENT_ETC_DIRPATH); cell = 0; diff --git a/src/ptserver/pterror.et b/src/ptserver/pterror.et index 8fa8cb65d..c1537bc1e 100644 --- a/src/ptserver/pterror.et +++ b/src/ptserver/pterror.et @@ -12,7 +12,7 @@ # 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" diff --git a/src/ptserver/ptprocs.c b/src/ptserver/ptprocs.c index db8dec12b..964731e3a 100644 --- a/src/ptserver/ptprocs.c +++ b/src/ptserver/ptprocs.c @@ -10,7 +10,7 @@ #include #include -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 #include @@ -1194,7 +1194,7 @@ afs_int32 listEntries(call, flag, startindex, bulkentries, nextstartindex) 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; diff --git a/src/ptserver/ptuser.c b/src/ptserver/ptuser.c index 69f015623..3029ccf45 100644 --- a/src/ptserver/ptuser.c +++ b/src/ptserver/ptuser.c @@ -14,7 +14,7 @@ #include #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" @@ -71,14 +71,10 @@ afs_int32 pr_Initialize (secLevel, confDir, cell) 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)) { /* diff --git a/src/ptserver/readgroup.c b/src/ptserver/readgroup.c index b46868536..54b8e1920 100644 --- a/src/ptserver/readgroup.c +++ b/src/ptserver/readgroup.c @@ -10,7 +10,7 @@ #include #include -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 #ifndef AFS_NT40_ENV @@ -27,7 +27,9 @@ RCSID("$Header: /tmp/cvstemp/openafs/src/ptserver/readgroup.c,v 1.1.1.5 2001/09/ #include "pterror.h" int verbose = 0; +void skip(); +void report_error (code, name, gname) afs_int32 code; char *name; @@ -66,7 +68,6 @@ char **argv; char buf[3000]; FILE *fp; char *ptr; - char *aptr; char *tmp; char *cellname; namelist lnames; @@ -195,6 +196,7 @@ char **argv; } } +void skip(s) char **s; { diff --git a/src/ptserver/testpt.c b/src/ptserver/testpt.c index 62844ccfa..7b9cdef03 100644 --- a/src/ptserver/testpt.c +++ b/src/ptserver/testpt.c @@ -10,7 +10,7 @@ #include #include -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 #include @@ -990,12 +990,12 @@ main (argc, argv) 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 */ diff --git a/src/ptserver/utils.c b/src/ptserver/utils.c index 465e6f989..a9b441e61 100644 --- a/src/ptserver/utils.c +++ b/src/ptserver/utils.c @@ -10,7 +10,7 @@ #include #include -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 #include @@ -402,7 +402,6 @@ register struct ubik_trans *at; char aname[PR_MAXNAMELEN]; afs_int32 *aid; { - register afs_int32 code; afs_int32 temp; struct prentry tentry; diff --git a/src/rx/rx_getaddr.c b/src/rx/rx_getaddr.c index 4abf762b2..e50becd17 100644 --- a/src/rx/rx_getaddr.c +++ b/src/rx/rx_getaddr.c @@ -10,7 +10,7 @@ #include #include -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 @@ -21,7 +21,7 @@ RCSID("$Header: /tmp/cvstemp/openafs/src/rx/rx_getaddr.c,v 1.1.1.6 2001/07/14 22 #include #include #include -#if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV) +#if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV) #include #include #include @@ -108,7 +108,7 @@ afs_int32 rxi_getaddr () #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)) @@ -135,7 +135,7 @@ rt_xaddrs(cp, cplim, rtinfo) /* 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 */ @@ -342,13 +342,13 @@ 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))) diff --git a/src/rx/rx_kcommon.c b/src/rx/rx_kcommon.c index 1d919e69d..9b0330ea3 100644 --- a/src/rx/rx_kcommon.c +++ b/src/rx/rx_kcommon.c @@ -14,7 +14,7 @@ #include #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" @@ -427,7 +427,7 @@ register struct rx_peer *pp; */ -#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. */ @@ -552,7 +552,7 @@ afs_int32 rxi_Findcbi(addr) #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) @@ -573,14 +573,14 @@ int rxi_GetIFInfo() 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 @@ -640,7 +640,7 @@ rxi_FindIfnet(addr, pifad) /* 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; @@ -648,14 +648,14 @@ rxi_FindIfnet(addr, pifad) 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 ) { @@ -717,7 +717,7 @@ struct osi_socket *rxk_NewSocket(short aport) #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) @@ -730,7 +730,7 @@ struct osi_socket *rxk_NewSocket(short aport) #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); @@ -766,9 +766,9 @@ struct osi_socket *rxk_NewSocket(short aport) 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); @@ -785,7 +785,7 @@ struct osi_socket *rxk_NewSocket(short aport) 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; @@ -799,7 +799,7 @@ struct osi_socket *rxk_NewSocket(short aport) 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); @@ -1000,7 +1000,7 @@ void rxk_Listener(void) #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) @@ -1042,7 +1042,7 @@ void rxk_Listener(void) #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. */ diff --git a/src/rx/rx_kcommon.h b/src/rx/rx_kcommon.h index 389d66a49..a11c14537 100644 --- a/src/rx/rx_kcommon.h +++ b/src/rx/rx_kcommon.h @@ -35,19 +35,19 @@ typedef unsigned short etap_event_t; #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 @@ -114,8 +114,8 @@ extern struct ifnet *rxi_FindIfnet(); 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_ */ diff --git a/src/rx/rx_packet.h b/src/rx/rx_packet.h index b77cffe39..36d245679 100644 --- a/src/rx/rx_packet.h +++ b/src/rx/rx_packet.h @@ -41,7 +41,7 @@ #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 /* MIN, MAX on Solaris */ #endif #include /* MIN, MAX elsewhere */ diff --git a/src/rx/rx_pthread.c b/src/rx/rx_pthread.c index 584645b94..e264ff18d 100644 --- a/src/rx/rx_pthread.c +++ b/src/rx/rx_pthread.c @@ -18,7 +18,7 @@ #include #include -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 #include @@ -207,12 +207,6 @@ struct rx_call **newcallp; 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) { @@ -378,6 +372,7 @@ rxi_Listen(sock) exit(1); } AFS_SIGSET_RESTORE(); + return 0; } @@ -415,4 +410,5 @@ rxi_Sendmsg(socket, msg_p, flags) printf("rxi_sendmsg failed, error %d\n", errno); fflush(stdout); } + return 0; } diff --git a/src/rx/rx_rdwr.c b/src/rx/rx_rdwr.c index 0c04028e2..eda33b2d9 100644 --- a/src/rx/rx_rdwr.c +++ b/src/rx/rx_rdwr.c @@ -14,11 +14,11 @@ #include #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" diff --git a/src/rx/test/generator.c b/src/rx/test/generator.c index b44bdd4d5..500c64dd0 100644 --- a/src/rx/test/generator.c +++ b/src/rx/test/generator.c @@ -52,7 +52,7 @@ #include #include -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 #include @@ -880,7 +880,7 @@ PRIVATE void WriteCltTrailer(char *serverName, int first, int last, FILE *itl_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" @@ -1334,7 +1334,7 @@ PRIVATE void WriteServTrailer(FILE *srv_h) { "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" diff --git a/src/rxgen/rpc_main.c b/src/rxgen/rpc_main.c index 9f69c7f5d..960a97005 100644 --- a/src/rxgen/rpc_main.c +++ b/src/rxgen/rpc_main.c @@ -36,7 +36,7 @@ #include #include -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 #include @@ -95,7 +95,7 @@ int debug = 0; 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]; @@ -334,9 +334,7 @@ open_input(infile, define) char *infile; char *define; { - char *exec_args[MAXCPPARGS+10]; int nargs = 0; - char **args; char cpp_cmdline[MAXCMDLINE]; int i; diff --git a/src/rxgen/rpc_parse.c b/src/rxgen/rpc_parse.c index 3cab4116e..9756885cc 100644 --- a/src/rxgen/rpc_parse.c +++ b/src/rxgen/rpc_parse.c @@ -35,7 +35,7 @@ #include #include -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 #include @@ -1451,11 +1451,6 @@ ss_ProcProto_setup(defp, somefrees) 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); diff --git a/src/rxkad/rxkad_errs.et b/src/rxkad/rxkad_errs.et index 32b2a5a2e..819959673 100644 --- a/src/rxkad/rxkad_errs.et +++ b/src/rxkad/rxkad_errs.et @@ -10,7 +10,7 @@ # 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" diff --git a/src/rxkad/rxkad_server.c b/src/rxkad/rxkad_server.c index d4e1c22dc..ecb020009 100644 --- a/src/rxkad/rxkad_server.c +++ b/src/rxkad/rxkad_server.c @@ -14,7 +14,7 @@ #include #include -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 #include @@ -180,7 +180,6 @@ rxs_return_t rxkad_GetChallenge (aobj, aconn, apacket) 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 */ diff --git a/src/rxkad/test/stress.c b/src/rxkad/test/stress.c index bfd6057e3..ec2d73b12 100644 --- a/src/rxkad/test/stress.c +++ b/src/rxkad/test/stress.c @@ -12,7 +12,7 @@ #include #include -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 #include @@ -265,9 +265,9 @@ void main (argc, argv) 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); diff --git a/src/rxkad/test/stress_errs.et b/src/rxkad/test/stress_errs.et index 215b8bd6c..9947e8edd 100644 --- a/src/rxkad/test/stress_errs.et +++ b/src/rxkad/test/stress_errs.et @@ -5,7 +5,7 @@ # 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" diff --git a/src/rxstat/NTMakefile b/src/rxstat/NTMakefile index b1359e90d..0037dc5a7 100644 --- a/src/rxstat/NTMakefile +++ b/src/rxstat/NTMakefile @@ -35,3 +35,7 @@ rxstat.cs.c rxstat.ss.c rxstat.xdr.c rxstat.h: rxstat.xg install: $(LIBFILE) $(INCFILES) install9x: install + +clean:: + $(DEL) rxstat.cs.c rxstat.h rxstat.ss.c rxstat.xdr.c + diff --git a/src/sys/Makefile.in b/src/sys/Makefile.in index bf6943d9a..30f3af868 100644 --- a/src/sys/Makefile.in +++ b/src/sys/Makefile.in @@ -110,7 +110,7 @@ syscall.o: syscall.s $(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; \ diff --git a/src/sys/pioctl_nt.c b/src/sys/pioctl_nt.c index f4808cf57..10670c0f2 100644 --- a/src/sys/pioctl_nt.c +++ b/src/sys/pioctl_nt.c @@ -10,7 +10,7 @@ #include #include -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 #include @@ -87,7 +87,6 @@ static long GetIoctlHandle(char *fileNamep, HANDLE *handlep) HKEY parmKey; DWORD dummyLen; long code; - int hostsize; if (fileNamep) { drivep = strchr(fileNamep, ':'); @@ -116,11 +115,14 @@ nogateway: #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: diff --git a/src/tbutc/NTMakefile b/src/tbutc/NTMakefile index 15afcf44c..6d3ec6450 100644 --- a/src/tbutc/NTMakefile +++ b/src/tbutc/NTMakefile @@ -56,12 +56,10 @@ BUTCLIBS=$(DESTDIR)\lib\afs\afsbudb.lib \ $(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 \ @@ -77,6 +75,7 @@ BUTCLIBS=$(DESTDIR)\lib\afs\afsbudb.lib \ !ENDIF $(DESTDIR)\lib\afsdes.lib + # $(DESTDIR)\lib\afsauthent.lib \ # $(DESTDIR)\lib\afsrpc.lib \ # $(DESTDIR)\lib\afs\afscmd.lib \ diff --git a/src/ubik/Makefile.in b/src/ubik/Makefile.in index c095d49fb..335c1036f 100644 --- a/src/ubik/Makefile.in +++ b/src/ubik/Makefile.in @@ -44,7 +44,7 @@ LIBS=${TOP_LIBDIR}/librx.a ${TOP_LIBDIR}/liblwp.a \ 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) diff --git a/src/ubik/NTMakefile b/src/ubik/NTMakefile index 3f373f3e4..7346f4b04 100644 --- a/src/ubik/NTMakefile +++ b/src/ubik/NTMakefile @@ -105,6 +105,7 @@ install: $(INCFILES) $(LIBFILE) $(CL_UDBG_EXEFILE) 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 diff --git a/src/ubik/beacon.c b/src/ubik/beacon.c index 968ec1698..40949c452 100644 --- a/src/ubik/beacon.c +++ b/src/ubik/beacon.c @@ -10,7 +10,7 @@ #include #include -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 #ifdef AFS_NT40_ENV @@ -447,7 +447,7 @@ static verifyInterfaceAddress(ame, info, aservers) 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; @@ -574,7 +574,7 @@ int 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]; diff --git a/src/ubik/disk.c b/src/ubik/disk.c index bfd8a1beb..6d3653c87 100644 --- a/src/ubik/disk.c +++ b/src/ubik/disk.c @@ -10,7 +10,7 @@ #include #include -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 #ifdef AFS_NT40_ENV @@ -236,11 +236,11 @@ static int DInit (abuffers) } /* 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; @@ -256,12 +256,12 @@ static int Dlru(abuf) } /* 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 */ @@ -273,7 +273,6 @@ static int Dmru(abuf) abuf->lru_prev = LruBuffer->lru_prev; LruBuffer->lru_prev->lru_next = abuf; LruBuffer->lru_prev = abuf; - } /* get a pointer to a particular buffer */ @@ -283,7 +282,7 @@ static char *DRead(dbase, fid, page) int page; { /* Read a page from the disk. */ struct buffer *tb, *lastbuffer; - afs_int32 trys, code; + afs_int32 code; calls++; lastbuffer = LruBuffer->lru_prev; @@ -469,7 +468,7 @@ static struct buffer *newslot (adbase, afid, apage) } /* 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; @@ -480,7 +479,7 @@ static DRelease (ap,flag) bp = &(Buffers[index]); bp->lockers--; if (flag) bp->dirty=1; - return 0; + return; } /* flush all modified buffers, leaves dirty bits set (they're cleared diff --git a/src/ubik/lock.c b/src/ubik/lock.c index d97f71e7f..4351e97c1 100644 --- a/src/ubik/lock.c +++ b/src/ubik/lock.c @@ -10,7 +10,7 @@ #include #include -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 #ifndef AFS_NT40_ENV @@ -62,7 +62,6 @@ ulock_getLock(atrans, atype, await) struct ubik_trans *atrans; int atype, await; { - struct ubik_trans *tt; struct ubik_dbase *dbase=atrans->dbase; /* On first pass, initialize the lock */ @@ -118,6 +117,7 @@ ulock_getLock(atrans, atype, await) } /* Release the transaction lock */ +int ulock_relLock(atrans) struct ubik_trans *atrans; { diff --git a/src/ubik/remote.c b/src/ubik/remote.c index f1afaf65e..1979fdab7 100644 --- a/src/ubik/remote.c +++ b/src/ubik/remote.c @@ -10,7 +10,7 @@ #include #include -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 #ifdef AFS_NT40_ENV @@ -28,6 +28,7 @@ RCSID("$Header: /tmp/cvstemp/openafs/src/ubik/remote.c,v 1.1.1.6 2001/09/11 14:3 #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 @@ -453,7 +454,7 @@ SDISK_SendFile(rxcall, file, length, avers) 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; @@ -614,6 +615,7 @@ UbikInterfaceAddr *inAddr, *outAddr; return 0; } +void printServerInfo() { struct ubik_server *ts; diff --git a/src/ubik/ubik.c b/src/ubik/ubik.c index ac7dbe650..41adba622 100644 --- a/src/ubik/ubik.c +++ b/src/ubik/ubik.c @@ -10,7 +10,7 @@ #include #include -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 #ifdef AFS_NT40_ENV @@ -216,7 +216,7 @@ int ubik_ServerInitCommon(myHost, myPort, info, clones, serverList, pathName, db 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); diff --git a/src/ubik/ubikclient.c b/src/ubik/ubikclient.c index 7c716f7ce..d3df01d63 100644 --- a/src/ubik/ubikclient.c +++ b/src/ubik/ubikclient.c @@ -14,7 +14,7 @@ #include #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" @@ -200,7 +200,7 @@ int ubik_ClientInit( 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)) diff --git a/src/ubik/uerrors.et b/src/ubik/uerrors.et index e62e69b5f..0daa4adef 100644 --- a/src/ubik/uerrors.et +++ b/src/ubik/uerrors.et @@ -9,7 +9,7 @@ # 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" diff --git a/src/ubik/vote.c b/src/ubik/vote.c index fd96741b2..50b8b9bb1 100644 --- a/src/ubik/vote.c +++ b/src/ubik/vote.c @@ -10,7 +10,7 @@ #include #include -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 #ifdef AFS_NT40_ENV @@ -430,7 +430,7 @@ SVOTE_SDebugOld(rxcall, awhich, aparm) 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 */ @@ -453,7 +453,7 @@ SVOTE_SDebugOld(rxcall, awhich, aparm) 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. */ diff --git a/src/update/NTMakefile b/src/update/NTMakefile index 9411c412b..607c74520 100644 --- a/src/update/NTMakefile +++ b/src/update/NTMakefile @@ -77,3 +77,4 @@ install: update.h $(UPCLIENT) $(UPSERVER) # Local clean target; augments predefined clean target clean:: + $(DEL) update.cs.c update.ss.c update.xdr.c update.h diff --git a/src/usd/usd_file.c b/src/usd/usd_file.c index 32e4c5fd6..15d1eb6a1 100644 --- a/src/usd/usd_file.c +++ b/src/usd/usd_file.c @@ -10,7 +10,7 @@ #include #include -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 #include @@ -26,7 +26,7 @@ RCSID("$Header: /tmp/cvstemp/openafs/src/usd/usd_file.c,v 1.1.1.7 2001/09/11 14: #endif #include #endif /* AFS_AIX_ENV */ -#ifdef AFS_DUX40_ENV +#if defined(AFS_DUX40_ENV) || defined(AFS_OBSD_ENV) #include #endif #include diff --git a/src/uss/uss.c b/src/uss/uss.c index 20b0fbc0a..d97202f95 100644 --- a/src/uss/uss.c +++ b/src/uss/uss.c @@ -18,7 +18,7 @@ #include #include -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 @@ -1782,14 +1782,14 @@ void InitETTables() * 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*/ diff --git a/src/vfsck/setup.c b/src/vfsck/setup.c index 98dd79dfe..d0237c935 100644 --- a/src/vfsck/setup.c +++ b/src/vfsck/setup.c @@ -18,7 +18,7 @@ #include #include -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 #define VICE @@ -199,7 +199,6 @@ restat: dev = sname; } #endif -#ifdef AFS_HPUX_ENV hotroot = is_hotroot(dev); /* @@ -226,9 +225,15 @@ restat: 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) @@ -787,9 +792,10 @@ clean_byte_valid(lastfsck) } #endif -#ifdef AFS_HPUX_ENV #include +#ifdef AFS_HPUX_ENV #include +#endif #include extern int errno; @@ -826,6 +832,8 @@ is_mounted(device,dev_st) 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) @@ -849,6 +857,9 @@ is_swap(devno) return (match); } +#endif AFS_HPUX_ENV + + is_pre_init(rdevnum) dev_t rdevnum; { @@ -859,8 +870,17 @@ is_pre_init(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); @@ -954,7 +974,6 @@ freply(s) return (0); } -#endif #if defined(AFS_HPUX110_ENV) /* diff --git a/src/vlserver/vl_errors.et b/src/vlserver/vl_errors.et index 7b1a71f8d..ea17b303d 100644 --- a/src/vlserver/vl_errors.et +++ b/src/vlserver/vl_errors.et @@ -10,7 +10,7 @@ # 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" diff --git a/src/vlserver/vlclient.c b/src/vlserver/vlclient.c index 94a97f00b..e34166c13 100644 --- a/src/vlserver/vlclient.c +++ b/src/vlserver/vlclient.c @@ -10,7 +10,7 @@ #include #include -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 #include @@ -51,6 +51,16 @@ RCSID("$Header: /tmp/cvstemp/openafs/src/vlserver/vlclient.c,v 1.1.1.5 2001/09/1 #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 @@ -253,7 +263,7 @@ static handleit(as) { 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; @@ -395,7 +405,6 @@ static handleit(as) } 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) { @@ -448,7 +457,6 @@ static handleit(as) } 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) { @@ -700,7 +708,6 @@ static handleit(as) int nentries, i; afs_uint32 *addrp; bulkaddrs addrs; - struct vldbentry *entry; struct VLCallBack vlcb; addrs.bulkaddrs_val = 0; @@ -775,7 +782,6 @@ static handleit(as) 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; @@ -870,7 +876,6 @@ static handleit(as) int i; afs_uint32 *addrp, tad; bulkaddrs addrs; - struct vldbentry *entry; afsUUID uuid; memset(&uuid, 0, sizeof(uuid)); @@ -899,7 +904,6 @@ static handleit(as) 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]); @@ -926,7 +930,6 @@ static handleit(as) } } 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); @@ -972,6 +975,7 @@ main(argc, argv) } +void fill_entry(entry, argp, nargs) struct vldbentry *entry; char **argp; @@ -1008,7 +1012,7 @@ int nargs; sscanf(&(*argp)[0], "%d", &entry->cloneId); } - +void fill_update_entry(entry, argp, nargs) struct VldbUpdateEntry *entry; char **argp; @@ -1076,7 +1080,7 @@ int nargs; } } - +void fill_listattributes_entry(entry, argp, nargs) struct VldbListByAttributes *entry; char **argp; @@ -1109,6 +1113,7 @@ fill_listattributes_entry(entry, argp, nargs) entry->Mask |= VLLIST_FLAG; } +void display_listattributes_entry(entry, error) struct VldbListByAttributes *entry; int error; @@ -1130,6 +1135,7 @@ 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; @@ -1145,6 +1151,7 @@ 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; @@ -1172,7 +1179,7 @@ display_entryN(entry, error) } } - +void display_update_entry(entry, error) struct VldbUpdateEntry *entry; int error; @@ -1212,6 +1219,7 @@ int error; } } +void dump_stats(stats, vital_header) vldstats *stats; vital_vlheader *vital_header; @@ -1230,6 +1238,7 @@ 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; @@ -1250,6 +1259,7 @@ GetArgs(line,args, nargs) } } +void print_usage() { printf("Valid Commands:\n"); diff --git a/src/vlserver/vldb_check.c b/src/vlserver/vldb_check.c index de9351541..3bf861963 100644 --- a/src/vlserver/vldb_check.c +++ b/src/vlserver/vldb_check.c @@ -24,7 +24,7 @@ #include #include -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 #include @@ -135,7 +135,6 @@ afs_int32 NameHash(volname) char *volname; { unsigned int hash; - int i; char *vchar; hash = 0; @@ -155,7 +154,7 @@ int InvalidVolname(volname) char *volname; { char *map; - int slen; + size_t slen; map = LEGALCHARS; slen = strlen(volname); @@ -310,6 +309,7 @@ readentry(addr, vlentryp, type) } } +void readSIT(base, addr) int base; int addr; @@ -366,6 +366,7 @@ readSIT(base, 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; { @@ -572,10 +573,10 @@ FollowIdHash(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) @@ -584,7 +585,7 @@ FollowFreeChain(header) 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; } @@ -625,8 +626,6 @@ CheckIpAddrs(header) 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]; @@ -676,7 +675,7 @@ CheckIpAddrs(header) 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; @@ -794,6 +793,7 @@ CheckIpAddrs(header) } +int WorkerBee(as, arock) struct cmd_syndesc *as; char *arock; @@ -921,7 +921,6 @@ main(argc, argv) char **argv; { struct cmd_syndesc *ts; - struct cmd_item *ti; setlinebuf(stdout); diff --git a/src/vlserver/vlprocs.c b/src/vlserver/vlprocs.c index 0f4d80a4e..29adadd98 100644 --- a/src/vlserver/vlprocs.c +++ b/src/vlserver/vlprocs.c @@ -10,7 +10,7 @@ #include #include -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 #include @@ -298,8 +298,7 @@ VL_ChangeAddr(rxcall, ip1, ip2) 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)) { @@ -1040,8 +1039,7 @@ bulkentries *vldbentries; 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) { @@ -1148,8 +1146,7 @@ nbulkentries *vldbentries; 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) { @@ -1247,7 +1244,7 @@ VL_ListAttributesN2(rxcall, attributes, name, startindex, nentries, vldbentries, 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; @@ -1760,11 +1757,11 @@ VL_RegisterAddrs(rxcall, uuidp, spare1, addrsp) { 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; @@ -2102,9 +2099,9 @@ struct ListAddrByAttributes *attributes; 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; @@ -2794,7 +2791,7 @@ register afs_uint32 ipaddr1, ipaddr2; int base, index, mhidx; afsUUID tuuid; afs_int32 blockindex, count; - int pollcount; + int pollcount = 0; struct nvlentry tentry; if (!atrans) diff --git a/src/vlserver/vlutils.c b/src/vlserver/vlutils.c index a0f1b181c..0f0b4face 100644 --- a/src/vlserver/vlutils.c +++ b/src/vlserver/vlutils.c @@ -10,7 +10,7 @@ #include #include -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 #ifdef AFS_NT40_ENV @@ -89,7 +89,7 @@ struct ubik_trans *trans; 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; @@ -138,7 +138,7 @@ struct ubik_trans *trans; 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; @@ -475,7 +475,6 @@ afs_int32 FindExtentBlock(trans, uuidp, createit, hostslot, expp, basep) *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); @@ -628,6 +627,7 @@ int hashindex; VLog(0, ("[%d]#%d: %10d %d %d (%s)\n", hashindex, i, tentry.volumeId[0], tentry.nextIdHash[0], tentry.nextNameHash, tentry.name)); } + return 0; } @@ -645,6 +645,7 @@ int hashindex; VLog(0, ("[%d]#%d: %10d %d %d (%s)\n", hashindex, i, tentry.volumeId[0], tentry.nextIdHash[0], tentry.nextNameHash, tentry.name)); } + return 0; } diff --git a/src/vol/clone.c b/src/vol/clone.c index 15975eb85..77131dd8d 100644 --- a/src/vol/clone.c +++ b/src/vol/clone.c @@ -18,7 +18,7 @@ #include #include -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 #include @@ -76,6 +76,9 @@ struct clone_head { struct clone_items *last; }; +void CloneVolume(); +void CloneVolume_r(); + static ci_AddItem(ah, aino) Inode aino; struct clone_head *ah; { @@ -349,6 +352,7 @@ afs_int32 DoCloneIndex(rwvp, clvp, class, reclone) return error; } +void CloneVolume(error, original, new, old) Error *error; Volume *original, *new, *old; @@ -358,6 +362,7 @@ CloneVolume(error, original, new, old) VOL_UNLOCK } +void CloneVolume_r(rerror, original, new, old) Error *rerror; Volume *original, *new, *old; diff --git a/src/vol/devname.c b/src/vol/devname.c index 68c473778..f40627318 100644 --- a/src/vol/devname.c +++ b/src/vol/devname.c @@ -10,7 +10,7 @@ #include #include -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 #include @@ -25,7 +25,7 @@ RCSID("$Header: /tmp/cvstemp/openafs/src/vol/devname.c,v 1.1.1.6 2001/09/11 14:3 #ifdef AFS_SUN5_ENV #include #else -#if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV) +#if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV) #include #include #else @@ -33,7 +33,7 @@ RCSID("$Header: /tmp/cvstemp/openafs/src/vol/devname.c,v 1.1.1.6 2001/09/11 14:3 #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 #endif #endif /* AFS_VFSINCL_ENV */ diff --git a/src/vol/listinodes.c b/src/vol/listinodes.c index 3a2da51af..0142b975c 100644 --- a/src/vol/listinodes.c +++ b/src/vol/listinodes.c @@ -20,7 +20,7 @@ #include #include -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 @@ -52,7 +52,7 @@ int *forcep, forceR; #ifdef AFS_SUN5_ENV #include #else -#if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV) +#if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV) #include #include #define itod ino_to_fsba @@ -1254,7 +1254,7 @@ int ListViceInodes(devname, mountedOn, resultFile, judgeInode, judgeParam, force 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) diff --git a/src/vol/vnode.c b/src/vol/vnode.c index 7890ae3ac..31492395c 100644 --- a/src/vol/vnode.c +++ b/src/vol/vnode.c @@ -16,7 +16,7 @@ #include #include -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 #include @@ -60,6 +60,8 @@ RCSID("$Header: /tmp/cvstemp/openafs/src/vol/vnode.c,v 1.1.1.5 2001/09/11 14:35: struct VnodeClassInfo VnodeClassInfo[nVNODECLASSES]; private int moveHash(); +void StickOnLruChain_r(); +void VPutVnode_r(); #define BAD_IGET -1000 @@ -183,7 +185,7 @@ VInitVnodes(class,nVnodes) } if (nVnodes == 0) - return; + return 0; va = (byte *) calloc(nVnodes,vcp->residentSize); assert (va != NULL); @@ -214,6 +216,7 @@ VInitVnodes(class,nVnodes) } va += vcp->residentSize; } + return 0; } @@ -360,7 +363,7 @@ Vnode *VAllocVnode_r(ec,vp,type) 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; @@ -653,7 +656,7 @@ Vnode *VGetVnode_r(ec,vp,vnodeNumber,locktype) 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; @@ -663,6 +666,7 @@ VPutVnode(ec,vnp) VOL_UNLOCK } +void VPutVnode_r(ec,vnp) Error *ec; register Vnode *vnp; @@ -911,8 +915,10 @@ static int moveHash(vnp, newHash) vnp->hashNext = VnodeHashTable[newHash]; VnodeHashTable[newHash] = vnp; vnp->hashIndex = newHash; + return 0; } +void StickOnLruChain_r(vnp,vcp) register Vnode *vnp; register struct VnodeClassInfo *vcp; diff --git a/src/vol/vol-salvage.c b/src/vol/vol-salvage.c index 9d38efc09..4388c8008 100644 --- a/src/vol/vol-salvage.c +++ b/src/vol/vol-salvage.c @@ -91,7 +91,7 @@ Vnodes with 0 inode pointers in RW volumes are now deleted. #include #include -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 #include @@ -122,7 +122,7 @@ RCSID("$Header: /tmp/cvstemp/openafs/src/vol/vol-salvage.c,v 1.1.1.7 2001/09/11 #ifdef AFS_SUN5_ENV #include #else -#if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV) +#if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV) #include #include #else @@ -133,7 +133,7 @@ RCSID("$Header: /tmp/cvstemp/openafs/src/vol/vol-salvage.c,v 1.1.1.7 2001/09/11 #ifdef AFS_OSF_ENV #include #else /* AFS_OSF_ENV */ -#if !defined(AFS_LINUX20_ENV) && !defined(AFS_FBSD_ENV) +#if !defined(AFS_LINUX20_ENV) && !defined(AFS_XBSD_ENV) #include #endif #endif @@ -1424,7 +1424,7 @@ int OnlyOneVolume(inodeinfo, singleVolumeNumber) 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]; @@ -2920,7 +2920,6 @@ void DistilVnodeEssence(VolumeId rwVId, VnodeClass class, Inode ino, struct VnodeClassInfo *vcp = &VnodeClassInfo[class]; char buf[SIZEOF_LARGEDISKVNODE]; struct VnodeDiskObject *vnode = (struct VnodeDiskObject *) buf; - int code; int size; StreamHandle_t *file; int vnodeIndex; @@ -3444,7 +3443,7 @@ int CopyInode(Device device, Inode inode1, Inode inode2, int rwvolume) 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); diff --git a/src/vol/volume.c b/src/vol/volume.c index 80b6df5a1..5d55a4aeb 100644 --- a/src/vol/volume.c +++ b/src/vol/volume.c @@ -19,7 +19,7 @@ #include #include -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 #include @@ -35,7 +35,7 @@ RCSID("$Header: /tmp/cvstemp/openafs/src/vol/volume.c,v 1.1.1.9 2001/09/11 14:35 #ifdef AFS_SUN5_ENV #include #else -#if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV) +#if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV) #include #include #else @@ -43,7 +43,7 @@ RCSID("$Header: /tmp/cvstemp/openafs/src/vol/volume.c,v 1.1.1.9 2001/09/11 14:35 #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 #endif #endif /* AFS_VFSINCL_ENV */ diff --git a/src/vol/vutil.c b/src/vol/vutil.c index b3ec9b331..e5d69e037 100644 --- a/src/vol/vutil.c +++ b/src/vol/vutil.c @@ -17,7 +17,7 @@ #include #include -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 #include @@ -64,6 +64,11 @@ RCSID("$Header: /tmp/cvstemp/openafs/src/vol/vutil.c,v 1.1.1.6 2001/09/11 14:35: #include #endif +void AssignVolumeName(); +void AssignVolumeName_r(); +void ClearVolumeStats(); +void ClearVolumeStats_r(); + #define nFILES (sizeof (stuff)/sizeof(struct stuff)) @@ -110,19 +115,15 @@ Volume *VCreateVolume_r(ec, partname, volumeId, parentId) 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; @@ -279,6 +280,7 @@ Volume *VCreateVolume_r(ec, partname, volumeId, parentId) } +void AssignVolumeName(vol, name, ext) register VolumeDiskData *vol; char *name,*ext; @@ -288,6 +290,7 @@ AssignVolumeName(vol, name, ext) VOL_UNLOCK } +void AssignVolumeName_r(vol, name, ext) register VolumeDiskData *vol; char *name,*ext; @@ -338,6 +341,7 @@ afs_int32 CopyVolumeHeader(from, to) return(code); } +void ClearVolumeStats(vol) register VolumeDiskData *vol; { @@ -346,6 +350,7 @@ ClearVolumeStats(vol) VOL_UNLOCK } +void ClearVolumeStats_r(vol) register VolumeDiskData *vol; { diff --git a/src/volser/NTMakefile b/src/volser/NTMakefile index f490efd1a..90d4038fc 100644 --- a/src/volser/NTMakefile +++ b/src/volser/NTMakefile @@ -158,5 +158,5 @@ install: $(LOCAL_INCFILES) $(LIBFILE) $(VOLSERVER_EXEFILE) $(CL_VOS_EXEFILE) \ # 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 diff --git a/src/volser/common.c b/src/volser/common.c index 6345fa08e..7a93d9264 100644 --- a/src/volser/common.c +++ b/src/volser/common.c @@ -10,7 +10,7 @@ #include #include -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 #include @@ -36,14 +36,15 @@ char *s; 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; } diff --git a/src/volser/dumpstuff.c b/src/volser/dumpstuff.c index 89fe49f10..0d0f94c56 100644 --- a/src/volser/dumpstuff.c +++ b/src/volser/dumpstuff.c @@ -10,7 +10,7 @@ #include #include -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 #include @@ -417,7 +417,7 @@ static int DumpFile(struct iod *iodp, char tag, int vnode, FdHandle_t *handleP) { 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; @@ -427,9 +427,13 @@ static int DumpFile(struct iod *iodp, char tag, int vnode, FdHandle_t *handleP) #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. @@ -438,9 +442,10 @@ static int DumpFile(struct iod *iodp, char tag, int vnode, FdHandle_t *handleP) 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) { @@ -490,7 +495,7 @@ static int DumpFile(struct iod *iodp, char tag, int vnode, FdHandle_t *handleP) */ 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 @@ -631,7 +636,6 @@ static int DumpVnodeIndex(register struct iod *iodp, Volume *vp, char buf[SIZEOF_LARGEDISKVNODE]; struct VnodeDiskObject *vnode = (struct VnodeDiskObject *) buf; StreamHandle_t *file; - IHandle_t *handle; FdHandle_t *fdP; int size; int flag; diff --git a/src/volser/lockprocs.c b/src/volser/lockprocs.c index 73a37274e..cc09baafc 100644 --- a/src/volser/lockprocs.c +++ b/src/volser/lockprocs.c @@ -17,7 +17,7 @@ #include #include -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 #ifdef AFS_NT40_ENV @@ -71,6 +71,7 @@ int FindIndex(entry, server, part, type) } /* Changes the rw site only */ +void SetAValue (entry, oserver, opart, nserver, npart, type) struct nvldbentry *entry; afs_int32 oserver, opart, nserver, npart, type; diff --git a/src/volser/volerr.et b/src/volser/volerr.et index 20299b971..16db9f0c0 100644 --- a/src/volser/volerr.et +++ b/src/volser/volerr.et @@ -10,7 +10,7 @@ # 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" diff --git a/src/volser/volprocs.c b/src/volser/volprocs.c index 7e5b7cb1c..e6531b5cd 100644 --- a/src/volser/volprocs.c +++ b/src/volser/volprocs.c @@ -10,7 +10,7 @@ #include #include -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 #include @@ -1584,13 +1584,15 @@ afs_int32 VolListPartitions (acid, partIds) 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'; @@ -1598,9 +1600,8 @@ struct pIDs *partIds; 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++){ @@ -1613,8 +1614,6 @@ struct pIDs *partIds; else partIds->partIds[i ] = -1; } else partIds->partIds[i ] = -1; - - } #endif return 0; diff --git a/src/volser/vos.c b/src/volser/vos.c index e24a6cdd0..cb181bcc1 100644 --- a/src/volser/vos.c +++ b/src/volser/vos.c @@ -10,7 +10,7 @@ #include #include -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 #ifdef AFS_NT40_ENV @@ -3153,7 +3153,7 @@ static ListVLDB(as) 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"); diff --git a/src/volser/vsprocs.c b/src/volser/vsprocs.c index 2d3cbbb61..349d86c8b 100644 --- a/src/volser/vsprocs.c +++ b/src/volser/vsprocs.c @@ -10,7 +10,7 @@ #include #include -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 #include @@ -65,12 +65,16 @@ extern int VL_SetLock(); extern int VL_ReleaseLock(); extern int VL_DeleteEntry(); +void MapNetworkToHost(); +void MapHostToNetwork(); + struct release { afs_int32 time; afs_int32 vldbEntryIndex; }; /*map the partition into partition name */ +void MapPartIdIntoName(partId, partName) afs_int32 partId; char *partName; @@ -79,14 +83,14 @@ 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; } } @@ -228,12 +232,12 @@ PrintError(msg, errcode) 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<name); @@ -535,9 +536,8 @@ UV_AddVLDBEntry(aserver, apart, aname, aid) 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; @@ -1760,7 +1760,7 @@ static int DelVol (conn, vid, part, flags) 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); @@ -1931,7 +1931,7 @@ UV_ReleaseVolume(afromvol, afromserver, afrompart, forceflag) 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; @@ -1943,7 +1943,7 @@ UV_ReleaseVolume(afromvol, afromserver, afrompart, forceflag) 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; @@ -3491,7 +3491,6 @@ static afs_int32 CheckVolume(volumeinfo, aserver, apart, modentry, maxvolid) 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; @@ -4402,10 +4401,9 @@ afs_int32 CheckVldb(entry, modified) 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) { @@ -4926,6 +4924,7 @@ UV_SetVolume(server, partition, volid, transflag, setflag, sleeptime) /*maps the host addresses in (present in network byte order) to that in< new> (present in host byte order )*/ +void MapNetworkToHost(old, new) struct nvldbentry *old, *new; { @@ -4947,10 +4946,10 @@ struct nvldbentry *old, *new; new->volumeId[BACKVOL] = old->volumeId[BACKVOL]; new->cloneId = old->cloneId; new->flags = old->flags; - } /*maps the host entries in which are present in host byte order to network byte order */ +void MapHostToNetwork(entry) struct nvldbentry *entry; { diff --git a/src/volser/vsutils.c b/src/volser/vsutils.c index 367e5f797..757ae8074 100644 --- a/src/volser/vsutils.c +++ b/src/volser/vsutils.c @@ -10,7 +10,7 @@ #include #include -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 #ifdef AFS_NT40_ENV @@ -105,7 +105,7 @@ VLDB_CreateEntry(entryp) struct nvldbentry *entryp; { struct vldbentry oentry; - register int code, (*nproc)(); + register int code; if (newvlserver == 1) { tryold: @@ -132,7 +132,7 @@ VLDB_GetEntryByID(volid, voltype, entryp) struct nvldbentry *entryp; { struct vldbentry oentry; - register int code, (*nproc)(); + register int code; if (newvlserver == 1) { tryold: @@ -158,7 +158,7 @@ VLDB_GetEntryByName(namep, entryp) struct nvldbentry *entryp; { struct vldbentry oentry; - register int code, (*nproc)(); + register int code; if (newvlserver == 1) { tryold: @@ -184,7 +184,7 @@ VLDB_ReplaceEntry(volid, voltype, entryp, releasetype) struct nvldbentry *entryp; { struct vldbentry oentry; - register int code, (*nproc)(); + register int code; if (newvlserver == 1) { tryold: @@ -270,8 +270,7 @@ extern int VL_GetAddrsU(); 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; @@ -536,7 +535,7 @@ char *astring; { char *str,*ptr, volname[VOLSER_OLDMAXVOLNAME+1]; int tryname, curval; struct nvldbentry entry; - afs_int32 vcode; + afs_int32 vcode = 0; int total; *errp = 0; -- 2.39.5