Sha256: c2d6d35897db25d1a232de5c4baa306e44e8efc31f2683a81763496002ceb5ab

Contents?: true

Size: 465 Bytes

Versions: 52

Compression:

Stored size: 465 Bytes

Contents

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

  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

52 entries across 52 versions & 1 rubygems

Version Path
manageiq-smartstate-0.2.18 lib/fs/MiqFS/modules/Iso9660Probe.rb
manageiq-smartstate-0.2.17 lib/fs/MiqFS/modules/Iso9660Probe.rb
manageiq-smartstate-0.2.16 lib/fs/MiqFS/modules/Iso9660Probe.rb
manageiq-smartstate-0.2.15 lib/fs/MiqFS/modules/Iso9660Probe.rb
manageiq-smartstate-0.2.14 lib/fs/MiqFS/modules/Iso9660Probe.rb
manageiq-smartstate-0.2.13 lib/fs/MiqFS/modules/Iso9660Probe.rb
manageiq-smartstate-0.2.12 lib/fs/MiqFS/modules/Iso9660Probe.rb
manageiq-smartstate-0.2.11 lib/fs/MiqFS/modules/Iso9660Probe.rb
manageiq-smartstate-0.2.10 lib/fs/MiqFS/modules/Iso9660Probe.rb
manageiq-smartstate-0.2.9 lib/fs/MiqFS/modules/Iso9660Probe.rb
manageiq-smartstate-0.2.8 lib/fs/MiqFS/modules/Iso9660Probe.rb
manageiq-smartstate-0.2.7 lib/fs/MiqFS/modules/Iso9660Probe.rb