#include <rpmio_internal.h>
#undef fdFileno
-#undef fdWrite
-#define fdWrite __fdWrite
#undef fdClose
#define fdClose __fdClose
return rc;
}
-static ssize_t fdWrite(void * cookie, const char * buf, size_t count)
+static ssize_t __fdWrite(void * cookie, const char * buf, size_t count)
{
FD_t fd = c2f(cookie);
int fdno = fdFileno(fd);
rc = write(fdno, buf, (count > fd->bytesRemain ? fd->bytesRemain : count));
fdstat_exit(fd, FDSTAT_WRITE, rc);
-DBGIO(fd, (stderr, "==>\tfdWrite(%p,%p,%ld) rc %ld %s\n", cookie, buf, (long)count, (long)rc, fdbg(fd)));
+DBGIO(fd, (stderr, "==>\t__fdWrite(%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 ;
struct stat sb;
(void) fstat(fdGetFdno(fd), &sb);
if (S_ISREG(sb.st_mode))
- return fdWrite(fd, buf, count);
+ return __fdWrite(fd, buf, count);
}
#endif
break;
}
- rc = fdWrite(fd, buf + total, count - total);
+ rc = __fdWrite(fd, buf + total, count - total);
if (rc < 0) {
switch (errno) {