/*
* 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 <sys/param.h>
#include <afsconfig.h>
+#include <afs/param.h>
-RCSID
- ("$Header$");
+#include <roken.h>
+
+#include <ctype.h>
-#include <afs/param.h>
#include <rx/xdr.h>
+#include <rx/rx_queue.h>
#include <afs/afsint.h>
-#include <string.h>
-#include <ctype.h>
+
#if !defined(AFS_SGI_ENV)
-#ifdef AFS_OSF_ENV
-#include <ufs/fs.h>
-#else /* AFS_OSF_ENV */
#ifdef AFS_VFSINCL_ENV
#define VFS
#ifdef AFS_SUN5_ENV
#endif
#endif
#else /* AFS_VFSINCL_ENV */
-#if !defined(AFS_AIX_ENV) && !defined(AFS_LINUX22_ENV) && !defined(AFS_XBSD_ENV)
+#if !defined(AFS_AIX_ENV) && !defined(AFS_LINUX20_ENV) && !defined(AFS_XBSD_ENV) && !defined(AFS_DARWIN_ENV)
#include <sys/fs.h>
#endif
#endif /* AFS_VFSINCL_ENV */
-#endif /* AFS_OSF_ENV */
#endif /* AFS_SGI_ENV */
-#include <sys/errno.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <stdio.h>
#include <sys/file.h>
#ifdef AFS_AIX_ENV
#include <sys/vfs.h>
-#include <fcntl.h>
#else
#ifdef AFS_HPUX_ENV
-#include <fcntl.h>
#include <mntent.h>
#else
#if defined(AFS_SUN_ENV) || defined(AFS_SUN5_ENV)
#endif
#else
#if defined(AFS_SGI_ENV)
-#include <fcntl.h>
#include <mntent.h>
#else
#ifdef AFS_LINUX22_ENV
#endif /* AFS_SGI_ENV */
#endif /* AFS_HPUX_ENV */
#endif
-#include <netdb.h>
-#include <netinet/in.h>
#include <sys/wait.h>
#include <setjmp.h>
-#ifndef ITIMER_REAL
-#include <sys/time.h>
-#endif /* ITIMER_REAL */
+
+#include "ihandle.h"
#include "partition.h"
/* ensure that we don't have a "/" instead of a "/dev/rxd0a" type of device.
{
static char pbuffer[128];
char pbuf[128], *ptr;
- int code, i;
#ifdef AFS_SUN5_ENV
struct mnttab mnt;
FILE *mntfile;
if (stat(part, &status) == -1) {
continue;
}
-#if !defined(AFS_SGI_XFS_IOPS_ENV) && !defined(AFS_LINUX22_ENV)
+#if !defined(AFS_SGI_XFS_IOPS_ENV) && !defined(AFS_LINUX22_ENV) && !defined(AFS_DARWIN_ENV)
if ((status.st_ino !=
ROOTINO) /*|| ((status.st_mode & S_IFMT) != S_IFBLK) */ ) {
continue;
#endif
if (wpath) {
strcpy(pbuf, pbuffer);
- ptr = (char *)strrchr(pbuf, '/');
+ ptr = (char *)strrchr(pbuf, OS_DIRSEPC);
if (ptr) {
*ptr = '\0';
strcpy(wpath, pbuf);
} else
return NULL;
}
- ptr = (char *)strrchr(pbuffer, '/');
+ ptr = (char *)strrchr(pbuffer, OS_DIRSEPC);
if (ptr) {
strcpy(pbuffer, ptr + 1);
return pbuffer;
{
static char rawname[100];
struct stat statbuf;
- char *p;
int code, i;
i = strlen(devfile);
while (i >= 0) {
strcpy(rawname, devfile);
- if (devfile[i] == '/') {
+ if (devfile[i] == OS_DIRSEPC) {
rawname[i + 1] = 'r';
rawname[i + 2] = 0;
strcat(rawname, &devfile[i + 1]);
if (!code && S_ISCHR(statbuf.st_mode))
return rawname;
- while ((--i >= 0) && (devfile[i] != '/'));
+ while ((--i >= 0) && (devfile[i] != OS_DIRSEPC));
}
return NULL;