Ignore:
Timestamp:
Jun 2, 2008, 10:49:01 AM (12 years ago)
Author:
Bruno Cornec
Message:

svn merge -r 1938:1976 $SVN_M/branches/2.2.6

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/mondo/src/common/libmondo-archive.c

    r1939 r1977  
    6060/*@unused@*/
    6161//static char cvsid[] = "$Id$";
     62//
     63extern char *get_non_rewind_dev(char *);
    6264
    6365/* *************************** external global vars ******************/
     
    7072extern long long g_tape_posK;
    7173extern char *g_tmpfs_mountpt;
    72 extern bool g_cd_recovery;
    7374extern char *g_serial_string;
    74 
    7575extern char *g_getfacl;
    7676extern char *g_getfattr;
     
    7979/* Reference to global bkpinfo */
    8080extern struct s_bkpinfo *bkpinfo;
    81 
    8281
    8382
     
    111110static int g_sem_id;
    112111static int g_sem_key;
    113 
    114 
    115 
    116112
    117113/**
     
    540536    char *use_lilo_sz = NULL;
    541537    char *bootdev = NULL;
     538    char *ntapedev = NULL;
    542539
    543540    /*@ char ************************************************************** */
     
    586583    if (IS_THIS_A_STREAMING_BACKUP(bkpinfo->backup_media_type)) {
    587584        mr_asprintf(&tape_size_sz, "%ld", bkpinfo->media_size);
     585        ntapedev = get_non_rewind_dev(bkpinfo->media_device);
     586        if ((bkpinfo->use_obdr) && (ntapedev != NULL)) {
     587            mr_free(bkpinfo->media_device);
     588            bkpinfo->media_device = ntapedev;
     589        } else {
     590            if (ntapedev == NULL) {
     591                log_it("Not able to create OBDR - Restore will have to be done manually");
     592            }
     593        }
    588594        mr_asprintf(&tape_device, bkpinfo->media_device);
    589595    } else {
     
    858864        mr_fprintf(fd1, "acl=no\n");
    859865    }
     866    if (bkpinfo->use_obdr) {
     867        asprintf(&tmp1, "%s/OBDR", bkpinfo->tmpdir);
     868        if (write_one_liner_data_file(tmp1, "TRUE")) {
     869            log_msg(1, "%ld: Unable to write one-liner OBDR",
     870                __LINE__);
     871        }
     872        paranoid_free(tmp1);
     873    }
    860874
    861875    if (g_cd_recovery) {
     
    12551269            openout_cdstream(bkpinfo->media_device, bkpinfo->writer_speed);
    12561270        } else {
    1257             openout_tape(bkpinfo->media_device, bkpinfo->internal_tape_block_size); /* sets g_tape_stream */
     1271            openout_tape(); /* sets g_tape_stream */
    12581272        }
    12591273        if (!g_tape_stream) {
     
    21442158        /* copy to CD (scratchdir) ... and an actual CD-R if necessary */
    21452159        if (IS_THIS_A_STREAMING_BACKUP(bkpinfo->backup_media_type)) {
    2146             register_in_tape_catalog(fileset, curr_set_no, -1,
    2147                                      curr_afioball_fname);
    2148             maintain_collection_of_recent_archives(bkpinfo->tmpdir,
    2149                                                    curr_afioball_fname);
     2160            register_in_tape_catalog(fileset, curr_set_no, -1, curr_afioball_fname);
     2161            maintain_collection_of_recent_archives(bkpinfo->tmpdir, curr_afioball_fname);
    21502162            iamhere("Writing EXAT files");
    21512163            res +=
Note: See TracChangeset for help on using the changeset viewer.