Sha256: b926fdfa11e53dc54b6b826b42bb1f14424200bdbd3afe6cc138c19853cc7f76

Contents?: true

Size: 936 Bytes

Versions: 17

Compression:

Stored size: 936 Bytes

Contents

require 'disk/modules/MSCommon'

module MSVSDynamicDisk
  def d_init
    self.diskType = "MSVS Dynamic"
    self.blockSize = MSCommon::SECTOR_LENGTH
    if dInfo.mountMode.nil? || dInfo.mountMode == "r"
      dInfo.mountMode = "r"
      fileMode = "r"
    elsif dInfo.mountMode == "rw"
      fileMode = "r+"
    else
      raise "Unrecognized mountMode: #{dInfo.mountMode}"
    end
    @ms_disk_file = if dInfo.hyperv_connection
                      MSCommon.connect_to_hyperv(dInfo)
                    else
                      MiqLargeFile.open(dInfo.fileName, fileMode)
                    end
    MSCommon.d_init_common(dInfo, @ms_disk_file)
  end

  def getBase
    self
  end

  def d_read(pos, len)
    MSCommon.d_read_common(pos, len)
  end

  def d_write(pos, buf, len)
    MSCommon.d_write_common(pos, buf, len)
  end

  def d_close
    @ms_disk_file.close
  end

  def d_size
    MSCommon.d_size_common
  end
end # module

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
manageiq-smartstate-0.2.9 lib/disk/modules/MSVSDynamicDisk.rb
manageiq-smartstate-0.2.8 lib/disk/modules/MSVSDynamicDisk.rb
manageiq-smartstate-0.2.7 lib/disk/modules/MSVSDynamicDisk.rb
manageiq-smartstate-0.2.6 lib/disk/modules/MSVSDynamicDisk.rb
manageiq-smartstate-0.2.5 lib/disk/modules/MSVSDynamicDisk.rb
manageiq-smartstate-0.2.4 lib/disk/modules/MSVSDynamicDisk.rb
manageiq-smartstate-0.2.3 lib/disk/modules/MSVSDynamicDisk.rb
manageiq-smartstate-0.2.2 lib/disk/modules/MSVSDynamicDisk.rb
manageiq-smartstate-0.2.1 lib/disk/modules/MSVSDynamicDisk.rb
manageiq-smartstate-0.2.0 lib/disk/modules/MSVSDynamicDisk.rb
manageiq-smartstate-0.1.6 lib/disk/modules/MSVSDynamicDisk.rb
manageiq-smartstate-0.1.5 lib/disk/modules/MSVSDynamicDisk.rb
manageiq-smartstate-0.1.4 lib/disk/modules/MSVSDynamicDisk.rb
manageiq-smartstate-0.1.3 lib/disk/modules/MSVSDynamicDisk.rb
manageiq-smartstate-0.1.2 lib/disk/modules/MSVSDynamicDisk.rb
manageiq-smartstate-0.1.1 lib/disk/modules/MSVSDynamicDisk.rb
manageiq-smartstate-0.1.0 lib/disk/modules/MSVSDynamicDisk.rb