OVERFLOW not such a great idea
OVERFLOW not such a great idea
Posted Sep 25, 2003 16:20 UTC (Thu) by spitzak (guest, #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.
The LWN site is currently under high scraper load, so comment display has been suppressed for anonymous users. If you are a human, you may read the comments by clicking the button below:
Note: you can avoid this step in the future by logging into your LWN account.
