mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
65d0089c64
The dev_get_primary_dev fn now returns: 0 if the dev is already a primary dev 1 if the dev is a partition, primary dev is returned in "result" (output arg) -1 on error This way, we can better differentiate between the error state and the state in which the dev supplied is not a partition in the caller (this was same return value before). Also, if we already have information about the device type, we can check its major number against the list of known device types (cmd->dev_types) directly, so we don't need to go through the sysfs - we only check the major:minor pair which is a bit more straightforward and faster. If the dev_types does not have any info about this device type, the code just fallbacks to the original sysfs interface to get the partition info. |
||
---|---|---|
.. | ||
dev-cache.c | ||
dev-cache.h | ||
dev-io.c | ||
dev-luks.c | ||
dev-md.c | ||
dev-swap.c | ||
dev-type.c | ||
dev-type.h | ||
device-types.h | ||
device.h |