Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 Mar 2000 11:51:53 -0700
From:      Warner Losh <imp@village.org>
To:        KATO Takenori <kato@ganko.eps.nagoya-u.ac.jp>
Cc:        asmodai@bart.nl, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sbin/pc98 Makefile Makefile.inc src/sbin/pc98/fdisk Makefile fdisk.8 fdisk.c 
Message-ID:  <200003181851.LAA97132@harmony.village.org>
In-Reply-To: Your message of "Sun, 19 Mar 2000 02:15:22 %2B0900." <20000319021522P.kato@gneiss.eps.nagoya-u.ac.jp> 
References:  <20000319021522P.kato@gneiss.eps.nagoya-u.ac.jp>  <20000318175710.C36838@lucifer.bart.nl> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <20000319021522P.kato@gneiss.eps.nagoya-u.ac.jp> KATO Takenori writes:
: I prefer sharing to folking.  But sharing the code could cause
: maintenance problem.    Partition tables of PC-AT and PC98 are quite
: different from each other.  If fdisk.c is shared, you may need to take
: care of the difference between PC98 and PC-AT when you change fdisk.c.
: But you are free of care if PC98 has its own fdisk.c.

I think kato-san may be right here.  Looks like there are many small
differences between a pc98 partition table and a pc-at partition
table.  It is in a different format, there are 8 partitions rather
than 4, the ID codes for each partition are different, the cyl/sect
stuff is encoded differently, the basic units of measure are different
(cyl vs sector) etc.  If this were a c++ program, then it might make
sense to have a partition base class, and two different derived
classes.  But C and the structure of the current fdisk program
conspire to make that *MUCH* harder than it needs to be.

Eg, one could do it, but it would mean almost a complete rewrite of
the fdisk code from scratch.  Not a bad idea, but that wasn't what was
done.

I have a question about the interface of the new fdisk.

I recently wrote a diskprep program that uses fdisk.  If the pc98
fdisk's output is the same or substantially similar to i386's fdisk
for the -s case, and if fdisk98 uses -I to initialize things, then it
should just work.  A quick eyeball of the code says yes.

fdisk is a mess, a real mess.  It is hard to hack, hard to use and
generally one of the more user and hacker hostile programs in the
tree.

Hmmm, now where did I put that port of OpenBSD's fdisk...

Warner


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200003181851.LAA97132>