X-Git-Url: https://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=tools%2Fgrab_file.c;h=5a2ff69b50ac1ab9a3304783ff03dc56e300cdc8;hp=8bd18f22553949a14d1fddfabd177018e412d172;hb=16b7eb13fbcb1a04a71622e6310020baccc3c39c;hpb=4239dd56d06be573c5cbf8fdf1ab0995cbd4bc66 diff --git a/tools/grab_file.c b/tools/grab_file.c index 8bd18f22..5a2ff69b 100644 --- a/tools/grab_file.c +++ b/tools/grab_file.c @@ -7,16 +7,16 @@ #include #include -static int close_no_errno(int fd) +/*static int close_no_errno(int fd) { int ret = 0, serrno = errno; if (close(fd) < 0) ret = errno; errno = serrno; return ret; -} +}*/ -void *grab_fd(const void *ctx, int fd) +/*void *grab_fd(const void *ctx, int fd) { int ret; unsigned int max = 16384, size = 0; @@ -35,10 +35,10 @@ void *grab_fd(const void *ctx, int fd) buffer[size] = '\0'; return buffer; -} +}*/ /* This version adds one byte (for nul term) */ -void *grab_file(const void *ctx, const char *filename) +/*void *grab_file(const void *ctx, const char *filename) { int fd; char *buffer; @@ -54,5 +54,5 @@ void *grab_file(const void *ctx, const char *filename) buffer = grab_fd(ctx, fd); close_no_errno(fd); return buffer; -} +}*/