summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/alpm.h
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2010-06-27 13:13:01 +0200
committerDan McGee <dan@archlinux.org>2010-07-01 06:49:48 +0200
commit41724cbcdef11cb00fcd720c75d399288ea41fd0 (patch)
treec55ca577292793d9774d661f5fb8339b69f14c49 /lib/libalpm/alpm.h
parent96a1255eadd8b1faaffbfc2e9bdb1aa5e46ee04c (diff)
downloadpacman-41724cbcdef11cb00fcd720c75d399288ea41fd0.tar.gz
pacman-41724cbcdef11cb00fcd720c75d399288ea41fd0.tar.xz
Check return value of fwrite when copying files
Check that writing to destination file actually occurs in _alpm_copyfile. Required adding a new error (PM_ERR_WRITE) as none of the others appeared appropriate. Prevents compiler warning when using -D_FORTIFY_SOURCE=2. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/alpm.h')
-rw-r--r--lib/libalpm/alpm.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h
index 33291325..0c01f214 100644
--- a/lib/libalpm/alpm.h
+++ b/lib/libalpm/alpm.h
@@ -522,6 +522,7 @@ enum _pmerrno_t {
PM_ERR_FILE_CONFLICTS,
/* Misc */
PM_ERR_RETRIEVE,
+ PM_ERR_WRITE,
PM_ERR_INVALID_REGEX,
/* External library errors */
PM_ERR_LIBARCHIVE,