macos-10-6-support-20090216
authorChas Williams <chas@cmf.nrl.navy.mil>
Tue, 17 Feb 2009 04:25:10 +0000 (04:25 +0000)
committerDerrick Brashear <shadow@dementia.org>
Tue, 17 Feb 2009 04:25:10 +0000 (04:25 +0000)
LICENSE IPL10
FIXES 124288

support for (32 bit) macos 10.6. no pam yet

src/config/param.x86_darwin_100.h [new file with mode: 0644]
src/libafs/afs.x86_darwin_100.plist.in [new file with mode: 0644]
src/packaging/MacOS/InstallationCheck.10 [new file with mode: 0644]
src/packaging/MacOS/ReadMe.rtf.10 [new file with mode: 0644]
src/rxdebug/rxdumptrace.c [new file with mode: 0644]

diff --git a/src/config/param.x86_darwin_100.h b/src/config/param.x86_darwin_100.h
new file mode 100644 (file)
index 0000000..49cdd44
--- /dev/null
@@ -0,0 +1,190 @@
+#ifndef UKERNEL
+/* This section for kernel libafs compiles only */
+
+#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_CLIENT        1
+#define AFS_64BIT_IOPS_ENV     1
+#if defined(__ppc__)
+#define AFS_PPC_ENV            1
+#elif defined(__i386__)
+#define AFS_X86_ENV            1
+#else
+#error Unsupported architecture
+#endif
+#define AFS_VFSINCL_ENV                1
+
+#include <afs/afs_sysnames.h>
+
+#define AFS_DARWIN_ENV
+#define AFS_DARWIN13_ENV
+#define AFS_DARWIN14_ENV
+#define AFS_DARWIN60_ENV
+#define AFS_DARWIN70_ENV
+#define AFS_DARWIN80_ENV
+#define AFS_DARWIN90_ENV
+#define AFS_DARWIN100_ENV
+#define AFS_NONFSTRANS
+#define AFS_SYSCALL             230
+#define AFS_NAMEI_ENV 1
+#define DARWIN_REFBASE 3
+#define AFS_CACHE_VNODE_PATH
+
+/* File system entry (used if mount.h doesn't define MOUNT_AFS */
+#define AFS_MOUNT_AFS    "afs"
+
+/* Machine / Operating system information */
+#if defined(__ppc__)
+#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_ppc_darwin_80      1
+#define sys_ppc_darwin_90      1
+#define sys_ppc_darwin_100     1
+#define SYS_NAME               "ppc_darwin_100"
+#define SYS_NAME_ID            SYS_NAME_ID_ppc_darwin_100
+#define AFSBIG_ENDIAN          1
+#elif defined(__i386__)
+#define sys_x86_darwin_12      1
+#define sys_x86_darwin_13      1
+#define sys_x86_darwin_14      1
+#define sys_x86_darwin_60      1
+#define sys_x86_darwin_70      1
+#define sys_x86_darwin_80      1
+#define sys_x86_darwin_90      1
+#define sys_x86_darwin_100     1
+#define SYS_NAME               "x86_darwin_100"
+#define SYS_NAME_ID            SYS_NAME_ID_x86_darwin_100
+#define AFSLITTLE_ENDIAN       1
+#else
+#error Unsupported architecture
+#endif
+#define AFS_HAVE_FFS    1      /* Use system's ffs. */
+
+#define AFS_GCPAGS               0
+#define RXK_LISTENER_ENV         1
+
+#ifdef KERNEL
+#undef MACRO_BEGIN
+#undef MACRO_END
+#include <kern/macro_help.h>
+#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)   _MALLOC(x, M_TEMP, M_WAITOK)
+#define AFS_KFREE(x,y)  _FREE(x,M_TEMP)
+#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 BIND_8_COMPAT
+
+#endif
+#endif /* AFS_PARAM_H */
+
+#else /* !defined(UKERNEL) */
+
+/* This section for user space compiles only */
+
+#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. */
+#if defined(__ppc__)
+#define AFS_PPC_ENV            1
+#elif defined(__i386__)
+#define AFS_X86_ENV            1
+#else
+#error Unsupported architecture
+#endif
+
+#include <afs/afs_sysnames.h>
+#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_USR_DARWIN80_ENV
+#define AFS_USR_DARWIN90_ENV
+#define AFS_USR_DARWIN100_ENV
+#define AFS_NONFSTRANS
+#define AFS_SYSCALL             230
+#define DARWIN_REFBASE 0
+
+/* File system entry (used if mount.h doesn't define MOUNT_AFS */
+#define AFS_MOUNT_AFS    "afs"
+
+/* Machine / Operating system information */
+#if defined(__ppc__)
+#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_ppc_darwin_80      1
+#define sys_ppc_darwin_90      1
+#define sys_ppc_darwin_100     1
+#define SYS_NAME               "ppc_darwin_100"
+#define SYS_NAME_ID            SYS_NAME_ID_ppc_darwin_100
+#define AFSBIG_ENDIAN          1
+#elif defined(__i386__)
+#define sys_x86_darwin_12      1
+#define sys_x86_darwin_13      1
+#define sys_x86_darwin_14      1
+#define sys_x86_darwin_60      1
+#define sys_x86_darwin_70      1
+#define sys_x86_darwin_80      1
+#define sys_x86_darwin_100     1
+#define SYS_NAME               "x86_darwin_100"
+#define SYS_NAME_ID            SYS_NAME_ID_x86_darwin_100
+#define AFSLITTLE_ENDIAN       1
+#else
+#error Unsupported architecture
+#endif
+#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 */
+
+#endif /* !defined(UKERNEL) */
diff --git a/src/libafs/afs.x86_darwin_100.plist.in b/src/libafs/afs.x86_darwin_100.plist.in
new file mode 100644 (file)
index 0000000..a138571
--- /dev/null
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
+<plist version="0.9">
+<dict>
+       <key>CFBundleDevelopmentRegion</key>
+       <string>English</string>
+       <key>CFBundleExecutable</key>
+       <string>afs</string>
+       <key>CFBundleIdentifier</key>
+       <string>org.openafs.filesystems.afs</string>
+       <key>CFBundleInfoDictionaryVersion</key>
+       <string>8.0</string>
+       <key>CFBundleName</key>
+       <string>afs</string>
+       <key>CFBundlePackageType</key>
+       <string>KEXT</string>
+       <key>CFBundleShortVersionString</key>
+       <string>@MACOS_VERSION@</string>
+       <key>CFBundleSignature</key>
+       <string>????</string>
+       <key>CFBundleVersion</key>
+       <string>@MACOS_VERSION@</string>
+       <key>OSBundleLibraries</key>
+       <dict>
+               <key>com.apple.kpi.bsd</key>
+               <string>8.0.0</string>
+               <key>com.apple.kpi.mach</key>
+               <string>8.0.0</string>
+               <key>com.apple.kpi.libkern</key>
+               <string>8.0</string>
+       </dict>
+</dict>
+</plist>
diff --git a/src/packaging/MacOS/InstallationCheck.10 b/src/packaging/MacOS/InstallationCheck.10
new file mode 100644 (file)
index 0000000..71e1782
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/sh
+majorvers=`uname -r | sed 's/\..*//'`
+echo "InstallationCheck: os release is $majorvers"
+if [ $majorvers -ne 10 ]; then
+echo "InstallationCheck: not ok"
+       exit 112
+fi
+
+echo "InstallationCheck: ok"
+exit 0
diff --git a/src/packaging/MacOS/ReadMe.rtf.10 b/src/packaging/MacOS/ReadMe.rtf.10
new file mode 100644 (file)
index 0000000..c6b346b
--- /dev/null
@@ -0,0 +1,13 @@
+{\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf100
+{\fonttbl\f0\fswiss\fcharset77 Helvetica;}
+{\colortbl;\red255\green255\blue255;}
+\margl1440\margr1440\vieww9000\viewh9000\viewkind0
+\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
+
+\f0\fs20 \cf0 This release of OpenAFS is targeted at MacOS 10.6. (Snow Leopard)
+\
+Select a client cell name by editing /var/db/openafs/etc/ThisCell\
+\
+The included afssettings program is distributed under the Apple Public Source License, version 2.0. See http://www.opensource.apple.com/apsl/2.0.txt or the included file 2.0.txt.\
+\
+Reboot when all of this is done.}
diff --git a/src/rxdebug/rxdumptrace.c b/src/rxdebug/rxdumptrace.c
new file mode 100644 (file)
index 0000000..b223117
--- /dev/null
@@ -0,0 +1,103 @@
+/*
+ * Copyright 2000, International Business Machines Corporation and others.
+ * All Rights Reserved.
+ * 
+ * This software has been released under the terms of the IBM Public
+ * License.  For details, see the LICENSE file in the top-level source
+ * directory or online at http://www.openafs.org/dl/license10.html
+ */
+
+#include <afsconfig.h>
+#include <afs/param.h>
+
+RCSID
+    ("$Header$");
+
+#ifdef RXDEBUG
+#include <string.h>
+#ifdef AFS_NT40_ENV
+#include <fcntl.h>
+#include <io.h>
+#else
+#include <sys/file.h>
+#include <unistd.h>
+#endif
+#include "rx.h"
+#include "rx_globals.h"
+#include "rx_trace.h"
+
+extern char *rxi_tracename;
+extern int rxi_logfd;
+
+struct rx_trace {
+    afs_uint32 cid;
+    unsigned short call;
+    unsigned short qlen;
+    afs_uint32 now;
+    afs_uint32 waittime;
+    afs_uint32 servicetime;
+    afs_uint32 event;
+};
+
+#include <errno.h>
+#ifdef AFS_NT40_ENV
+#include <afs/afsutil.h>
+#endif
+
+int
+main(argc, argv)
+     char **argv;
+{
+    struct rx_trace ip;
+    int err = 0;
+
+    setlinebuf(stdout);
+    argv++;
+    argc--;
+    while (argc && **argv == '-') {
+       if (strcmp(*argv, "-trace") == 0) {
+           strcpy(rxi_tracename, *(++argv));
+           argc--;
+       } else {
+           err++;
+           break;
+       }
+       argv++, argc--;
+    }
+    if (err || argc != 0) {
+       printf("usage: dumptrace [-trace pathname]");
+       exit(1);
+    }
+
+    rxi_logfd = open(rxi_tracename, O_RDONLY);
+    if (rxi_logfd < 0) {
+       perror("");
+       exit(errno);
+    }
+
+    while (read(rxi_logfd, &ip, sizeof(struct rx_trace))) {
+       printf("%9u ", ip.now);
+       switch (ip.event) {
+       case RX_CALL_END:
+           putchar('E');
+           break;
+       case RX_CALL_START:
+           putchar('S');
+           break;
+       case RX_CALL_ARRIVAL:
+           putchar('A');
+           break;
+       case RX_TRACE_DROP:
+           putchar('D');
+           break;
+       default:
+           putchar('U');
+           break;
+       }
+       printf(" %3u %7u %7u      %x.%x\n", ip.qlen, ip.servicetime,
+              ip.waittime, ip.cid, ip.call);
+    }
+    return 0;
+}
+
+#endif