aboutsummaryrefslogtreecommitdiffstats
path: root/fileio.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1998-11-03 07:08:27 +0000
committerAndrew Tridgell <tridge@samba.org>1998-11-03 07:08:27 +0000
commit654175798bdbdd6403e10c8fa74e8586b3612ea1 (patch)
tree00bd91cedb70268106d5bbe351c43865c4bc3eb9 /fileio.c
parent3e578a1909bbb29a637291d36017f328e017a3bf (diff)
downloadandroid_external_rsync-654175798bdbdd6403e10c8fa74e8586b3612ea1.tar.gz
android_external_rsync-654175798bdbdd6403e10c8fa74e8586b3612ea1.tar.bz2
android_external_rsync-654175798bdbdd6403e10c8fa74e8586b3612ea1.zip
patch from Alberto Accomazzi <aaccomazzi@cfa.harvard.edu> to add
different exit codes for different conditions.
Diffstat (limited to 'fileio.c')
-rw-r--r--fileio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fileio.c b/fileio.c
index 1ae5eac3..13bf4079 100644
--- a/fileio.c
+++ b/fileio.c
@@ -136,7 +136,7 @@ char *map_ptr(struct map_struct *map,OFF_T offset,int len)
}
if (munmap(map->map, map->p_len) != 0) {
rprintf(FERROR,"munmap failed : %s\n", strerror(errno));
- exit_cleanup(1);
+ exit_cleanup(RERR_MALLOC);
}
/* align the mmap region on a nice boundary back a bit from
@@ -186,7 +186,7 @@ char *map_ptr(struct map_struct *map,OFF_T offset,int len)
if (do_lseek(map->fd,offset,SEEK_SET) != offset) {
rprintf(FERROR,"lseek failed in map_ptr\n");
- exit_cleanup(1);
+ exit_cleanup(RERR_FILEIO);
}
if ((nread=read(map->fd,map->p,len)) != len) {