lib/fs/MiqFS/modules/HFSProbe.rb in manageiq-smartstate-0.2.6 vs lib/fs/MiqFS/modules/HFSProbe.rb in manageiq-smartstate-0.2.7

- old
+ new

@@ -7,10 +7,11 @@ 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) - magic = dobj.read(HFS_MAGIC_SIZE).unpack('S')[0] + 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