summaryrefslogtreecommitdiff
path: root/src/errors.h
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2008-12-30 23:26:38 -0800
committerShawn O. Pearce <spearce@spearce.org>2008-12-30 23:29:23 -0800
commit7dd8a9f71052cc12f8dd9c1eec2e99afbf08df76 (patch)
treecf5f7235b9c9689b133f6ea12015720b411329bd /src/errors.h
parent64a47c01426a36cdb7e598d17018d5791e54bb97 (diff)
downloadlibgit2-7dd8a9f71052cc12f8dd9c1eec2e99afbf08df76.tar.gz
Set GIT_EOSERR when the OS errno should be consulted
This error code indicates the OS error code has a better value describing the last error, as it is likely a network or local file IO problem identified by a C library function call. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'src/errors.h')
-rw-r--r--src/errors.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/errors.h b/src/errors.h
index caebc63b3..ab415d59c 100644
--- a/src/errors.h
+++ b/src/errors.h
@@ -11,6 +11,11 @@ GIT_INLINE(int) git_int_error(int code)
return code;
}
+GIT_INLINE(int) git_os_error(void)
+{
+ return git_int_error(GIT_EOSERR);
+}
+
GIT_INLINE(void) *git_ptr_error(int code)
{
git_errno = code;