[Tux3] Nontrivial example of ddlink usage

Daniel Phillips phillips at phunq.net
Thu Feb 26 00:41:19 PST 2009

One other detail I should point out in the ddsetup.c code is, the way that variable sized lists are returned by repeated reads of the ddlink.  For example, "ddsetup ls" returns a list of all the current device mapper devices, each with a device major/minor number.  Each device is returned by a single read from the ddlink, with the fixed size device number field followed by the variable sized name, the length of which is computed from the data length of the read.

There are several other list-returning commands, each implemented similarly briefly and obviously.



Tux3 mailing list
Tux3 at tux3.org

More information about the Tux3 mailing list