X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=server-src%2Ftaper-disk-port-source.c;h=c3ae3859b626be08286b3f6ad96353e3d97d28da;hb=2627875b7d18858bc1f9f7652811e4d8c15a23eb;hp=58f13d324774a66dc29133df7801bbc00243f560;hpb=94a044f90357edefa6f4ae9f0b1d5885b0e34aee;p=debian%2Famanda diff --git a/server-src/taper-disk-port-source.c b/server-src/taper-disk-port-source.c index 58f13d3..c3ae385 100644 --- a/server-src/taper-disk-port-source.c +++ b/server-src/taper-disk-port-source.c @@ -1,6 +1,6 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver - * Copyright (c) 2006 Zmanda Inc. + * Copyright (c) 2005-2008 Zmanda Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -186,6 +186,7 @@ static gboolean open_buffer_file(TaperDiskPortSource * self) { int fd; char * filename; mode_t old_umask; + TaperSource * pself = (TaperSource *)self; g_return_val_if_fail(self != NULL, FALSE); g_return_val_if_fail(self->buffer_dir_name != NULL, FALSE); @@ -197,7 +198,8 @@ static gboolean open_buffer_file(TaperDiskPortSource * self) { fd = g_mkstemp(filename); umask(old_umask); if (fd < 0) { - g_fprintf(stderr, "Couldn't open temporary file with template %s: %s\n", + pself->errmsg = newvstrallocf(pself->errmsg, + "Couldn't open temporary file with template %s: %s", filename, strerror(errno)); return FALSE; } @@ -387,9 +389,11 @@ taper_disk_port_source_read (TaperSource * pself, void * buf, size_t count) { as having a disk problem. Returns FALSE in that case. */ static gboolean try_rewind(TaperDiskPortSource * self) { gint64 result; + TaperSource * pself = (TaperSource *)self; result = lseek(selfp->buffer_fd, 0, SEEK_SET); if (result != 0) { - g_fprintf(stderr, "Couldn't seek split buffer: %s\n", strerror(errno)); + pself->errmsg = newvstrallocf(pself->errmsg, + "Couldn't seek split buffer: %s", strerror(errno)); selfp->disk_problem = TRUE; return FALSE; } else {