Ignore:
Timestamp:
Jul 26, 2007, 1:18:38 AM (17 years ago)
Author:
Bruno Cornec
Message:

Improvements on tape handling (based on patches from Michel Loiseleur <mloiseleur_at_linagora.com>)

File:
1 edited

Legend:

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

    r1549 r1569  
    274274    int res;
    275275
     276    strcpy(dev, VANILLA_SCSI_TAPE);
    276277    log_to_screen("I am looking for your tape streamer. Please wait.");
     278    log_it("I am looking for your tape streamer. Please wait.");
     279    log_it("Taking %s as default",VANILLA_SCSI_TAPE);
    277280    dev[0] = siz[0] = '\0';
    278281    if (find_home_of_exe("cdrecord")) {
     
    286289    mr_free(command);
    287290    if (atoi(tmp) != 1) {
    288         log_it
    289             ("Either too few or too many tape streamers for me to detect...");
     291        log_it("Either too few or too many tape streamers for me to detect...");
     292        log_it("Taking %s",VANILLA_SCSI_TAPE);
    290293        strcpy(dev, VANILLA_SCSI_TAPE);
    291294        return 1;
     
    297300    mr_free(command);
    298301    if (strlen(tmp) < 2) {
    299         log_it("Could not find tape device");
     302        log_it("Could not check tape device with %s",cdr_exe);
    300303        return 1;
    301304    }
     
    314317        if (!mt_says_tape_exists(dev)) {
    315318            log_it("Cannot openin %s", dev);
    316             strcpy(dev, "/dev/st0");
     319            strcpy(dev, "/dev/osst0");
    317320            if (!mt_says_tape_exists(dev)) {
    318                 log_it("Cannot openin %s", dev);
    319                 strcpy(dev, "/dev/osst0");
    320                 if (!mt_says_tape_exists(dev)) {
    321                     res++;
    322                 } else {
    323                     res = 0;
    324                 }
     321                res++;
     322            } else {
     323                res = 0;
    325324            }
    326325        }
Note: See TracChangeset for help on using the changeset viewer.