diff options
Diffstat (limited to 'src/vtab.c')
-rw-r--r-- | src/vtab.c | 29 |
1 files changed, 12 insertions, 17 deletions
@@ -54,44 +54,39 @@ url_to_vtab (mu_url_t url, struct virt_tab *vtab) int -move_file (struct file_triplet *trp, const struct spool *spool, - enum file_type file_id, const char *reldir) +move_file (struct file_triplet *trp, enum file_type file_id) { - int rc = spool->vtab.move_file (trp, spool, file_id, reldir); - report_add ("Move %s to %s: %s", trp->file[file_id].name, reldir, + int rc = trp->spool->vtab.move_file (trp, file_id); + report_add ("Move %s to %s: %s", trp->file[file_id].name, trp->relative_dir, rc == 0 ? "OK" : "FAILED"); return rc; } int -archive_file (struct file_triplet *trp, const struct spool *spool, - const char *reldir, const char *file_name) +archive_file (struct file_triplet *trp, const char *file_name) { - int rc = spool->vtab.archive_file (trp, spool, reldir, file_name); - report_add ("Archive and remove %s/%s: %s", reldir, file_name, + int rc = trp->spool->vtab.archive_file (trp, file_name); + report_add ("Archive and remove %s/%s: %s", trp->relative_dir, file_name, rc == 0 ? "OK" : "FAILED"); return rc; } int -symlink_file (struct file_triplet *trp, const struct spool *spool, - const char *reldir, +symlink_file (struct file_triplet *trp, const char *wanted_src, const char *wanted_dst) { - int rc = spool->vtab.symlink_file (trp, spool, reldir, - wanted_src, wanted_dst); + int rc = trp->spool->vtab.symlink_file (trp, wanted_src, wanted_dst); report_add ("Symlink %s to %s in %s/: %s", wanted_src, wanted_dst, - reldir, + trp->relative_dir, rc == 0 ? "OK" : "FAILED"); return rc; } int -rmsymlink_file (struct file_triplet *trp, const struct spool *spool, - const char *reldir, const char *file_name) +rmsymlink_file (struct file_triplet *trp, const char *file_name) { - int rc = spool->vtab.rmsymlink_file (trp, spool, reldir, file_name); - report_add ("Remove symlink %s/%s: %s", reldir, file_name, + int rc = trp->spool->vtab.rmsymlink_file (trp, file_name); + report_add ("Remove symlink %s/%s: %s", trp->relative_dir, file_name, rc == 0 ? "OK" : "FAILED"); return rc; } |