code: mafs

Download patch

ref: 29909fc9ff080101591c8de6dfa732fc65bb323d
parent: 9b1c95ca5fe70b75aca9cc537f1cd907e73e00aa
author: 9ferno <gophone2015@gmail.com>
date: Sat Dec 3 05:59:48 EST 2022

not bothering with a disk/mafs directory

--- a/9front-installer-supports-mafs.patch
+++ b/9front-installer-supports-mafs.patch
@@ -1,4 +1,4 @@
-From 345185cd5e97d679500b4da354dffb74be22979c Mon Sep 17 00:00:00 2001
+From 29dc9c3570b1463aee8644037837bc809f3d44c9 Mon Sep 17 00:00:00 2001
 From: 9ferno <gophone2015@gmail.com>
 Date: Sat, 3 Dec 2022 10:44:08 -0700
 Subject: [PATCH] installer supports mafs
@@ -9,12 +9,12 @@
  rc/bin/inst/mountfs         |  2 ++
  rc/bin/inst/mountmafs       | 59 +++++++++++++++++++++++++++++++++++++
  rc/bin/inst/prepdisk        |  2 +-
- sys/src/9/boot/bootfs.proto | 11 +++++++
- 6 files changed, 82 insertions(+), 2 deletions(-)
+ sys/src/9/boot/bootfs.proto | 10 +++++++
+ 6 files changed, 81 insertions(+), 2 deletions(-)
  create mode 100755 rc/bin/inst/mountmafs
 
 diff --git a/rc/bin/fstype b/rc/bin/fstype
-index 67c3cd20b..673c5ae29 100755
+index 67c3cd20b..b716cefe1 100755
 --- a/rc/bin/fstype
 +++ b/rc/bin/fstype
 @@ -29,6 +29,11 @@ if(~ $"m 'kfs wren device'){
@@ -23,7 +23,7 @@
  }
 +m=`{dd -if /env/block -bs 1 -count 11 -skip 184 >[2]/dev/null}
 +if(~ $"m 'mafs device'){
-+	echo disk/mafs/mafs
++	echo disk/mafs
 +	exit
 +}
  </env/block awk '
@@ -30,7 +30,7 @@
  /^(blocksize|daddrbits|daddrbits|indirblks|dirblks|namelen)/{p[$1]=$2}
  END{
 diff --git a/rc/bin/inst/configfs b/rc/bin/inst/configfs
-index 8beb1f370..61f066d3e 100755
+index 8beb1f370..624ffbabf 100755
 --- a/rc/bin/inst/configfs
 +++ b/rc/bin/inst/configfs
 @@ -15,8 +15,11 @@ case go
@@ -43,11 +43,11 @@
 +	prompt -d cwfs64x 'File system' cwfs64x hjfs mafs
  	fstype=$rd
 +	if(~ $rd mafs)
-+		fstype=disk/mafs/mafs
++		fstype=disk/mafs
  	export fstype
  }
 diff --git a/rc/bin/inst/mountfs b/rc/bin/inst/mountfs
-index 9bfea7fef..7ae04e611 100755
+index 9bfea7fef..a57e49e11 100755
 --- a/rc/bin/inst/mountfs
 +++ b/rc/bin/inst/mountfs
 @@ -8,6 +8,8 @@ case cwfs cwfs64 cwfs64x
@@ -54,7 +54,7 @@
  	exec ./mountcwfs $*
  case hjfs
  	exec ./mounthjfs $*
-+case disk/mafs/mafs
++case disk/mafs
 +	exec ./mountmafs $*
  case *
  	mountfs=notdone
@@ -61,7 +61,7 @@
  	export mountfs
 diff --git a/rc/bin/inst/mountmafs b/rc/bin/inst/mountmafs
 new file mode 100755
-index 000000000..9a73995d0
+index 000000000..ff16b60fe
 --- /dev/null
 +++ b/rc/bin/inst/mountmafs
 @@ -0,0 +1,59 @@
@@ -102,10 +102,10 @@
 +	rm -f /srv/^$sname >[2]/dev/null
 +
 +	if(~ $ream yes){
-+		disk/mafs/mafs -r $sname $fsflags $fs
++		disk/mafs -r $sname $fsflags $fs
 +	}
 +	if not {
-+		disk/mafs/mafs -n $sname $fsflags $fs
++		disk/mafs -n $sname $fsflags $fs
 +	}
 +
 +	log Mounting $fstype file server for $fs
@@ -125,7 +125,7 @@
 +	exit
 +}
 diff --git a/rc/bin/inst/prepdisk b/rc/bin/inst/prepdisk
-index 6bf4ec40c..310be21bf 100755
+index 6bf4ec40c..4ccf1d3fd 100755
 --- a/rc/bin/inst/prepdisk
 +++ b/rc/bin/inst/prepdisk
 @@ -7,7 +7,7 @@ fn autotype {
@@ -133,29 +133,28 @@
  	case cwfs cwfs64 cwfs64x
  		echo -a 9fat -a nvram -a fscache -a fsworm -a other
 -	case hjfs
-+	case hjfs disk/mafs/mafs
++	case hjfs disk/mafs
  		echo -a 9fat -a nvram -a fs
  	}
  }
 diff --git a/sys/src/9/boot/bootfs.proto b/sys/src/9/boot/bootfs.proto
-index c9cf1fbe3..ff7a0709b 100644
+index c9cf1fbe3..677404559 100644
 --- a/sys/src/9/boot/bootfs.proto
 +++ b/sys/src/9/boot/bootfs.proto
-@@ -17,6 +17,17 @@ $objtype
+@@ -17,6 +17,16 @@ $objtype
  			edisk
  			fdisk
  			prep
 +			mafs
-+				block
-+				find
-+				free
-+				fsck
-+				fsok
-+				mafs
-+				reconcile
-+				unused
-+				updatefrees
-+				used
++			block
++			find
++			free
++			fsck
++			fsok
++			reconcile
++			unused
++			updatefrees
++			used
  		dossrv
  		echo
  		cwfs64x
--- a/mkfile
+++ b/mkfile
@@ -26,7 +26,7 @@
 	extents.h\
 	fns.h\
 
-BIN=/$objtype/bin/disk/mafs
+BIN=/$objtype/bin/disk
 
 UPDATE=mkfile\
 	$HFILES\