ABSTRACT:
FEsopen() returns -1 when ENABLE_IO_ON_COMPRESSED_DATA_BIT flag bit is used .
DETAILED DESCRIPTION
Customer wanted to do compressed file I/O with the following call
fh=FEsopen("SYS:MYFILE", O_RDWR, SH_COMPAT,0, ENABLE_IO_ON_COMPRESSED_DATA_BIT | LEAVE_FILE_COMPRESSED_DATA_BIT, PrimaryDataStream);
FEsopen() returned always -1, errno = 6 and NetWareErrno = 144. If the ENABLE_IO_ON_COMPRESSED_DATA_BIT flag was removed the call succeeded, but obviously getting uncompressed data.
Solution: to open for compressed I/O the file has to be opened in "exclusive mode" so use SH_DENYRW mode instead of SH_COMPAT. if you are simply reading from the file you probably want to have an access mode of O_RDONLY or O_WRONLY if writing it.
| rdcmpfe.exe | 19.0 K | 2005-04-06 |
© 2009 Novell, Inc. All Rights Reserved.