Sha256: 25885a3545bffbe533ae4ca3129de041b80296dfa8047c6ef909d13a9960b713
Contents?: true
Size: 437 Bytes
Versions: 14
Compression:
Stored size: 437 Bytes
Contents
module ZFSProbe ZFS_SUPER_OFFSET = 0 ZFS_MAGIC_OFFSET = 0 ZFS_MAGIC_SIZE = 4 ZFS_SUPER_MAGIC = 0x00bab10c def self.probe(dobj) return(false) unless dobj.kind_of?(MiqDisk) # Check for magic at uberblock offset. dobj.seek(ZFS_SUPER_OFFSET + ZFS_MAGIC_OFFSET) magic = dobj.read(ZFS_MAGIC_SIZE).unpack('L')[0] raise "ZFS is Not Supported" if magic == ZFS_SUPER_MAGIC # No ZFS. false end end
Version data entries
14 entries across 14 versions & 1 rubygems