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.5.4 lib/fs/MiqFS/modules/HFSProbe.rb
manageiq-smartstate-0.3.5 lib/fs/MiqFS/modules/HFSProbe.rb
manageiq-smartstate-0.5.3 lib/fs/MiqFS/modules/HFSProbe.rb
manageiq-smartstate-0.5.2 lib/fs/MiqFS/modules/HFSProbe.rb
manageiq-smartstate-0.5.1 lib/fs/MiqFS/modules/HFSProbe.rb
manageiq-smartstate-0.5.0 lib/fs/MiqFS/modules/HFSProbe.rb
manageiq-smartstate-0.3.4 lib/fs/MiqFS/modules/HFSProbe.rb
manageiq-smartstate-0.4.0 lib/fs/MiqFS/modules/HFSProbe.rb
manageiq-smartstate-0.2.18.2 lib/fs/MiqFS/modules/HFSProbe.rb
manageiq-smartstate-0.3.3 lib/fs/MiqFS/modules/HFSProbe.rb
manageiq-smartstate-0.3.2 lib/fs/MiqFS/modules/HFSProbe.rb
manageiq-smartstate-0.3.1 lib/fs/MiqFS/modules/HFSProbe.rb
manageiq-smartstate-0.3.0 lib/fs/MiqFS/modules/HFSProbe.rb
manageiq-smartstate-0.2.24 lib/fs/MiqFS/modules/HFSProbe.rb
manageiq-smartstate-0.2.18.1 lib/fs/MiqFS/modules/HFSProbe.rb
manageiq-smartstate-0.2.23 lib/fs/MiqFS/modules/HFSProbe.rb
manageiq-smartstate-0.2.22 lib/fs/MiqFS/modules/HFSProbe.rb
manageiq-smartstate-0.2.21 lib/fs/MiqFS/modules/HFSProbe.rb
manageiq-smartstate-0.2.20 lib/fs/MiqFS/modules/HFSProbe.rb
manageiq-smartstate-0.2.19 lib/fs/MiqFS/modules/HFSProbe.rb