OVERFLOW not such a great idea
Posted Sep 25, 2003 16:20 UTC (Thu) by
spitzak (subscriber, #4593)
Parent article:
dev_t expands at last
This sounds similar to readdir32's emulation, which would produce an error when reading certain disks, because the inode number did not fit when converting from the 64-bit structure. This was extremely annoying because my code was uninterested in the inode number and simply wanted the filename (which could be converted with no problem), the result to the end user was that the GUI file chooser would pop up errors instead of showing the files. I was forced to back-port the fix for this into old and supposedly stable versions of our programs and thus really disliked this "solution".
If the system call is returning information other than the device number, I would much prefer that the overflow be indicated by filling in the structure with a special illegal device number (0xffff?). Thus the error is deferred until somebody actually uses the number.
(
Log in to post comments)