60 lines
2.1 KiB
Plaintext
60 lines
2.1 KiB
Plaintext
24 Oct 88
|
|
|
|
The basic libdisk.a is done. The code and the library, and the header file
|
|
diskinfo.h are on anchor in anchor:/d4/usr/src/lib/libdisk.
|
|
|
|
The putsuperblk() routine is completely untested at this point.
|
|
|
|
Most of the function prototypes are at the end of diskinfo.h, with the
|
|
exception that routines whose declarations would require including a
|
|
number of other header files are commented out.
|
|
|
|
I've done a fair amount of testing for bogus values. One thing I did was
|
|
set errno for various types of errors. getdiskname() returns a structure
|
|
giving you the 'full' name in the rdsk directory, and the block and char
|
|
nicknames in the top directory, if they exist. If the nicknames don't
|
|
exist, the first char is null. If a stat() on the fullname fails, the
|
|
nodeok field is set to 0.
|
|
|
|
If the partition used is PT_BASE, you will get the base name, i.e,
|
|
dks0d1 or ips0d0. PT_BASE is otherwise an illegal
|
|
partition to use.
|
|
|
|
You have to pass in the directory to search (will probably always be
|
|
/dev for you). I decided to do this in case we ever want to run
|
|
it in a miniroot situation.
|
|
|
|
The {set,get,end}diskinfo() routines are all done now.
|
|
The {set,get,end}diskheader() routines are all done now, and are
|
|
used by the diskinfo routines.
|
|
|
|
The readsuperblk, has_fs, and validfs routines are also done and
|
|
debugged.
|
|
|
|
Let me know of any problems or suggestions you have.
|
|
|
|
The TEST directory contains assorted test programs, which can also
|
|
be used as examples.
|
|
|
|
For your purposes, you will probably want to use PT_BASE initially
|
|
when checking for the drive existence, etc.; then PT_FSROOT, etc
|
|
when we get to the filesystem or swap stuff.
|
|
|
|
Dave
|
|
|
|
The mtab stuff is in, and with it the readonly dectection.
|
|
|
|
I made the decision to favor mtab over fstab when looking at the
|
|
mount points, since mtab is (in theory) more reliable. Do
|
|
you think we should indicate somehow if there is a conflict,
|
|
or that it was found in mtab but not fstab?
|
|
|
|
Right now there are three ways I look for the mount point:
|
|
1) mtab
|
|
2) fstab
|
|
3) the fsname field in the superblock, if it isn't "noname"
|
|
|
|
Perhaps there ought to be three mountpt's in the structure,
|
|
or a field indicating which one was used?
|
|
|