#include <rpmio_internal.h>
#undef fdFileno
-#undef fdRead
-#define fdRead __fdRead
#undef fdWrite
#define fdWrite __fdWrite
#undef fdClose
return XfdLink(fd, msg, file, line);
}
-static ssize_t fdRead(void * cookie, char * buf, size_t count)
+static ssize_t __fdRead(void * cookie, char * buf, size_t count)
{
FD_t fd = c2f(cookie);
ssize_t rc;
if (fd->ndigests && rc > 0) fdUpdateDigests(fd, (void *)buf, rc);
-DBGIO(fd, (stderr, "==>\tfdRead(%p,%p,%ld) rc %ld %s\n", cookie, buf, (long)count, (long)rc, fdbg(fd)));
+DBGIO(fd, (stderr, "==>\t__fdRead(%p,%p,%ld) rc %ld %s\n", cookie, buf, (long)count, (long)rc, fdbg(fd)));
return rc;
}
}
static struct FDIO_s fdio_s = {
- fdRead, fdWrite, fdSeek, fdClose, XfdLink, XfdFree, XfdNew, fdFileno,
+ __fdRead, fdWrite, fdSeek, fdClose, XfdLink, XfdFree, XfdNew, fdFileno,
__fdOpen, NULL, fdGetFp, NULL, mkdir, chdir, rmdir, rename, unlink
};
FDIO_t fdio = &fdio_s ;
errno = 0;
#ifdef NOISY
- rc = fdRead(fd, buf + nb, 1);
+ rc = __fdRead(fd, buf + nb, 1);
#else
rc = read(fdFileno(fd), buf + nb, 1);
#endif
int fdno = fdFileno(fd);
(void) fstat(fdno, &sb);
if (S_ISREG(sb.st_mode))
- return fdRead(fd, buf, count);
+ return __fdRead(fd, buf, count);
}
UFDONLY(fd);
break;
}
- rc = fdRead(fd, buf + total, count - total);
+ rc = __fdRead(fd, buf + total, count - total);
if (rc < 0) {
switch (errno) {