aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--udev-block-notify.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/udev-block-notify.c b/udev-block-notify.c
index 06ea7e2..10ec41b 100644
--- a/udev-block-notify.c
+++ b/udev-block-notify.c
@@ -161,29 +161,29 @@ int main (int argc, char ** argv) {
* Values available differs from device type and content */
/* file system */
- if ((value = udev_device_get_property_value(dev, "ID_FS_LABEL")) != NULL)
+ if ((value = udev_device_get_property_value(dev, "ID_FS_LABEL")) != NULL && *value != 0)
notifystr = appendstr(TEXT_TAG, notifystr, "Label", value);
- if ((value = udev_device_get_property_value(dev, "ID_FS_TYPE")) != NULL)
+ if ((value = udev_device_get_property_value(dev, "ID_FS_TYPE")) != NULL && *value != 0)
notifystr = appendstr(TEXT_TAG, notifystr, "Type", value);
- if ((value = udev_device_get_property_value(dev, "ID_FS_USAGE")) != NULL)
+ if ((value = udev_device_get_property_value(dev, "ID_FS_USAGE")) != NULL && *value != 0)
notifystr = appendstr(TEXT_TAG, notifystr, "Usage", value);
- if ((value = udev_device_get_property_value(dev, "ID_FS_UUID")) != NULL)
+ if ((value = udev_device_get_property_value(dev, "ID_FS_UUID")) != NULL && *value != 0)
notifystr = appendstr(TEXT_TAG, notifystr, "UUID", value);
/* partition */
- if ((value = udev_device_get_property_value(dev, "ID_PART_TABLE_TYPE")) != NULL)
+ if ((value = udev_device_get_property_value(dev, "ID_PART_TABLE_TYPE")) != NULL && *value != 0)
notifystr = appendstr(TEXT_TAG, notifystr, "Partition Table Type", value);
- if ((value = udev_device_get_property_value(dev, "ID_PART_TABLE_NAME")) != NULL)
+ if ((value = udev_device_get_property_value(dev, "ID_PART_TABLE_NAME")) != NULL && *value != 0)
notifystr = appendstr(TEXT_TAG, notifystr, "Partition Name", value);
- if ((value = udev_device_get_property_value(dev, "ID_PART_ENTRY_TYPE")) != NULL)
+ if ((value = udev_device_get_property_value(dev, "ID_PART_ENTRY_TYPE")) != NULL && *value != 0)
notifystr = appendstr(TEXT_TAG, notifystr, "Partition Type", value);
/* device mapper */
- if ((value = udev_device_get_property_value(dev, "DM_NAME")) != NULL)
+ if ((value = udev_device_get_property_value(dev, "DM_NAME")) != NULL && *value != 0)
notifystr = appendstr(TEXT_TAG, notifystr, "Device mapper name", value);
/* multi disk */
- if ((value = udev_device_get_property_value(dev, "MD_LEVEL")) != NULL)
+ if ((value = udev_device_get_property_value(dev, "MD_LEVEL")) != NULL && *value != 0)
notifystr = appendstr(TEXT_TAG, notifystr, "Multi disk level", value);
if (verbose > 0)