Skip to content

Instantly share code, notes, and snippets.

@ancorgs
Created October 6, 2020 10:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ancorgs/6b051522e744c94fc6c437117ac6f674 to your computer and use it in GitHub Desktop.
Save ancorgs/6b051522e744c94fc6c437117ac6f674 to your computer and use it in GitHub Desktop.
HWInfoReader
include Singleton
#for_device
#reset
#reset is called by StorageManager during probing
Stores the information into the singleton object
Reads the information in the first call to #for_device
#for_device is called by BlkDevice
DevicegraphSanitizer
#errors
#sanitized_devicegraph
#errors is called by StorageManager during probing and then...
if there are errors and the user wants to fix them...
#sanitized_devicegraph is called by StorageManager and the result is used instead of probed
FilesystemReader
#windows?
#release_name
#rpi_boot?
#efi?
#fstab
#crypttab
Filesystems::Base
#fs_attribute(attr)
#fs_attribute calls #read_fs_attributes unless userdata_value(:fs_attributes_already_read)
#read_fs_attributes instantiates a FilesystemReader and stores all its results in userdata
save_userdata(:windows, reader.windows?)
save_userdata(:release_name, reader.release_name)
save_userdata(:rpi_boot, reader.rpi_boot?)
save_userdata(:efi, reader.efi?)
save_userdata(:fstab, reader.fstab)
save_userdata(:crypttab, reader.crypttab)
Device
userdata_value(:in_etc_initial) is set in the first call to #update_etc_attributes
Encryption
userdata_value(:auto_dm_name) -> Related to modifications of dm_name
userdata_value(:crypttab_name) -> Used for importing mount points (at least)
userdata_value(:encryption_process) -> An object of type EncryptionProcess
that is updated through the process
MountPoint
userdata_value(:manual_mount_by)
Partitionable
userdata_value(:forced_ptable_type)
Filesystems::Btrfs
userdata_value(:auto_deleted_subvolumes)
BtrfsSubvolume
userdata_value(:can_be_auto_deleted)
Btrfs quotas
WIP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment