summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 40be827)
raw | patch | inline | side by side (parent: 40be827)
author | Shawn O. Pearce <spearce@spearce.org> | |
Sat, 23 Dec 2006 07:34:41 +0000 (02:34 -0500) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Fri, 29 Dec 2006 19:36:45 +0000 (11:36 -0800) |
If we are unable to mmap the a region of the packfile with the mmap()
system call there may be a good reason why, such as a closed file
descriptor or out of address space. Reporting the system level
error message can help to debug such problems.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
system call there may be a good reason why, such as a closed file
descriptor or out of address space. Reporting the system level
error message can help to debug such problems.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
sha1_file.c | patch | blob | history |
diff --git a/sha1_file.c b/sha1_file.c
index 548535c8448430457ae9dd4e1507166efbea8551..63123cc47be29430565f594340374271248f01bc 100644 (file)
--- a/sha1_file.c
+++ b/sha1_file.c
PROT_READ, MAP_PRIVATE,
p->pack_fd, win->offset);
if (win->base == MAP_FAILED)
- die("packfile %s cannot be mapped.", p->pack_name);
+ die("packfile %s cannot be mapped: %s",
+ p->pack_name,
+ strerror(errno));
win->next = p->windows;
p->windows = win;
}