summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2006-12-23 07:33:55 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-12-29 19:36:44 (GMT)
commit75025ccdb79b5d6b290c630f8777c9f7bb9d257c (patch)
treef69f3070024cef8c6c4c436517783f3b49959b70 /cache.h
parent2dc3a234094afc61c367be3e6018722cd9d92ea9 (diff)
downloadgit-75025ccdb79b5d6b290c630f8777c9f7bb9d257c.zip
git-75025ccdb79b5d6b290c630f8777c9f7bb9d257c.tar.gz
git-75025ccdb79b5d6b290c630f8777c9f7bb9d257c.tar.bz2
Create read_or_die utility routine.
Like write_or_die read_or_die reads the entire length requested or it kills the current process with a die call. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/cache.h b/cache.h
index cc87244..e6b7164 100644
--- a/cache.h
+++ b/cache.h
@@ -428,6 +428,7 @@ extern char *git_commit_encoding;
extern char *git_log_output_encoding;
extern int copy_fd(int ifd, int ofd);
+extern void read_or_die(int fd, void *buf, size_t count);
extern void write_or_die(int fd, const void *buf, size_t count);
extern int write_or_whine(int fd, const void *buf, size_t count, const char *msg);