[GRASS5] Re: [GRASS-CVS] markus: grass/src/imagery/i.ortho.photo/photo.rectify write.c,1.2,1.3

Glynn Clements glynn.clements at virgin.net
Fri Aug 23 20:12:58 EDT 2002


Markus Neteler wrote:

> > > To help diagnosing this it might be helpful to give the filename
> > > in the error message where writing was attempted.
> > > I would replace the "(disk full?)" comment by
> > > ". You might want to check available disk space and write permissions."
> > 
> > submitted. thanks.
> 
> It may be even nice to see *which* partition is full.
> At least here it's difficult, we have a complicated mixture
> of NFS linked machines with lot's of partitions. Is there
> a portable method to print which partition is full?

If you have the pathname available, then you can scan the list of
mounted filesystems (using getmntent() etc), and select the closest
ancestor to the file in question. However, you would need the
canonical pathname (the one for which none of the components are
symlinks).

If you don't have the pathname, just the descriptor, then there isn't
any portable solution. There are some hacks available, but most of
them don't work for NFS mounts (for which there is no "device").

I'd suggest just including whatever information is readily available
(e.g. pathname or map name) in the error message.

-- 
Glynn Clements <glynn.clements at virgin.net>




More information about the grass-dev mailing list