static void io_error(const char *func, int rc)
{
if (rc == -ENOSYS)
- fprintf(stderr, "AIO not in this kernel\n");
+ fprintf(stderr, "AIO not in this kernel\\n");
else if (rc < 0 && -rc < sys_nerr)
- fprintf(stderr, "%s: %s\n", func, sys_errlist[-rc]);
+ fprintf(stderr, "%s: %s\\n", func, sys_errlist[-rc]);
else
- fprintf(stderr, "%s: error %d\n", func, rc);
+ fprintf(stderr, "%s: error %d\\n", func, rc);
if (dstfd > 0)
close(dstfd);
io_error("aio write", res2);
}
if (res != iocb->u.c.nbytes) {
- fprintf(stderr, "write missed bytes expect %d got %d\n", iocb->u.c.nbytes, res2);
+ fprintf(stderr, "write missed bytes expect %d got %d\\n", iocb->u.c.nbytes, res2);
exit(1);
}
--tocopy;
if (res2 != 0)
io_error("aio read", res2);
if (res != iosize) {
- fprintf(stderr, "read missing bytes expect %d got %d\n", iocb->u.c.nbytes, res);
+ fprintf(stderr, "read missing bytes expect %d got %d\\n", iocb->u.c.nbytes, res);
exit(1);
}
char *buf = (char *) malloc(iosize);
if (NULL == buf || NULL == io) {
- fprintf(stderr, "out of memory\n");
+ fprintf(stderr, "out of memory\\n");
exit(1);
}