Expand the DASDDevice class to hold the device bus ID and flags that are
passed at boot time. Add udev functions to return the bus ID and flag
values for DASD devices. When building the device tree, read the DASD
information and pass that to the DASDDevice object.

Ah, that's how you do that. I thought, the DASDDevice would access udev/sysfs itself on dracutSetupData being called. But I don't mind retrieving that data before allocated DASDDevice object and handing it over to its constructor, if that is the anaconda storage code way.

I suppose you chose those names, so they match the dasd= module parameter of dasd_mod, which currently happens to be the syntax of dracut's rd_DASD=. Alas, in sysfs some are called differently. And readonly is called "ro" for the module parameter. I know that this is not exactly consistent.

Right. As you saw in the later patch, I was matching the names here to what I
see in sysfs. The dracutSetupData method for DASDDevice then builds the
kernel parameter from that.

ID_PATH is yet from some other program that generated it (path_id) out of sysfs data, which would be the definitive source: The path of the udev DB is, e.g.
"/devices/css0/0.0.0005/0.0.eb26/block/dasda/dasda1"
^^^^^^^^
and there we could get the device bus ID directly.
Or readlink (with splitting) of /sys/block/dasda/device , but there we would need to strip the partition numbers first to get to the block device itself which does not seem very clean. There are just too many ways.
The parsing with splitting looks fragile. Remember my recent patch for the parser of ifcfg files?

Yeah, I'm not crazy about this line. If there is a better way to find the bus
ID, I'd like to use it. lsdasd has output I like, so maybe I'll look there.