aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2013-09-24 12:38:44 +0200
committerGravatar Christian Hesse <mail@eworm.de>2013-09-24 12:38:44 +0200
commitbeef947f95a55c9348cbaef78d0ba1d725f8d564 (patch)
tree18b8e8a7fed6d9304dca8e3b53a51f855ebefd81
parent8761f34ab31e95f80d36486623cce4dabb89055e (diff)
downloadudev-block-notify-beef947f95a55c9348cbaef78d0ba1d725f8d564.tar.gz
udev-block-notify-beef947f95a55c9348cbaef78d0ba1d725f8d564.tar.zst
add device mapper name to notification
-rw-r--r--udev-block-notify.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/udev-block-notify.c b/udev-block-notify.c
index 9c97e9f..925f55b 100644
--- a/udev-block-notify.c
+++ b/udev-block-notify.c
@@ -180,6 +180,8 @@ int main (int argc, char ** argv) {
/* Get possible values with:
* $ udevadm info --query=all --name=/path/to/dev
* Values available differs from device type and content */
+
+ /* file system */
if ((value = udev_device_get_property_value(dev, "ID_FS_LABEL")) != NULL)
notifystr = appendstr(TEXT_TAG, notifystr, "Label", value);
if ((value = udev_device_get_property_value(dev, "ID_FS_TYPE")) != NULL)
@@ -188,12 +190,19 @@ int main (int argc, char ** argv) {
notifystr = appendstr(TEXT_TAG, notifystr, "Usage", value);
if ((value = udev_device_get_property_value(dev, "ID_FS_UUID")) != NULL)
notifystr = appendstr(TEXT_TAG, notifystr, "UUID", value);
+
+ /* partition */
if ((value = udev_device_get_property_value(dev, "ID_PART_TABLE_TYPE")) != NULL)
notifystr = appendstr(TEXT_TAG, notifystr, "Partition Table Type", value);
if ((value = udev_device_get_property_value(dev, "ID_PART_TABLE_NAME")) != NULL)
notifystr = appendstr(TEXT_TAG, notifystr, "Partition Name", value);
if ((value = udev_device_get_property_value(dev, "ID_PART_ENTRY_TYPE")) != NULL)
notifystr = appendstr(TEXT_TAG, notifystr, "Partition Type", value);
+
+ /* device mapper */
+ if ((value = udev_device_get_property_value(dev, "DM_NAME")) != NULL)
+ notifystr = appendstr(TEXT_TAG, notifystr, "Device mapper name", value);
+
}
# if DEBUG