X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=device-src%2Fvfs-device.c;h=a69b584f69943c85a7489f99caa5c3a42ad70e66;hb=fb2bd066c2f8b34addafe48d62550e3033a59431;hp=b197dcc1d91f7919a93297d17b2c737b4154b714;hpb=a6127998ee6dcab6bb034f6ca985b07804a86f9a;p=debian%2Famanda diff --git a/device-src/vfs-device.c b/device-src/vfs-device.c index b197dcc..a69b584 100644 --- a/device-src/vfs-device.c +++ b/device-src/vfs-device.c @@ -20,9 +20,9 @@ #include /* memset() */ +#include "amanda.h" #include "vfs-device.h" #include "fsusage.h" -#include "amanda.h" #include "util.h" #include @@ -726,7 +726,8 @@ vfs_device_read_block(Device * pself, gpointer data, int * size_req) { return size; case RESULT_NO_DATA: pself->is_eof = TRUE; - /* FALLTHROUGH */ + pself->in_file = FALSE; + return -1; default: return -1; } @@ -871,6 +872,9 @@ char * make_new_file_name(VfsDevice * self, const dumpfile_t * ji) { } } + /* record that we're at this filenum now */ + DEVICE(self)->file = fileno; + base = g_strdup_printf("%05d.%s.%s.%d", fileno, ji->name, ji->disk, ji->dumplevel); sanitary_base = sanitise_filename(base); @@ -922,6 +926,8 @@ vfs_device_start_file (Device * pself, const dumpfile_t * ji) { } self->volume_bytes += VFS_DEVICE_LABEL_SIZE; + /* make_new_file_name set pself->file for us, but the parent class will increment it, so decrement it now */ + pself->file--; if (parent_class->start_file) { parent_class->start_file(pself, ji); @@ -1112,8 +1118,8 @@ vfs_device_property_set (Device * pself, DevicePropertyId ID, GValue * val) { self->volume_limit = g_value_get_uint64(val); return TRUE; } else { - if (parent_class->property_get) { - return parent_class->property_get(pself, ID, val); + if (parent_class->property_set) { + return parent_class->property_set(pself, ID, val); } else { return FALSE; }