Ignore:
Timestamp:
Jul 26, 2007, 12:34:42 PM (17 years ago)
Author:
Bruno Cornec
Message:

More improvements on tape patch (/dev/st0 has to be the default)

File:
1 edited

Legend:

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

    r1569 r1574  
    290290    if (atoi(tmp) != 1) {
    291291        log_it("Either too few or too many tape streamers for me to detect...");
    292         log_it("Taking %s",VANILLA_SCSI_TAPE);
    293         strcpy(dev, VANILLA_SCSI_TAPE);
    294292        return 1;
    295293    }
     
    311309    strcpy(dev, VANILLA_SCSI_TAPE);
    312310    dev[strlen(dev) - 1] = '\0';
     311    dev[strlen(dev) - 2] = '\0';
    313312    strcat(dev, tmp);           // e.g. '/dev/st0' becomes '/dev/stN'
    314313    res = 0;
     
    319318            strcpy(dev, "/dev/osst0");
    320319            if (!mt_says_tape_exists(dev)) {
     320                // Stay with VANILLA_SCSI_TAPE
     321                strcpy(dev, VANILLA_SCSI_TAPE);
    321322                res++;
    322323            } else {
     
    332333grep \"[0-9]*,[0-9]*,[0-9]*\" | grep -v \"[0-9]*) \\*\" | grep -i TAPE | \
    333334awk '{for(i=1; i<NF; i++) { if (index($i, \"GB\")>0) { print $i;};};};'"));
    334 
    335     if (mt_says_tape_exists(dev)) {
    336         res = 0;
    337     } else {
    338         log_it("Turning %s", dev);
    339         strcpy(tmp, (strrchr(dev, '/') != NULL) ? strrchr(dev, '/') : dev);
    340         sprintf(dev, "/dev/os%s", tmp);
    341         log_it("...into %s", dev);
    342         if (mt_says_tape_exists(dev)) {
    343             res = 0;
    344         } else {
    345             res++;
    346         }
    347     }
    348335
    349336    siz[0] = '\0';
Note: See TracChangeset for help on using the changeset viewer.