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