diff -c -r amd-upl102.ORIG/amd/Makefile.amd amd-upl102/amd/Makefile.amd
*** amd-upl102.ORIG/amd/Makefile.amd	Thu Mar  2 11:45:11 1995
--- amd-upl102/amd/Makefile.amd	Fri Aug 15 19:25:42 1997
***************
*** 94,99 ****
--- 94,100 ----
  	srvr_afs.o	\
  	srvr_nfs.o	\
  	ufs_ops.o	\
+ 	ufs_probe.o	\
  	umount_fs.o	\
  	util.o		\
  	wire.o		\
***************
*** 191,196 ****
--- 192,198 ----
  srvr_afs.o: ../amd/srvr_afs.c; ${CC_COMPILE} ../amd/srvr_afs.c
  srvr_nfs.o: ../amd/srvr_nfs.c; ${CC_COMPILE} ../amd/srvr_nfs.c
  ufs_ops.o: ../amd/ufs_ops.c; ${CC_COMPILE} ../amd/ufs_ops.c
+ ufs_probe.o: ../amd/ufs_probe.c; ${CC_COMPILE} ../amd/ufs_probe.c
  umount_fs.o: ../amd/umount_fs.c; ${CC_COMPILE} ../amd/umount_fs.c
  util.o: ../amd/util.c; ${CC_COMPILE} ../amd/util.c
  version.o: ../amd/version.c; ${CC_COMPILE} ../amd/version.c
Only in amd-upl102/amd: Makefile.amd.ORIG
diff -c -r amd-upl102.ORIG/amd/ufs_ops.c amd-upl102/amd/ufs_ops.c
*** amd-upl102.ORIG/amd/ufs_ops.c	Wed Nov  9 09:01:38 1994
--- amd-upl102/amd/ufs_ops.c	Fri Aug 15 19:26:03 1997
***************
*** 64,69 ****
--- 64,72 ----
   * UN*X file system
   */
  
+ #ifdef UFS_PROBE /* 97/08/15 K.Fujii */
+ extern char *ufs_probe(const char *);
+ #endif	/* K.Fujii End */
  /*
   * UFS needs local filesystem and device.
   */
***************
*** 111,118 ****
  	/*
  	 * Figure out the name of the file system type.
  	 */
  	MTYPE_TYPE type = MOUNT_TYPE_UFS;
! 
  	bzero((voidp) &ufs_args, sizeof(ufs_args));	/* Paranoid */
  
  	/*
--- 114,131 ----
  	/*
  	 * Figure out the name of the file system type.
  	 */
+ #ifndef UFS_PROBE /* 97/08/15 K.Fujii */
  	MTYPE_TYPE type = MOUNT_TYPE_UFS;
! #else
! 	MTYPE_TYPE type;
! 	type = ufs_probe(fs_name);
! #ifdef DEBUG
! 	printf("UFS: probing device \"%s\": looks like \"%s\"\n",
! 		fs_name, type);
! #endif /* DEBUG */
! 	if ( type == NULL ) type = MOUNT_TYPE_UFS;
! #endif	/* K.Fujii End */
! 	
  	bzero((voidp) &ufs_args, sizeof(ufs_args));	/* Paranoid */
  
  	/*
Only in amd-upl102/amd: ufs_ops.c.ORIG
diff -c -r amd-upl102.ORIG/amd/ufs_probe.c amd-upl102/amd/ufs_probe.c
*** amd-upl102.ORIG/amd/ufs_probe.c	Fri Aug 15 19:28:53 1997
--- amd-upl102/amd/ufs_probe.c	Fri Aug 15 19:26:12 1997
***************
*** 0 ****
--- 1,100 ----
+ /*
+  * Cloned from fstype in mount.c of mount-2.5l-2B.src.rpm for MkLinux
+  *
+  * Fri Aug 15 1997: fujiik@jlcuxf.kek.jp
+  */
+ 
+ 
+ #include <linux/fs.h>
+ #include <linux/minix_fs.h>
+ #include <linux/ext_fs.h>
+ #include <linux/ext2_fs.h>
+ #include <linux/xia_fs.h>
+ #include <linux/iso_fs.h>
+ 
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <unistd.h>
+ #include <sys/mount.h>
+ #include <stdio.h>
+ #include <errno.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include <fcntl.h>
+ /*
+     char *ufs_probe(const char *device);
+ 
+     Probes the device and attempts to determine the type of filesystem
+     contained within.
+ 
+     Original routine by <jmorriso@bogomips.ww.ubc.ca>; made into a function
+     for mount(8) by Mike Grupenhoff <kashmir@umiacs.umd.edu>.
+     Read the superblock only once - aeb
+     Added a test for iso9660 - aeb
+     Added a test for high sierra (iso9660) - quinlan@bucknell.edu
+     Corrected the test for xiafs - aeb
+ 
+     Currently supports: minix, ext, ext2, xiafs, iso9660
+ */
+ char *
+ ufs_probe(const char *device)
+ {
+     int fd;
+     char *type = NULL;
+     union {
+ 	struct minix_super_block ms;
+ 	struct ext_super_block es;
+ 	struct ext2_super_block e2s;
+     } sb;
+     struct xiafs_super_block xiasb;
+     union {
+ 	struct iso_volume_descriptor iso;
+ 	struct hs_volume_descriptor hs;
+     } isosb;
+     struct stat statbuf;
+ 
+     /* opening and reading an arbitrary unknown path can have
+        undesired side effects - first check that `device' refers
+        to a block device */
+     if (stat (device, &statbuf) || !S_ISBLK(statbuf.st_mode))
+       return 0;
+ 
+     fd = open(device, O_RDONLY);
+     if (fd < 0)
+       return 0;
+ 
+     if (lseek(fd, BLOCK_SIZE, SEEK_SET) < 0
+ 	|| read(fd, (char *) &sb, sizeof(sb)) < 0) {
+ 	perror(device);
+ 	close(fd);
+ 	return 0;
+     }
+ 
+     if (sb.ms.s_magic == MINIX_SUPER_MAGIC
+ 	|| sb.ms.s_magic == MINIX_SUPER_MAGIC2)
+       type = "minix";
+ 
+     else if (sb.es.s_magic == EXT_SUPER_MAGIC)
+       type = "ext";
+ 
+ #ifndef EXT2_PRE_02B_MAGIC
+ #define EXT2_PRE_02B_MAGIC    0xEF51
+ #endif
+     else if (sb.e2s.s_magic == EXT2_SUPER_MAGIC
+ 	     || sb.e2s.s_magic == EXT2_PRE_02B_MAGIC)
+       type = "ext2";
+ 
+     else if (lseek(fd, 0, SEEK_SET) == 0
+ 	&& read(fd, (char *) &xiasb, sizeof(xiasb)) == sizeof(xiasb)
+ 	&& xiasb.s_magic == _XIAFS_SUPER_MAGIC)
+       type = "xiafs";
+ 
+     else if (lseek(fd, 0x8000, SEEK_SET) == 0x8000
+         && read(fd, (char *) &isosb, sizeof(isosb)) == sizeof(isosb)
+         && (strncmp(isosb.iso.id, ISO_STANDARD_ID, sizeof(isosb.iso.id)) == 0
+ 	    || strncmp(isosb.hs.id, HS_STANDARD_ID, sizeof(isosb.hs.id)) == 0))
+       type = "iso9660";
+ 
+     close (fd);
+     return(type);
+ }
diff -c -r amd-upl102.ORIG/config/Makefile.linux amd-upl102/config/Makefile.linux
*** amd-upl102.ORIG/config/Makefile.linux	Fri Aug 15 19:54:29 1997
--- amd-upl102/config/Makefile.linux	Fri Aug 15 19:25:17 1997
***************
*** 47,53 ****
  CC=gcc
  SYSCC=${CC}
  CCOPTS= -s -O2 -I/usr/include/bsd -DHAS_REGEXP -DDEBUG -DHAS_STRDUP \
!         -fsigned-char -DDIRENT -DMOUNT_TYPE_UFS=\"minix\" -DLinux_DEBUG
  RESOLV=-lnsl
  RPCLIB =
  YACC=bison -y
--- 47,54 ----
  CC=gcc
  SYSCC=${CC}
  CCOPTS= -s -O2 -I/usr/include/bsd -DHAS_REGEXP -DDEBUG -DHAS_STRDUP \
!         -fsigned-char -DDIRENT -DMOUNT_TYPE_UFS=\"minix\" -DLinux_DEBUG \
!         -DUFS_PROBE
  RESOLV=-lnsl
  RPCLIB =
  YACC=bison -y
Only in amd-upl102/config: Makefile.linux.ORIG
diff -c -r amd-upl102.ORIG/config/Makefile.linux.orig amd-upl102/config/Makefile.linux.orig
*** amd-upl102.ORIG/config/Makefile.linux.orig	Fri Aug 15 19:54:42 1997
--- amd-upl102/config/Makefile.linux.orig	Tue Jul  8 23:11:31 1997
***************
*** 52,58 ****
  YACC=bison -y
  LEX=flex
  
! HAS_NIS_MAPS = -DHAS_NIS_MAPS -DHAS_NIS_RELOAD # not on linux (yet)
  
  # The following syntax only works with GNU's make - which all linux users have.
  # Linux can lose the segment padding to page boundaries for these binaries.
--- 52,58 ----
  YACC=bison -y
  LEX=flex
  
! HAS_NIS_MAPS = -DDIRENT #-DHAS_NIS_MAPS -DHAS_NIS_RELOAD # not on linux (yet)
  
  # The following syntax only works with GNU's make - which all linux users have.
  # Linux can lose the segment padding to page boundaries for these binaries.
