summaryrefslogtreecommitdiffstats
path: root/src/fat_dir.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2011-04-21 19:40:06 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2011-04-21 19:40:06 +0200
commitb555b3a4f62847a5e27173fc48548d5574fe37d1 (patch)
treee2879d857105c1241acc0899811bf7c6822394ec /src/fat_dir.c
parent23484938138c2ea5aef3fb773f185862f0256ce8 (diff)
When write failed during the copy of a file, log the strerror message
Diffstat (limited to 'src/fat_dir.c')
-rw-r--r--src/fat_dir.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/fat_dir.c b/src/fat_dir.c
index 6d8b8c1..1691f7c 100644
--- a/src/fat_dir.c
+++ b/src/fat_dir.c
@@ -37,6 +37,7 @@
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
+#include <errno.h>
#include "types.h"
#include "common.h"
#include "fat.h"
@@ -585,7 +586,7 @@ static int fat_copy(disk_t *disk_car, const partition_t *partition, dir_data_t *
}
if(fwrite(buffer_file, 1, toread, f_out) != toread)
{
- log_error("fat_copy: no space left on destination.\n");
+ log_error("fat_copy: failed to write data %s\n", strerror(errno));
fclose(f_out);
set_date(new_file, file->stat.st_atime, file->stat.st_mtime);
free(new_file);