Sha256: 1ce8d665973ec26b477b06beb8b4527c331644205d4e86c0e87181c4b7a730c7
Contents?: true
Size: 685 Bytes
Versions: 14
Compression:
Stored size: 685 Bytes
Contents
require 'fs/ext3/superblock' module Ext3Probe def self.probe(dobj) $log.debug("Ext3Probe >> dobj=#{dobj}") if $log unless dobj.kind_of?(MiqDisk) $log.debug "Ext3Probe << FALSE because Disk Object class is not MiqDisk, but is '#{dobj.class}'" if $log return false end begin dobj.seek(0, IO::SEEK_SET) sb = Ext3::Superblock.new(dobj) # If initializing the superblock does not throw any errors, then this is ext3 $log.debug("Ext3Probe << TRUE") return true rescue => err $log.debug "Ext3Probe << FALSE because #{err.message}" if $log return false ensure dobj.seek(0, IO::SEEK_SET) end end end
Version data entries
14 entries across 14 versions & 1 rubygems