[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] Easymint filesystem checks



On Thu, 13 Jan 2011, Jo Even Skarstein wrote:

# On Thu, 2011-01-13 at 12:37 +0100, Jo Even Skarstein wrote:
# > On Wed, 2011-01-12 at 17:02 -0500, Jeff Mitchell wrote:
# > > 	I woudl assume the norm is to go through fstab (or hd driver) and 
# > > fsck all the devices with a known fs type; if its an unknwon fs, skip it 
# > > and do not consider it an error?
# > 
# > I made a small test-program last night (in C). It does a
# > Dcntl(FS_INFO...) on all drives, partition types are correctly
# > idenfified. It should be easy to run the correct fsck on each partition.
# 
# Here's a tiny program that checks the filesystem-type on each partition
# and runs e2fsck.ttp on each ext2-partition. No fstab is needed, just
# this program and e2fsck. It's a pretty crude hack, but illustrates how
# this can be done. It doesn't check the return value of e2fsck, so
# booting will continue even if an unrecoverable error is found.
# 
# I compiled this with PureC, and it doesn't use any libraries except the
# GEMDOS bindings. If somebody wants to make something useful out of this
# please go ahead :)

	To be 'unix flavored', maybe hand it an app on the commandline 
that it woudl then 'map over' the drive-set; or really, a unixy way of 
doing it would be a tool to return a list of devices, and another tool 
that maps it over a third tool.. but not sure you want all those nested 
processes and shells firing off on a TOS-machine, so maybe the first 
flavour woudl be the way to go .. 'fs-check FSTYPE FSCHECK', with example 
being 'fs-check ext2 e2fsck' :P

		jeff

--
If everyone would put barbecue sauce on their food, there would be no war.