Re: overspecifying raw dev size
Posted in 1995
Any Unix which allows you to seek to a non-existent offset without reporting an error is broken. Period. It has been a safe test since the days of Version 7 Unix (that precedes System III and System V), and I believe it would be safe on all versions which contain the lseek() system call -- really early versions of Unix had a seek() system call instead, which took an int argument for the offset, hence the name lseek() for the version which takes a long as the offset. Yours, Jonathan Leffler (johnl@informix.com) #include <disclaimer.h> }From: dickensl@hk.super.net (Mr Dickens Leung) }Date: 23 May 1995 16:49:20 GMT }X-Informix-List-Id: <news.14145> } }Mr Graeme Burnett <rgb@xinit.demon.co.uk> wrote: } }> What informix does is an lseek on the device - that is why it comes }> back so quickly - if the device does not support it - then the lseek }> fails - so there is no problem there. } }That's what I guessed. Does anyone know if that's a reliable method? } }> As to how do you estimate the exact space - well write a simple c }> program to lseek on the raw device - that's what Informix does. } }Well, if Informix does just that, I don't think I can do better. ;( } }Also, my thanks to jbentsen@delphi.com (his/her real name wasn't shown }in the posting) who said basically the same thing.