How would it return anything other than an EIO error from read() , regardless of the file system disaster recovery utility?
The utility for saving low-level data should use the API for OS and FS, different from open / read / write / close to access the file. The semantics that it needs are fundamentally different from reading normal files, so this will require a specialized API.
source share