class SlowFat::BiosParameterBlock
BiosParameterBlock
holds information from a BPB.
Attributes
bytes_per_logsect[R]
fats[R]
heads[R]
large_total_logsects[R]
logsects[R]
logsects_per_cluster[R]
logsects_per_fat[R]
media_descriptor[R]
physects_per_track[R]
reserved_logsects[R]
root_entries[R]
Public Class Methods
new(data)
click to toggle source
# File lib/slowfat/bootsect.rb, line 41 def initialize(data) (@bytes_per_logsect, @logsects_per_cluster, @reserved_logsects, @fats, @root_entries, @total_logsects, @media_descriptor, @logsects_per_fat, @physects_per_track, @heads, @hidden_logsects, @large_total_logsects) = data.unpack('vCvCvvCvvvVV') end
Public Instance Methods
media_descriptor_type()
click to toggle source
Return the type of media this boot sector is on @return [Symbol] the type of media described by the media descriptor in the boot sector
# File lib/slowfat/bootsect.rb, line 48 def media_descriptor_type case @media_descriptor_id when 0xE5 :floppy_8inch when 0xF0 :floppy_35inch_hd when 0xF8 :fixed_disk when 0xFD :floppy_525inch_ld else :unknown end end