~ubuntu-branches/debian/stretch/lvm2/stretch

« back to all changes in this revision

Viewing changes to lib/format_text/archive.c

  • Committer: Bazaar Package Importer
  • Author(s): Bastian Blank
  • Date: 2011-08-27 18:45:21 UTC
  • mfrom: (1.1.12 upstream)
  • Revision ID: james.westby@ubuntu.com-20110827184521-8lpc2gqp2ybhplzj
Tags: 2.02.86-1
* New upstream version.
* Remove leading article from short description.
* Update udev rules.

Show diffs side-by-side

added added

removed removed

Lines of Context:
300
300
{
301
301
        struct volume_group *vg = NULL;
302
302
        struct format_instance *tf;
 
303
        struct format_instance_ctx fic;
 
304
        struct text_context tc = {.path_live = af->path,
 
305
                                  .path_edit = NULL,
 
306
                                  .desc = NULL};
303
307
        time_t when;
304
308
        char *desc;
305
 
        void *context;
306
309
 
307
310
        log_print(" ");
308
311
        log_print("File:\t\t%s", af->path);
309
312
 
310
 
        if (!(context = create_text_context(cmd, af->path, NULL)) ||
311
 
            !(tf = cmd->fmt_backup->ops->create_instance(cmd->fmt_backup, NULL,
312
 
                                                         NULL, context))) {
 
313
        fic.type = FMT_INSTANCE_VG | FMT_INSTANCE_PRIVATE_MDAS;
 
314
        fic.context.private = &tc;
 
315
        if (!(tf = cmd->fmt_backup->ops->create_instance(cmd->fmt_backup, &fic))) {
313
316
                log_error("Couldn't create text instance object.");
314
317
                return;
315
318
        }
330
333
        log_print("Backup Time:\t%s", ctime(&when));
331
334
 
332
335
        free_vg(vg);
333
 
        tf->fmt->ops->destroy_instance(tf);
334
336
}
335
337
 
336
338
int archive_list(struct cmd_context *cmd, const char *dir, const char *vgname)