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

Re: dinstall doesn't use existing swap partition

I have this suggestion to avoid these problems of resources not being
there when called for. Before each part of the code, add a line calling
a routing 'require' so that you are consciously including all the
required resources. (Consider for future releases of dinstall ...)

if require mem=2M mounted=/mnt(rw);/dev/fd0:msdos  tmpspace=1M  
  .... routines that require these resources.
or something like that which will check if required resources are
available or not, and ask the user to either provide these or display a
message that routine cannot be run due to limited resources.

In above example, the routines checks if there is min of 2 MB main
memory, /mnt  is mounted partition and is read-write, also, /dev/fd0
should contain msdos file system, and at least 1 MB temporary space
is available  in /tmp.  Only then, it proceeds aheads, or else either
asks user to provide them (say asking user to insert a msdos disk) or  
else specifies error code which can be gracefully handled.

At least in C, it should be quite fast. It should greatly help  
avoiding sudden error messages for conditions which are difficult to
guess when writing the code .

Vinod G Kulkarni                                Research scholar, Indian
vinod@cse.iitb.ernet.in		                Institute of Technology,
My favourite sign: [                         ]	Bombay, INDIA.

Reply to: