So,
in aif we switched approaches to list all possible block devices the user can 
install Arch to.
at first, we listed blockdevices directly in /dev, by having some expressions 
like /dev/hd*, /dev/sd*, then later we needed to add /dev/vd*, /dev/xvd* and 
more
to support all kinds of hardware and virtualisation solutions.  This was a bit 
of a kludge, so we approached the problem from the other direction:
Now we go over everything in /sys/block and filter _out_ the stuff we _don't_ 
want. (such as devices with size 0 - empty card readers - type 5 - cdrom 
drives) etc.
see 
https://github.com/Dieterbe/aif/blob/develop/src/core/libs/lib-blockdevices-filesystems.sh#L215
This seems to work at least a tiny bit better, even though the problem is 
similar (we need to maintain filters to remove what we don't want..)
I think the final filter we need to add is for the following devices:
/dev/dm-0
/dev/dm-1
/dev/dm-2
/dev/loop0
/dev/loop1
/dev/loop100
/dev/loop101
/dev/loop102
/dev/loop103
/dev/loop104
/dev/loop105
/dev/loop106
/dev/loop107
/dev/loop108
/dev/loop109
/dev/loop110
/dev/loop2
/dev/loop3
/dev/loop4
/dev/loop5
/dev/loop6
/dev/loop7

are these all created by archiso? what exactly are they for?
does anyone know what is the best way to ignore them?
* some property in /sys/block/<dev>/ ?
* how about just maintaining a list of exactly all these filenames .. or:
* how about having archiso maintain a file called /var/aif-blockdevices or 
something? then aif can read that file and ignore blockdevices based on what it 
finds there.
(just don't call it archiso-blockdevices or something, because AIF is supposed 
to be able to run in several environments)

Reply via email to