Sha256: 2776f761069e3c16da3287a5aafeafb392d93fda004bdae5e37d159f6eb93f68

Contents?: true

Size: 385 Bytes

Versions: 52

Compression:

Stored size: 385 Bytes

Contents

module ReFSProbe
  FS_SIGNATURE = [0x00, 0x00, 0x00, 0x52, 0x65, 0x46, 0x53, 0x00].freeze # ...ReFS.

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

    dobj.seek(0, IO::SEEK_SET)
    magic = dobj.read(FS_SIGNATURE.size)&.unpack('C*')

    # Check for ReFS signature
    raise "ReFS is Not Supported" if magic == FS_SIGNATURE

    # No ReFS
    false
  end
end

Version data entries

52 entries across 52 versions & 1 rubygems

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