Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!samsung!munnari.oz.au!metro!cluster!swift!softway!peterc From: peterc@softway.sw.oz.au (Peter Chubb) Newsgroups: comp.os.minix Subject: Strange behaviour of mkfs in Amiga Minix Message-ID: <4641@softway.sw.oz.au> Date: 10 Feb 91 23:44:33 GMT Organization: Softway Pty Ltd, Sydney, Australia Lines: 43 I obtained Amiga Minix last week from Prentice-Hall in Australia. After fixing minor problems with the boot disc (the copy of minix.img had a bad sector, so I used minix.img.bu), I wanted to create some file systems. I used messyfmt from the MSH1.30 product to format 720K 9 sector discs for MS-DOS, then rebooted with minix. mkfs /dev/dd1 720 seemed to access drive 1, then complained that it couldn't access sector 719. I tried another disc, and this time mkfs dumped core. I looked at the mkfs binary, and it was truncated to around 11k. Restored a much larger mkfs from the backup, then tried again -- similar behaviour. OK, thought I, I'll recompiled mkfs, and put some instrumentation in to see what's going on. Needed a new empty filesystem to do this, of course -- rebooted Amigados, used diskcopy and msh to copy one of the source disks, rebooted minix, mounted the copy, rm -r *, then go through the palaver necessary to extract the mkfs source from the archive, and start compiling. No go. Syntax errors galore. Turns out that NAME_MAX is only defined if _POSIX_SOURCE is defined. Try again., with _POSIX_SOURCE defined. This time, the compiled complains about a perfectly innocent sizeof (*sup) on or near line 290. Replaced this with sizeof (struct super_block) (or whatever -- can't remember exactly here), and all compiled cleanly, to exhibit the same behaviour as the original binary. Also, there are several things commented out with #if (MACHINE == ATARI) that I think perhaps should include AMIGA, etc, too. Can anyone help me? Is there something wrong with the floppy device, or something? Has mkfs never been compiled on an Amiga? Yours in anticipation, - Peter Chubb Softway Pty Ltd, P.O. Box 305, Strawberry Hills, NSW 2012, AUSTRALIA Phone: +61 2 698 2322; Fax: +61 2 699 9174; Telex: AA27987 Internet: peterc@softway.oz.au UUCP: ...!uunet!softway.oz!peterc