Ignore:
Timestamp:
Sep 20, 2007, 10:20:45 PM (13 years ago)
Author:
Bruno Cornec
Message:

More conf file items handled

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/mondo/src/mondorestore/mondo-rstr-tools.c

    r1638 r1639  
    20482048 * @return 0 for success, nonzero for failure.
    20492049 */
    2050 int extract_cfg_file_and_mountlist_from_tape_dev(char *dev)
     2050int extract_cfg_file_and_mountlist_from_tape_dev(struct s_bkpinfo  *bkpinfo)
    20512051{
    20522052    char *command = NULL;
    20532053    int res = 0;
    20542054    // BERLIOS: below 32KB seems to block at least on RHAS 2.1 and MDK 10.0
    2055     long tape_block_size = 32768;
    20562055
    20572056    // tar -zxvf-
    20582057    mr_asprintf(&command,
    20592058            "dd if=%s bs=%ld count=%ld 2> /dev/null | tar -zx %s %s %s %s %s",
    2060             dev,
    2061             tape_block_size,
    2062             1024L * 1024 * 32 / tape_block_size,
     2059            bkpinfo->media_device,
     2060            bkpinfo->internal_tape_block_size,
     2061            1024L * 1024 * 32 / bkpinfo->internal_tape_block_size,
    20632062            MOUNTLIST_FNAME_STUB, MONDO_CFG_FILE_STUB,
    20642063            BIGGIELIST_TXT_STUB, FILELIST_FULL_STUB, "tmp/i-want-my-lvm");
     
    21482147                        bkpinfo->media_device);
    21492148            }
     2149            /* extract_cfg_file_and_mountlist_from_tape_dev needs
     2150             * the internal block size to be setup */
     2151            if (bkpinfo->internal_tape_blocksize == 0) {
     2152                /* Guessing a value */
     2153                bkpinfo->internal_tape_blocksize = 32768;
     2154            }
    21502155            mr_asprintf(&tmp, bkpinfo->media_device);
    21512156            if (extract_cfg_file_and_mountlist_from_tape_dev
    2152                 (bkpinfo->media_device)) {
     2157                (bkpinfo)) {
    21532158                mr_allocstr(bkpinfo->media_device, "/dev/st0");
    21542159                if (extract_cfg_file_and_mountlist_from_tape_dev
    2155                     (bkpinfo->media_device)) {
     2160                    (bkpinfo)) {
    21562161                    mr_allocstr(bkpinfo->media_device, "/dev/osst0");
    21572162                    if (extract_cfg_file_and_mountlist_from_tape_dev
    2158                         (bkpinfo->media_device)) {
     2163                        (bkpinfo)) {
    21592164                        mr_allocstr(bkpinfo->media_device, "/dev/ht0");
    21602165                        if (extract_cfg_file_and_mountlist_from_tape_dev
    2161                             (bkpinfo->media_device)) {
     2166                            (bkpinfo)) {
    21622167                            mr_msg(3,
    21632168                                    "I tried lots of devices but none worked.");
Note: See TracChangeset for help on using the changeset viewer.