Sha256: ce4fe9cedfb70d0f765aacd1f0e55cb4a97e1861a982f9ae04871c5fa407bb27

Contents?: true

Size: 463 Bytes

Versions: 52

Compression:

Stored size: 463 Bytes

Contents

module HFSProbe
  HFS_SUPER_OFFSET  = 0
  HFS_MAGIC_OFFSET  = 0
  HFS_MAGIC_SIZE    = 2
  HFS_SUPER_MAGIC   = 0x4c4b

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

    # Check for HFS signature in first int.
    dobj.seek(HFS_SUPER_OFFSET + HFS_MAGIC_OFFSET)
    bs = dobj.read(HFS_MAGIC_SIZE)&.unpack('S')
    magic = bs.nil? ? nil : bs[0]
    raise "HFS is Not Supported" if magic == HFS_SUPER_MAGIC

    # No HFS.
    false
  end
end

Version data entries

52 entries across 52 versions & 1 rubygems

Version Path
manageiq-smartstate-0.10.1 lib/fs/MiqFS/modules/HFSProbe.rb
manageiq-smartstate-0.10.0 lib/fs/MiqFS/modules/HFSProbe.rb
manageiq-smartstate-0.9.0 lib/fs/MiqFS/modules/HFSProbe.rb
manageiq-smartstate-0.8.1 lib/fs/MiqFS/modules/HFSProbe.rb
manageiq-smartstate-0.8.0 lib/fs/MiqFS/modules/HFSProbe.rb
manageiq-smartstate-0.7.0 lib/fs/MiqFS/modules/HFSProbe.rb
manageiq-smartstate-0.6.2 lib/fs/MiqFS/modules/HFSProbe.rb
manageiq-smartstate-0.5.10 lib/fs/MiqFS/modules/HFSProbe.rb
manageiq-smartstate-0.3.10 lib/fs/MiqFS/modules/HFSProbe.rb
manageiq-smartstate-0.6.1 lib/fs/MiqFS/modules/HFSProbe.rb
manageiq-smartstate-0.3.9 lib/fs/MiqFS/modules/HFSProbe.rb
manageiq-smartstate-0.6.0 lib/fs/MiqFS/modules/HFSProbe.rb
manageiq-smartstate-0.5.9 lib/fs/MiqFS/modules/HFSProbe.rb
manageiq-smartstate-0.5.8 lib/fs/MiqFS/modules/HFSProbe.rb
manageiq-smartstate-0.3.8 lib/fs/MiqFS/modules/HFSProbe.rb
manageiq-smartstate-0.5.7 lib/fs/MiqFS/modules/HFSProbe.rb
manageiq-smartstate-0.3.7 lib/fs/MiqFS/modules/HFSProbe.rb
manageiq-smartstate-0.5.6 lib/fs/MiqFS/modules/HFSProbe.rb
manageiq-smartstate-0.3.6 lib/fs/MiqFS/modules/HFSProbe.rb
manageiq-smartstate-0.5.5 lib/fs/MiqFS/modules/HFSProbe.rb