Sha256: 9dd3f9c4baa964775cf0013f899281869b0db6ca09c75f32f9740d49385491e7

Contents?: true

Size: 458 Bytes

Versions: 14

Compression:

Stored size: 458 Bytes

Contents

module Iso9660Probe
  ISO9660FS_SUPER_OFFSET  = 32768
  ISO9660FS_MAGIC_OFFSET  = 1
  ISO9660FS_MAGIC_SIZE    = 5
  ISO9660FS_MAGIC         = "CD001"

  def self.probe(dobj)
    return false unless dobj.kind_of?(MiqDisk)

    # Assume ISO9660 - read magic at offset.
    dobj.seek(ISO9660FS_SUPER_OFFSET + ISO9660FS_MAGIC_OFFSET)
    magic = dobj.read(ISO9660FS_MAGIC_SIZE)
    return true if magic == ISO9660FS_MAGIC

    # Not ISO9660.
    false
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
manageiq-smartstate-0.2.6 lib/fs/MiqFS/modules/Iso9660Probe.rb
manageiq-smartstate-0.2.5 lib/fs/MiqFS/modules/Iso9660Probe.rb
manageiq-smartstate-0.2.4 lib/fs/MiqFS/modules/Iso9660Probe.rb
manageiq-smartstate-0.2.3 lib/fs/MiqFS/modules/Iso9660Probe.rb
manageiq-smartstate-0.2.2 lib/fs/MiqFS/modules/Iso9660Probe.rb
manageiq-smartstate-0.2.1 lib/fs/MiqFS/modules/Iso9660Probe.rb
manageiq-smartstate-0.2.0 lib/fs/MiqFS/modules/Iso9660Probe.rb
manageiq-smartstate-0.1.6 lib/fs/MiqFS/modules/Iso9660Probe.rb
manageiq-smartstate-0.1.5 lib/fs/MiqFS/modules/Iso9660Probe.rb
manageiq-smartstate-0.1.4 lib/fs/MiqFS/modules/Iso9660Probe.rb
manageiq-smartstate-0.1.3 lib/fs/MiqFS/modules/Iso9660Probe.rb
manageiq-smartstate-0.1.2 lib/fs/MiqFS/modules/Iso9660Probe.rb
manageiq-smartstate-0.1.1 lib/fs/MiqFS/modules/Iso9660Probe.rb
manageiq-smartstate-0.1.0 lib/fs/MiqFS/modules/Iso9660Probe.rb