Sha256: 245fef50ea0262ec1e3516d4ac5012f5b8bda492dfa75b6a47c9b5da49795c82

Contents?: true

Size: 478 Bytes

Versions: 52

Compression:

Stored size: 478 Bytes

Contents

module UnionFSProbe
  UNIONFS_SUPER_OFFSET  = 1024
  UNIONFS_MAGIC_OFFSET  = 52
  UNIONFS_MAGIC_SIZE    = 4
  UNIONFS_MAGIC         = 0xf15f083d

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

    # Assume UnionFS - read magic at offset.
    dobj.seek(UNIONFS_SUPER_OFFSET + UNIONFS_MAGIC_OFFSET)
    magic = dobj.read(UNIONFS_MAGIC_SIZE)&.unpack('L')
    raise "UnionFS is Not Supported" if magic == UNIONFS_MAGIC

    # No UnionFS.
    false
  end
end

Version data entries

52 entries across 52 versions & 1 rubygems

Version Path
manageiq-smartstate-0.5.4 lib/fs/MiqFS/modules/UnionFSProbe.rb
manageiq-smartstate-0.3.5 lib/fs/MiqFS/modules/UnionFSProbe.rb
manageiq-smartstate-0.5.3 lib/fs/MiqFS/modules/UnionFSProbe.rb
manageiq-smartstate-0.5.2 lib/fs/MiqFS/modules/UnionFSProbe.rb
manageiq-smartstate-0.5.1 lib/fs/MiqFS/modules/UnionFSProbe.rb
manageiq-smartstate-0.5.0 lib/fs/MiqFS/modules/UnionFSProbe.rb
manageiq-smartstate-0.3.4 lib/fs/MiqFS/modules/UnionFSProbe.rb
manageiq-smartstate-0.4.0 lib/fs/MiqFS/modules/UnionFSProbe.rb
manageiq-smartstate-0.2.18.2 lib/fs/MiqFS/modules/UnionFSProbe.rb
manageiq-smartstate-0.3.3 lib/fs/MiqFS/modules/UnionFSProbe.rb
manageiq-smartstate-0.3.2 lib/fs/MiqFS/modules/UnionFSProbe.rb
manageiq-smartstate-0.3.1 lib/fs/MiqFS/modules/UnionFSProbe.rb
manageiq-smartstate-0.3.0 lib/fs/MiqFS/modules/UnionFSProbe.rb
manageiq-smartstate-0.2.24 lib/fs/MiqFS/modules/UnionFSProbe.rb
manageiq-smartstate-0.2.18.1 lib/fs/MiqFS/modules/UnionFSProbe.rb
manageiq-smartstate-0.2.23 lib/fs/MiqFS/modules/UnionFSProbe.rb
manageiq-smartstate-0.2.22 lib/fs/MiqFS/modules/UnionFSProbe.rb
manageiq-smartstate-0.2.21 lib/fs/MiqFS/modules/UnionFSProbe.rb
manageiq-smartstate-0.2.20 lib/fs/MiqFS/modules/UnionFSProbe.rb
manageiq-smartstate-0.2.19 lib/fs/MiqFS/modules/UnionFSProbe.rb