Annotation of ntddk/src/scsi/qic117/endrest.c, revision 1.1

1.1     ! root        1: /*++
        !             2: 
        !             3: Copyright (c) 1993 - Colorado Memory Systems, Inc.
        !             4: All Rights Reserved
        !             5: 
        !             6: Module Name:
        !             7: 
        !             8:     endrest.c
        !             9: 
        !            10: Abstract:
        !            11: 
        !            12:     Ends the restore.  Flushes queues.
        !            13: 
        !            14: Revision History:
        !            15: 
        !            16: 
        !            17: 
        !            18: 
        !            19: --*/
        !            20: 
        !            21: //
        !            22: // include files
        !            23: //
        !            24: 
        !            25: #include <ntddk.h>
        !            26: #include <ntddtape.h>
        !            27: #include "common.h"
        !            28: #include "q117.h"
        !            29: #include "protos.h"
        !            30: 
        !            31: 
        !            32: STATUS
        !            33: q117EndRest(
        !            34:     IN PQ117_CONTEXT Context
        !            35:     )
        !            36: 
        !            37: /*++
        !            38: 
        !            39: Routine Description:
        !            40: 
        !            41:     This routine verifies the redundancy of the rest of the backup
        !            42:     (updates RdncCorr, RdncUnCorr, RdncBad, RdncUnRdbl), up to the
        !            43:     maxrdncblk of the current volume.
        !            44: 
        !            45: Arguments:
        !            46: 
        !            47:     Context -
        !            48: 
        !            49: Return Value:
        !            50: 
        !            51:     NoErr, any Driver error except BadBlk, RdncUnsc, <LinkRC>.
        !            52: 
        !            53: --*/
        !            54: 
        !            55: {
        !            56:     STATUS ret;                 // Return value from other routine called.
        !            57:     VOLUME_TABLE_ENTRY temp;
        !            58: 
        !            59:     ret=NoErr;
        !            60: 
        !            61:     //
        !            62:     // The only time this is true is if SelectTD() was called.
        !            63:     //
        !            64: 
        !            65:     if (Context->CurrentOperation.EndOfUsedTape==0)  {
        !            66: 
        !            67:         while (ret==NoErr) {
        !            68: 
        !            69:             ret=q117ReadVolumeEntry(&temp,Context);
        !            70: 
        !            71:         }
        !            72: 
        !            73:         if (ret && ret == EndOfVol) {
        !            74: 
        !            75:             ret = NoErr;
        !            76: 
        !            77:         }
        !            78:     }
        !            79: 
        !            80:     if (!ret) {
        !            81: 
        !            82:         //
        !            83:         // Define the globals BytesUsed, BytesAvail, BadSectors.
        !            84:         //
        !            85: 
        !            86:         q117SetTpSt(Context);
        !            87:         q117ClearQueue(Context);
        !            88: 
        !            89:     }
        !            90: 
        !            91:     return(ret);
        !            92: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.