home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Crawly Crypt Collection 2
/
crawlyvol2.bin
/
alt_os
/
mint
/
mfs6011
/
source
/
docs
/
csize.doc
< prev
next >
Wrap
Text File
|
1995-01-20
|
1KB
|
26 lines
Csize is a very simple binary configurer for Minixfs. I wrote it mainly to
show the principle involved in binary configuration. You can use it to set
the cache sizes or display them. To display the sizes do a
csize minixfs_path_name
where minixfs_path_name is the path to your minix.xfs binary. To set the
sizes follow the path name with three numbers corresponding to the user
system and inode cache sizes (in K). The sizes will then be changed in
the minixfs binary and will be set on the next reboot.
For the curious among you the priciples of binary configuration are quite
simple.
1. The configured variable is made global and initialised to a non zero value.
2. The program is compiled with the -G option to get long symbol names and
is unstripped (or at lease the symbol of the variable is left in with
xstrip).
The configuring program is also relatively simple.
1. Search for symbol name using nlist() (this is the variable name with an
underscore at the start).
2. seek to the symbol value plus the binary header size.
3. Read or write the value as required.