https://bugzilla.samba.org/show_bug.cgi?id=13317
--- Comment #18 from Rui DeSousa <rui.deso...@icloud.com> --- I also wrote a little util as well; I get the correct error in write spot. [postgres@hades ~]$ cat 000000010000005E00000017 | ./fwrite/fwrite arch/000000010000005E00000017 fwrite: write: Disc quota exceeded [postgres@hades ~]$ echo $? 1 [postgres@hades ~]$ du -h arch/000000010000005E00000017.GghJVR 1.9M arch/000000010000005E00000017.GghJVR Here's the code: #include <sys/stat.h> #include <err.h> #include <fcntl.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <string.h> #define BUFSIZE 131072 int main(int argc, char *argv[]) { int fd, r, w; char *buf; char *name; if (argc != 2) { fprintf(stderr, "usage: fwrite [file]\n"); exit(1); } if ((buf = malloc(BUFSIZE)) == NULL) err(1, "malloc"); ++argv; if ((name = (char *) malloc(strlen(*argv) + 10)) == NULL) err(1, "malloc"); strcat(strcpy(name, *argv), ".XXXXXX"); if ((fd = mkstemp(name)) < 0) err(1, "mkstemp"); while ((r = read(STDIN_FILENO, buf, BUFSIZE)) > 0) if ((w = write(fd, buf, r)) == -1) err(1, "write"); if (r < 0) err(1, "read"); if (fsync(fd) != 0) err(1, "fsync"); if (close(fd) != 0) err(1, "close"); if (rename(name, *argv) != 0) err(1, "rename"); free(name); exit(0); } -- You are receiving this mail because: You are the QA Contact for the bug. -- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html