From b88623301891eeea045b6740f638372b15de623f Mon Sep 17 00:00:00 2001 From: Sam Hartman Date: Sat, 10 Jan 2004 20:56:14 +0000 Subject: [PATCH] Initial revision --- src/config/Makefile.ppc_darwin_70.in | 47 +++++ src/config/param.ppc_darwin_70.h | 74 ++++++++ src/config/param.ppc_darwin_70_usr.h | 59 ++++++ src/libafs/afs.ppc_darwin_70.plist.in | 31 +++ src/packaging/MacOS/Makefile | 33 ++++ src/packaging/MacOS/OpenAFS.Description.plist | 14 ++ src/packaging/MacOS/OpenAFS.Info.plist | 40 ++++ src/packaging/MacOS/afssettings.m | 171 +++++++++++++++++ src/packaging/MacOS/settings.plist | 14 ++ src/vol/fstab.c | 179 ++++++++++++++++++ 10 files changed, 662 insertions(+) create mode 100644 src/config/Makefile.ppc_darwin_70.in create mode 100644 src/config/param.ppc_darwin_70.h create mode 100644 src/config/param.ppc_darwin_70_usr.h create mode 100644 src/libafs/afs.ppc_darwin_70.plist.in create mode 100644 src/packaging/MacOS/Makefile create mode 100644 src/packaging/MacOS/OpenAFS.Description.plist create mode 100644 src/packaging/MacOS/OpenAFS.Info.plist create mode 100644 src/packaging/MacOS/afssettings.m create mode 100644 src/packaging/MacOS/settings.plist create mode 100644 src/vol/fstab.c diff --git a/src/config/Makefile.ppc_darwin_70.in b/src/config/Makefile.ppc_darwin_70.in new file mode 100644 index 000000000..b18fce4ba --- /dev/null +++ b/src/config/Makefile.ppc_darwin_70.in @@ -0,0 +1,47 @@ +# Portions Copyright (c) 2003 Apple Computer, Inc. All rights reserved. +# +# Keep macros within each section in sorted order for clean diff displays. +# +# AFS_OSTYPE used to indicate suffixes and os specific subdirectories. +AFS_OSTYPE = DARWIN +# +# +# compilation and link editor flags +XCFLAGS= +MT_CFLAGS=-D_REENTRANT -DAFS_PTHREAD_ENV ${XCFLAGS} +MT_CC=cc +KROOT= +KINCLUDES=-I$(KROOT)/System/Library/Frameworks/Kernel.framework/Headers +LWP_OPTMZ=-O2 +OPTMZ=-O2 +DBG=-g +REGEX_OBJ=regex.o + + +# +# libraries +XLIBS=@LIB_AFSDB@ +TXLIBS=-lncurses +#MTLIBS= +#XLIBELFA= +#XLIBKVM= +# +SHLIB_SUFFIX= +SHLIB_CFLAGS= +# +# programs +AR=ar +AS=as +CC=cc +CP=cp +INSTALL=${TOP_SRCDIR}/pinstall/pinstall +LEX=lex -l +LD= ld +LORDER = lorder +MV=mv +RANLIB=ranlib +RM=rm +STRIP= strip + +# override getfsent +EXTRA_VLIBOBJS=fstab.o diff --git a/src/config/param.ppc_darwin_70.h b/src/config/param.ppc_darwin_70.h new file mode 100644 index 000000000..e13e24e4c --- /dev/null +++ b/src/config/param.ppc_darwin_70.h @@ -0,0 +1,74 @@ +/* + * Portions Copyright (c) 2003 Apple Computer, Inc. All rights reserved. + */ +#ifndef AFS_PARAM_H +#define AFS_PARAM_H + +#define AFS_ENV 1 +#define AFS_64BIT_ENV 1 /* Defines afs_int32 as int, not long. */ +#define AFS_64BIT_IOPS_ENV 1 +#define AFS_PPC_ENV 1 +#define AFS_VFSINCL_ENV 1 + +#include + +#define AFS_DARWIN_ENV +#define AFS_DARWIN13_ENV +#define AFS_DARWIN14_ENV +#define AFS_DARWIN60_ENV +#define AFS_DARWIN70_ENV +#define AFS_NONFSTRANS +#define AFS_SYSCALL 230 +#define AFS_NAMEI_ENV 1 + +/* File system entry (used if mount.h doesn't define MOUNT_AFS */ +#define AFS_MOUNT_AFS "afs" + +/* Machine / Operating system information */ +#define sys_ppc_darwin_12 1 +#define sys_ppc_darwin_13 1 +#define sys_ppc_darwin_14 1 +#define sys_ppc_darwin_60 1 +#define sys_ppc_darwin_70 1 +#define SYS_NAME "ppc_darwin_70" +#define SYS_NAME_ID SYS_NAME_ID_ppc_darwin_70 +#define AFSBIG_ENDIAN 1 +#define AFS_HAVE_FFS 1 /* Use system's ffs. */ + +#define AFS_GCPAGS 1 /* if nonzero, garbage collect PAGs */ +#define RXK_LISTENER_ENV 1 + +#ifdef KERNEL +#undef MACRO_BEGIN +#undef MACRO_END +#include +#define AFS_GLOBAL_SUNLOCK 1 +#define AFS_VFS34 1 /* What is VFS34??? */ +#define afsio_iov uio_iov +#define afsio_iovcnt uio_iovcnt +#define afsio_offset uio_offset +#define afsio_seg uio_segflg +#define afsio_resid uio_resid +#define AFS_UIOSYS UIO_SYSSPACE +#define AFS_UIOUSER UIO_USERSPACE +#define AFS_CLBYTES CLBYTES +#define osi_GetTime(x) microtime(x) +#define AFS_KALLOC(x) kalloc(x) +#define AFS_KFREE(x,y) kfree(x,y) +#define v_count v_usecount +#define v_vfsp v_mount +#define vfs_bsize mnt_stat.f_bsize +#define vfs_fsid mnt_stat.f_fsid +#define va_nodeid va_fileid +#define vfs_vnodecovered mnt_vnodecovered +#define direct dirent +#define vnode_t struct vnode + +#define VN_RELE(vp) vrele(((struct vnode *)(vp))) +#define VN_HOLD(vp) VREF(((struct vnode *)(vp))) + +#endif + +#define BIND_8_COMPAT + +#endif /* AFS_PARAM_H */ diff --git a/src/config/param.ppc_darwin_70_usr.h b/src/config/param.ppc_darwin_70_usr.h new file mode 100644 index 000000000..1167c80bd --- /dev/null +++ b/src/config/param.ppc_darwin_70_usr.h @@ -0,0 +1,59 @@ +/* + * Portions Copyright (c) 2003 Apple Computer, Inc. All rights reserved. + */ +#ifndef AFS_PARAM_H +#define AFS_PARAM_H + +#define AFS_VFSINCL_ENV 1 /* NOBODY uses this.... */ +#define AFS_ENV 1 +#define AFS_64BIT_ENV 1 /* Defines afs_int32 as int, not long. */ +#define AFS_PPC_ENV 1 + +#include +#define AFS_USERSPACE_ENV +#define AFS_USR_DARWIN_ENV +#define AFS_USR_DARWIN13_ENV +#define AFS_USR_DARWIN14_ENV +#define AFS_USR_DARWIN60_ENV +#define AFS_USR_DARWIN70_ENV +#define AFS_NONFSTRANS +#define AFS_SYSCALL 230 + +/* File system entry (used if mount.h doesn't define MOUNT_AFS */ +#define AFS_MOUNT_AFS "afs" + +/* Machine / Operating system information */ +#define sys_ppc_darwin_12 1 +#define sys_ppc_darwin_13 1 +#define sys_ppc_darwin_14 1 +#define sys_ppc_darwin_60 1 +#define sys_ppc_darwin_70 1 +#define SYS_NAME "ppc_darwin_70" +#define SYS_NAME_ID SYS_NAME_ID_ppc_darwin_70 +#define AFSBIG_ENDIAN 1 +#define AFS_HAVE_FFS 1 /* Use system's ffs. */ + +#define AFS_UIOSYS UIO_SYSSPACE +#define AFS_UIOUSER UIO_USERSPACE + +#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */ +#define RXK_LISTENER_ENV 1 + +#define AFS_VFS34 1 /* What is VFS34??? */ +#define afsio_iov uio_iov +#define afsio_iovcnt uio_iovcnt +#define afsio_offset uio_offset +#define afsio_seg uio_segflg +#define afsio_resid uio_resid +#define AFS_UIOSYS UIO_SYSSPACE +#define AFS_UIOUSER UIO_USERSPACE +#define VATTR_NULL usr_vattr_null + +#define AFS_DIRENT +#ifndef CMSERVERPREF +#define CMSERVERPREF +#endif + +#define BIND_8_COMPAT + +#endif /* AFS_PARAM_H */ diff --git a/src/libafs/afs.ppc_darwin_70.plist.in b/src/libafs/afs.ppc_darwin_70.plist.in new file mode 100644 index 000000000..09fb06390 --- /dev/null +++ b/src/libafs/afs.ppc_darwin_70.plist.in @@ -0,0 +1,31 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + afs + CFBundleIdentifier + org.openafs.filesystems.afs + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + afs + CFBundlePackageType + KEXT + CFBundleShortVersionString + 1.2.10 + CFBundleSignature + ???? + CFBundleVersion + 1.2.10 + OSBundleLibraries + + com.apple.kernel.bsd + 6.9.9 + com.apple.kernel.mach + 6.9.9 + + + diff --git a/src/packaging/MacOS/Makefile b/src/packaging/MacOS/Makefile new file mode 100644 index 000000000..42cf31540 --- /dev/null +++ b/src/packaging/MacOS/Makefile @@ -0,0 +1,33 @@ +# Copyright (c) 2003 Apple Computer, Inc. All rights reserved. +# +# @APPLE_LICENSE_HEADER_START@ +# +# This file contains Original Code and/or Modifications of Original Code +# as defined in and that are subject to the Apple Public Source License +# Version 2.0 (the 'License'). You may not use this file except in +# compliance with the License. Please obtain a copy of the License at +# http://www.opensource.apple.com/apsl/ and read it before using this +# file. +# +# The Original Code and all software distributed under the License are +# distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER +# EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, +# INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. +# Please see the License for the specific language governing rights and +# limitations under the License. +# +# @APPLE_LICENSE_HEADER_END@ + +AFSINCLUDE = /Library/OpenAFS/Tools/include +CFLAGS = -O -I$(AFSINCLUDE) +LIBS = -framework Foundation +ALL = afssettings + +all: $(ALL) + +afssettings : afssettings.m + cc $(CFLAGS) -o $@ $^ $(LIBS) + +clean: + @rm -f *.o $(ALL) diff --git a/src/packaging/MacOS/OpenAFS.Description.plist b/src/packaging/MacOS/OpenAFS.Description.plist new file mode 100644 index 000000000..d7c2cb879 --- /dev/null +++ b/src/packaging/MacOS/OpenAFS.Description.plist @@ -0,0 +1,14 @@ + + + + + IFPkgDescriptionDeleteWarning + + IFPkgDescriptionDescription + Mac OS X version of OpenAFS client and server. + IFPkgDescriptionTitle + OpenAFS + IFPkgDescriptionVersion + 1.2.10 + + diff --git a/src/packaging/MacOS/OpenAFS.Info.plist b/src/packaging/MacOS/OpenAFS.Info.plist new file mode 100644 index 000000000..c50b1987d --- /dev/null +++ b/src/packaging/MacOS/OpenAFS.Info.plist @@ -0,0 +1,40 @@ + + + + + CFBundleGetInfoString + OpenAFS 1.2.10 + CFBundleIdentifier + org.openafs.OpenAFS.pkg + CFBundleName + OpenAFS + CFBundleShortVersionString + 1.2.10 + IFMajorVersion + 1 + IFMinorVersion + 2 + IFPkgFlagAllowBackRev + + IFPkgFlagAuthorizationAction + RootAuthorization + IFPkgFlagDefaultLocation + / + IFPkgFlagInstallFat + + IFPkgFlagIsRequired + + IFPkgFlagRelocatable + + IFPkgFlagRestartAction + RecommendedRestart + IFPkgFlagRootVolumeOnly + + IFPkgFlagUpdateInstalledLanguages + + IFPkgFlagUseUserMask + + IFPkgFormatVersion + 0.10000000149011612 + + diff --git a/src/packaging/MacOS/afssettings.m b/src/packaging/MacOS/afssettings.m new file mode 100644 index 000000000..c1e647a9a --- /dev/null +++ b/src/packaging/MacOS/afssettings.m @@ -0,0 +1,171 @@ +/* + * Copyright (c) 2003 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +#import +#import +#import +#import +#import +#import +#import + +enum Type { + TypeNode = 0, + TypeNum, + TypeStr +}; + +typedef struct _setting { + NSString *key; + int selector; + enum Type type; + struct _setting *children; +} Setting; + +Setting s_darwin_all[] = { + {@"RealModes", AFS_SC_DARWIN_ALL_REALMODES, TypeNum, NULL}, + {NULL, 0, 0, NULL} +}; +Setting s_darwin[] = { + {@"All", AFS_SC_DARWIN_ALL, TypeNode, s_darwin_all}, + {@"Darwin12", AFS_SC_DARWIN_12, TypeNode, NULL}, + {@"Darwin13", AFS_SC_DARWIN_13, TypeNode, NULL}, + {@"Darwin14", AFS_SC_DARWIN_14, TypeNode, NULL}, + {@"Darwin60", AFS_SC_DARWIN_60, TypeNode, NULL}, + {@"Darwin70", AFS_SC_DARWIN_70, TypeNode, NULL}, + {NULL, 0, 0, NULL} +}; +Setting s_first[] = { + {@"All", AFS_SC_ALL, TypeNode, NULL}, + {@"Darwin", AFS_SC_DARWIN, TypeNode, s_darwin}, + {NULL, 0, 0, NULL} +}; +Setting s_top = {NULL, -1, TypeNode, s_first}; + +int oid[CTL_MAXNAME] = {CTL_VFS}; +NSString *path = @"/var/db/openafs/etc/config/settings.plist"; + +char *oidString(int *oid, int len); +void init(void); +void walk(id obj, Setting *s, int level); + +void +init(void) +{ + int oidmax[] = {CTL_VFS, VFS_GENERIC, VFS_MAXTYPENUM}; + int oidvfs[] = {CTL_VFS, VFS_GENERIC, VFS_CONF, 0}; + int max; + struct vfsconf conf; + size_t len; + int i; + + len = sizeof(max); + if(sysctl(oidmax, 3, &max, &len, NULL, NULL) < 0) + err(1, "sysctl VFS_MAXTYPENUM"); + for(i = max; --i >= 0; ) { + oidvfs[3] = i; + len = sizeof(conf); + if(sysctl(oidvfs, 4, &conf, &len, NULL, NULL) < 0) + continue; + if(strcmp("afs", conf.vfc_name) == 0) { + s_top.selector = conf.vfc_typenum; + break; + } + } + if(s_top.selector < 0) + errx(1, "AFS is not loaded"); +} + +char * +oidString(int *oid, int len) +{ + static char buf[256]; + char *cp = buf; + + for(;;) { + sprintf(cp, "%d", *oid++); + if(--len <= 0) + break; + cp += strlen(cp); + *cp++ = '.'; + } + return buf; +} + +void +walk(id obj, Setting *s, int level) +{ + Setting *child; + id newobj; + int intval; + const char *cp; + int level1 = level + 1; + + oid[level] = s->selector; + switch(s->type) { + case TypeNode: + for(child = s->children; child->key; child++) { + if(child->type == TypeNode && !child->children) + continue; + newobj = [obj objectForKey: child->key]; + if(newobj) + walk(newobj, child, level1); + } + break; + case TypeNum: + intval = [obj intValue]; + if(sysctl(oid, level1, NULL, NULL, &intval, sizeof(intval)) < 0) + err(1, "sysctl %s => %d", oidString(oid, level1), intval); + break; + case TypeStr: + cp = [obj UTF8String]; + if(sysctl(oid, level1, NULL, NULL, (void *)cp, strlen(cp)) < 0) + err(1, "sysctl %s => %s", oidString(oid, level1), cp); + break; + } +} + +main() +{ + NSData *plistData; + id plist; + NSString *error; + NSPropertyListFormat format; + NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; + + init(); + plistData = [NSData dataWithContentsOfFile: path]; + if(plistData) { + plist = [NSPropertyListSerialization propertyListFromData: plistData + mutabilityOption: NSPropertyListImmutable + format: &format + errorDescription: &error + ]; + if(plist) + walk(plist, &s_top, 1); + else + errx(1, "%s: %s", [path UTF8String], [error UTF8String]); + } + + [pool release]; + return 0; +} diff --git a/src/packaging/MacOS/settings.plist b/src/packaging/MacOS/settings.plist new file mode 100644 index 000000000..36e897728 --- /dev/null +++ b/src/packaging/MacOS/settings.plist @@ -0,0 +1,14 @@ + + + + + Darwin + + All + + RealModes + + + + + diff --git a/src/vol/fstab.c b/src/vol/fstab.c new file mode 100644 index 000000000..46e580167 --- /dev/null +++ b/src/vol/fstab.c @@ -0,0 +1,179 @@ +/* + * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/* + * Copyright (c) 1980, 1988, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#if defined(AFS_DARWIN_ENV) +/*----------------------------------------------------------------------- + * This version of fstab.c is intended to be used on Darwin systems to + * replace getfsent() and family. It has been modified so that rather + * than read /etc/fstab, it calls getfsstat() to get the real list of + * mounted volumes. + *-----------------------------------------------------------------------*/ + +#include +#include +#include +#include +#include +#include +#include +#include + +#define STDERR_FILENO 2 + +static struct fstab _fs_fstab; +static struct statfs *_fs_buf; +static struct statfs *_fs_ptr; +static int _fs_count; + +static error __P((int)); +static fstabscan __P((void)); + +static +fstabscan() +{ + if(_fs_count <= 0) + return(0); + _fs_fstab.fs_spec = _fs_ptr->f_mntfromname; + _fs_fstab.fs_file = _fs_ptr->f_mntonname; + _fs_fstab.fs_vfstype = _fs_ptr->f_fstypename; + _fs_fstab.fs_mntops = _fs_ptr->f_fstypename; // no mount options given + _fs_fstab.fs_type = (_fs_ptr->f_flags & MNT_RDONLY) ? FSTAB_RO : FSTAB_RW; + _fs_fstab.fs_freq = 0; + _fs_fstab.fs_passno = 0; + + _fs_ptr++; + _fs_count--; + return(1); +} + +struct fstab * +getfsent() +{ + if (!_fs_buf && !setfsent() || !fstabscan()) + return((struct fstab *)NULL); + return(&_fs_fstab); +} + +struct fstab * +getfsspec(name) + register const char *name; +{ + if (setfsent()) + while (fstabscan()) + if (!strcmp(_fs_fstab.fs_spec, name)) + return(&_fs_fstab); + return((struct fstab *)NULL); +} + +struct fstab * +getfsfile(name) + register const char *name; +{ + if (setfsent()) + while (fstabscan()) + if (!strcmp(_fs_fstab.fs_file, name)) + return(&_fs_fstab); + return((struct fstab *)NULL); +} + +setfsent() +{ + long bufsize; + + if (_fs_buf) { + free(_fs_buf); + _fs_buf = NULL; + } + if((_fs_count = getfsstat(NULL, 0, MNT_WAIT)) < 0) { + error(errno); + return(0); + } + bufsize = (long)_fs_count * sizeof(struct statfs); + if((_fs_buf = malloc(bufsize)) == NULL) { + error(errno); + return(0); + } + if(getfsstat(_fs_buf, bufsize, MNT_WAIT) < 0) { + error(errno); + return(0); + } + _fs_ptr = _fs_buf; + return(1); +} + +void +endfsent() +{ + if (_fs_buf) { + free(_fs_buf); + _fs_buf = NULL; + } + _fs_count = 0; +} + +static +error(err) + int err; +{ + char *p; + + (void)write(STDERR_FILENO, "fstab: ", 7); + (void)write(STDERR_FILENO, _PATH_FSTAB, sizeof(_PATH_FSTAB) - 1); + (void)write(STDERR_FILENO, ": ", 1); + p = strerror(err); + (void)write(STDERR_FILENO, p, strlen(p)); + (void)write(STDERR_FILENO, "\n", 1); +} +#endif /* defined(AFS_DARWIN_ENV) */ -- 2.39.5