[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
MinixFS 0.60 PL10 Patch Collection
- Subject: MinixFS 0.60 PL10 Patch Collection
- From: knarf@nasim.cube.net (Frank Bartels)
- Date: Sat, 22 Oct 1994 16:19:13 +0100 (MET)
Hi!
Just tried to apply Andreas Schwab's new diffs for MinixFS 0.60 PL10
and I wondered he fixed something, which was already fixed by Torsten
Scherer. I also got some Patches from Juergen Lock a while ago and I
made some cosmetic changes to the makefiles, which makes it easier to
build the binaries in a cross-environment. I also added a small note to
docs/minixfs.doc. So I've put all the patches into one file and here it
is:
To apply do the following (for those who are not yet familiar with patch):
Unpack the original source distribution:
mkdir mfs610s
cd mfs610s
zoo x /your/path/mfs610s.zoo
Strip those silly CRLFs from the source:
find -type f | xargs crlf -s
[Use sed or whatever if you don't have crlf.
crlf comes with the MiNT library source.]
Apply the diffs:
patch -p1 < /your/path/mfs610s.diffs
Edit minixfs/config.h for your own taste.
Then just type make, have a cup of coffee and enjoy. ;)
If you are cross-compiling just type "make CC=cgcc".
diff -ur mfs610s.orig/dirs mfs610s/dirs
--- mfs610s.orig/dirs Fri Nov 26 03:43:28 1993
+++ mfs610s/dirs Thu Oct 20 17:46:23 1994
@@ -1,3 +1,3 @@
-INSTALL= cp
-FSDIR= f:/
-UTILDIR= f:/tools
+INSTALL= install -c
+FSDIR= /c/multitos
+UTILDIR= /usr/etc
diff -ur mfs610s.orig/docs/minit.doc mfs610s/docs/minit.doc
--- mfs610s.orig/docs/minit.doc Fri May 13 04:48:42 1994
+++ mfs610s/docs/minit.doc Sat Oct 22 15:26:29 1994
@@ -42,6 +42,11 @@
the increment you want. If this option is not present then a value of one is
assumed.
+NOTE: If you want to use higher increments than 4, you *have to*
+recompile minix.xfs after changing the value of MAX_INCREMENT in
+minixfs/config.h to `8'. Otherwise you will not be able to access the
+partition and you'll get nasty errors on the console.
+
PROTECTION
A couple of options deal with 'protection'. This is a somewhat tricky
diff -ur mfs610s.orig/fsck/makefile mfs610s/fsck/makefile
--- mfs610s.orig/fsck/makefile Sat May 14 05:04:54 1994
+++ mfs610s/fsck/makefile Thu Oct 20 17:12:25 1994
@@ -2,7 +2,7 @@
OBJS= main.o fsck1.o fsck2.o io.o common.o ../hdio.o ../tinyxhdi.o
-all: fsck.ttp
+all: fsck
include ../dirs
@@ -20,14 +20,14 @@
../tinyxhdi.o: ../minixfs/tinyxhdi.c
$(CC) $(CFLAGS) -DTINY_XHDI -c ../minixfs/tinyxhdi.c -o ../tinyxhdi.o
-fsck.ttp: $(OBJS)
- $(CC) $(CFLAGS) -s -o fsck.ttp $(OBJS) -liio16
+fsck: $(OBJS)
+ $(CC) $(CFLAGS) -s -o fsck $(OBJS) -liio16
-install: fsck.ttp
- $(INSTALL) fsck.ttp $(UTILDIR)
+install: fsck
+ $(INSTALL) fsck $(UTILDIR)
clean:
rm -f $(OBJS)
clobber:
- rm -f $(OBJS) fsck.ttp
+ rm -f $(OBJS) fsck
diff -ur mfs610s.orig/makefile mfs610s/makefile
--- mfs610s.orig/makefile Sat May 14 05:15:46 1994
+++ mfs610s/makefile Thu Oct 20 18:17:38 1994
@@ -1,31 +1,43 @@
#Makefile for minixfs and friends
+CC=gcc
+
+# as should reside in /bin, so the following definition is only really
+# needed for cross-compiling.
+
+AS=$(CC) -c
+
CFLAGS = -Wall -mshort -O2 -fomit-frame-pointer -I.
# Get the directories to install everything
include dirs
-all: minit.ttp mfsconf.ttp mount.ttp minix.xfs fsck.ttp flist.ttp
+all: minit mfsconf mount minix.xfs fscheck flist
-install: minit.ttp mfsconf.ttp mount.ttp flist.ttp
- $(MAKE) -C fsck install
- $(MAKE) -C minixfs install
- $(INSTALL) minit.ttp mfsconf.ttp mount.ttp flist.ttp $(UTILDIR)
+# Do not use make install. Just put the minixfs/minix.xfs to the place
+# where MiNT will find it at startup, and put the binaries to /usr/etc
+# and link them to /etc (we do not want binaries in /etc and running
+# fsck at boottime is just possible from the mint.cnf and not from /etc/rc.
+
+install: minit mfsconf mount flist
+ $(MAKE) -C fsck "CC=$(CC)" install
+ $(MAKE) -C minixfs "CC=$(CC)" "AS=$(AS)" install
+ $(INSTALL) minit mfsconf mount flist $(UTILDIR)
AUXOBJS= tinyxhdi.o hdio.o
-minit.ttp: minit.o $(AUXOBJS)
- $(CC) -s -o minit.ttp $(CFLAGS) minit.o $(AUXOBJS) -liio16
+minit: minit.o $(AUXOBJS)
+ $(CC) -s -o minit $(CFLAGS) minit.o $(AUXOBJS) -liio16
-mfsconf.ttp: mfsconf.c
- $(CC) -s -o mfsconf.ttp $(CFLAGS) mfsconf.c -liio16
+mfsconf: mfsconf.c
+ $(CC) -s -o mfsconf $(CFLAGS) mfsconf.c -liio16
-mount.ttp: mount.c
- $(CC) -s -o mount.ttp $(CFLAGS) mount.c -liio16
+mount: mount.c
+ $(CC) -s -o mount $(CFLAGS) mount.c -liio16
-flist.ttp: flist.c
- $(CC) -s -o flist.c $(CFLAGS) flist.c -liio16
+flist: flist.c
+ $(CC) -s -o flist $(CFLAGS) flist.c -liio16
tinyxhdi.o: minixfs/tinyxhdi.c
$(CC) $(CFLAGS) -DTINY_XHDI -c minixfs/tinyxhdi.c
@@ -34,10 +46,10 @@
$(CC) $(CFLAGS) -c minixfs/hdio.c
minix.xfs:
- $(MAKE) -C minixfs
+ $(MAKE) -C minixfs "CC=$(CC)" "AS=$(AS)"
-fsck.ttp:
- $(MAKE) -C fsck
+fscheck:
+ $(MAKE) -C fsck "CC=$(CC)"
clean:
$(MAKE) -C minixfs clean
@@ -46,4 +58,4 @@
clobber:
$(MAKE) -C minixfs clobber
$(MAKE) -C fsck clobber
- rm -f minit.ttp mfsconf.ttp mount.ttp flist.ttp $(AUXOBJS) minit.o
+ rm -f minit mfsconf mount flist $(AUXOBJS) minit.o
diff -ur mfs610s.orig/minixfs/hdio.c mfs610s/minixfs/hdio.c
--- mfs610s.orig/minixfs/hdio.c Sat May 14 03:35:22 1994
+++ mfs610s/minixfs/hdio.c Thu Oct 20 15:20:08 1994
@@ -76,7 +76,7 @@
"Unrecognised partition id", /* 9 */
"XHInqTarget failed", /* 10 */
"Unsupported physical sector size", /* 11 */
-"Invalid partition start (zero BPB?)" /* 12 */
+"Invalid partition start (zero BPB?)", /* 12 */
"ICD software too old to fix", /* 13 */
/* These are from set_lrecno */
"Memory allocation failure", /* 14 */
diff -ur mfs610s.orig/minixfs/main.c mfs610s/minixfs/main.c
--- mfs610s.orig/minixfs/main.c Sun May 8 17:35:00 1994
+++ mfs610s/minixfs/main.c Thu Oct 20 15:20:09 1994
@@ -123,8 +123,10 @@
{
BASEPAGE *b;
+#if 0
if(Addroottimeout) Addroottimeout(sync_time*1000l,t_sync,0);
else
+#endif
{
b = (BASEPAGE *)p_exec(5, 0L, "", 0L); /* create a basepage */
diff -ur mfs610s.orig/minixfs/makefile mfs610s/minixfs/makefile
--- mfs610s.orig/minixfs/makefile Fri Nov 26 03:43:52 1993
+++ mfs610s/minixfs/makefile Thu Oct 20 18:14:29 1994
@@ -1,7 +1,5 @@
#Makefile for minixfs and friends
-AS=gcc-as
-
CFLAGS=-Wall -mshort -O2 -fomit-frame-pointer -I.
include ../dirs
@@ -9,6 +7,7 @@
OBJS= init.o minixfs.o minixdev.o io.o cache.o dir.o inode.o zone.o main.o \
trans.o misc.o bitmap.o check.o tinyxhdi.o kludge.o hdio.o \
dummyfs.o stack.o
+
all: minix.xfs
tinyxhdi.o: tinyxhdi.c xhdi.h
diff -ur mfs610s.orig/minixfs/minixfs.c mfs610s/minixfs/minixfs.c
--- mfs610s.orig/minixfs/minixfs.c Fri May 13 05:18:04 1994
+++ mfs610s/minixfs/minixfs.c Thu Oct 20 15:20:38 1994
@@ -267,8 +267,8 @@
mode |= 0111;
}
ripnew.i_mode= I_REGULAR | mode;
- ripnew.i_uid=Getuid();
- ripnew.i_gid=Getgid();
+ ripnew.i_uid=Geteuid();
+ ripnew.i_gid=Getegid();
ripnew.i_nlinks=1;
ripnew.i_mtime=Unixtime(Timestamp(), Datestamp());
@@ -412,8 +412,8 @@
/* Set up inode */
bzero(&ripnew,sizeof(d_inode));
ripnew.i_mode=I_DIRECTORY | (mode & 0777);
- ripnew.i_uid=Getuid();
- ripnew.i_gid=Getgid();
+ ripnew.i_uid=Geteuid();
+ ripnew.i_gid=Getegid();
ripnew.i_nlinks=2;
ripnew.i_mtime=Unixtime(Timestamp(), Datestamp());
ripnew.i_ctime=ripnew.i_mtime;
@@ -1364,6 +1364,10 @@
return EACCDN;
}
+ /* Strip U: prefix */
+ if ((to[0] == 'u' || to[0] == 'U') && to[1] == ':' && to[2] == '\\')
+ to += 2;
+
if(strlen(to)>=SYMLINK_NAME_MAX)
{
DEBUG("minixfs: Symbolic link name too long");
@@ -1381,9 +1385,9 @@
bzero(&rip,sizeof(d_inode));
rip.i_mode=I_SYMLINK | 0777;
- rip.i_size=strlen(to)+1;
- rip.i_uid=Getuid();
- rip.i_gid=Getgid();
+ rip.i_size=strlen(to);
+ rip.i_uid=Geteuid();
+ rip.i_gid=Getegid();
rip.i_mtime=Unixtime(Timestamp(),Datestamp());
rip.i_ctime=rip.i_mtime;
rip.i_atime=rip.i_mtime;
@@ -1420,6 +1424,12 @@
return EACCDN;
}
read_zone(rip.i_zone[0],&temp,file->dev,&syscache);
+ if (temp.bdata[0] == '/' && len > 2)
+ {
+ *buf++ = 'u';
+ *buf++ = ':';
+ len -= 2;
+ }
if(stob_ncpy(buf, (char *) &temp,len))
{
DEBUG("m_readlink: name too long");
--
Frank Bartels | UUCP/ZModem: + 49 89 5469593 | MiNT is
knarf@nasim.cube.net | Login: nuucp Index: /pub/ls-lR.nasim.gz | Now TOS!