(note: EINTR re-read differs from vfs_write_data)
****************************************************************************/
-static ssize_t vfs_read_data(files_struct *fsp,
+static ssize_t printing_read_data(files_struct *fsp,
char *buf,
size_t byte_count)
{
goto out;
}
- byte_count = vfs_read_data(fsp, buf, section_table_bytes);
+ byte_count = printing_read_data(fsp, buf, section_table_bytes);
if (byte_count < section_table_bytes) {
DBG_NOTICE("PE file [%s] Section header too short, "
"bytes read = %lu\n",
goto out;
}
- byte_count = vfs_read_data(fsp,
+ byte_count = printing_read_data(fsp,
buf,
section_bytes);
if (byte_count < section_bytes) {
* please have at it, but this works. 'NE' files will
* eventually fade away. JRR
*/
- byte_count = vfs_read_data(fsp, buf, VS_NE_BUF_SIZE);
+ byte_count = printing_read_data(fsp, buf, VS_NE_BUF_SIZE);
while (byte_count > 0) {
/*
* Cover case that should not occur in a well
* possibly match
*/
if (buf[i] != 'V') {
- byte_count = vfs_read_data(fsp,
+ byte_count = printing_read_data(fsp,
buf,
VS_NE_BUF_SIZE);
continue;
ssize_t amount_unused = byte_count-i;
memmove(buf, &buf[i], amount_unused);
- amount_read = vfs_read_data(fsp,
+ amount_read = printing_read_data(fsp,
&buf[amount_unused],
VS_NE_BUF_SIZE- amount_unused);
if (amount_read < 0) {
if (IVAL(buf,
i+sizeof(VS_SIGNATURE)+skip)
!= 0xfeef04bd) {
- byte_count = vfs_read_data(fsp,
+ byte_count = printing_read_data(fsp,
buf,
VS_NE_BUF_SIZE);
continue;
goto error_exit;
}
- byte_count = vfs_read_data(fsp, buf, DOS_HEADER_SIZE);
+ byte_count = printing_read_data(fsp, buf, DOS_HEADER_SIZE);
if (byte_count < DOS_HEADER_SIZE) {
DBG_NOTICE("File [%s] DOS header too short, bytes read = %lu\n",
fname,
*/
goto no_version_info;
}
+ pos = oret; /* Update new position. */
/* Note: DOS_HEADER_SIZE and NE_HEADER_SIZE are incidentally same */
- byte_count = vfs_read_data(fsp, buf, NE_HEADER_SIZE);
+ byte_count = printing_read_data(fsp, buf, NE_HEADER_SIZE);
if (byte_count < NE_HEADER_SIZE) {
DBG_NOTICE("File [%s] Windows header too short, "
"bytes read = %lu\n",