Mirror of :pserver:cvs@cvs.fefe.de:/cvs libowfat https://www.fefe.de/libowfat/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

16 lines
280 B

  1. #include <errno.h>
  2. #include "buffer.h"
  3. int buffer_stubborn(int (*op)(),int fd,const char* buf, unsigned long int len) {
  4. int w;
  5. while (len) {
  6. if ((w=op(fd,buf,len))<0) {
  7. if (errno == EINTR) continue;
  8. return -1;
  9. };
  10. buf+=w;
  11. len-=w;
  12. }
  13. return 0;
  14. }