Annotation of driverkit/notes/logicalDiskIssues, revision 1.1

1.1     ! root        1: logical disk issues - setFormatted, writeLabel, eject
        !             2: 
        !             3: formatted flag
        !             4:        DiskObject subclass - must be maintained by subclass!
        !             5:        LogicalDisk - should be a don't care. Implement the method by
        !             6:            passing up thru logicalDisk chain.
        !             7:        UnixDisk - should be a don't care, labelValid is the only 
        !             8:                interesting flag.
        !             9:                
        !            10: setFormatted - 
        !            11:        -- invalidates label and destroys block devs
        !            12:        -- public version only valid for raw dev (true of ALL ioctls)
        !            13:        -- DiskObject public version
        !            14:           if [logicalDisk is open]
        !            15:                reject
        !            16:           set formatted 0/1
        !            17:           [self getPhysParams];
        !            18:           [logicalDisk setFormattedInt]
        !            19:           
        !            20:        -- UnixDisk setFormattedInt
        !            21:           if any block devs open
        !            22:                reject -- shouldn't happen
        !            23:           destroy block devs
        !            24:           set formatted 0/1
        !            25: 
        !            26: writeLabel 
        !            27:         -- UnixDisk raw device only...
        !            28:        -- 
        !            29:           {    
        !            30:                if [logicalDisk isOpen] (block devices...)
        !            31:                        reject
        !            32:                destroy block devs
        !            33:                write the label
        !            34:                probe label (updtae raw dec params, create block devs)
        !            35:           }
        !            36:           
        !            37: ejectDisk
        !            38:        -- DiskObject
        !            39:            {
        !            40:                -- if [logicalDev isOpen]
        !            41:                        reject
        !            42:                   else
        !            43:                        [self devEjectDisk];
        !            44:            }
        !            45:            
        !            46:        -- UnixDisk devEjectDisk
        !            47:            {
        !            48:                if any block devs open
        !            49:                        reject -- shouldn't happen
        !            50:                else {
        !            51:                        destroy blockd devs
        !            52:                        labelValid = 0
        !            53:                        [physDev devEjectDisk]
        !            54:                }
        !            55: 
        !            56:                
        !            57:           
        !            58:           

unix.superglobalmegacorp.com

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