From: Mike Blumenkrantz Date: Tue, 17 May 2011 00:10:52 +0000 (+0000) Subject: add fallback methods for grabbing disk vendor/model/etc X-Git-Tag: submit/efl/20131015.063327~9548 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=89df67bbc24a575eaa2df9155a972cac8df715ca;p=platform%2Fupstream%2Fefl.git add fallback methods for grabbing disk vendor/model/etc SVN revision: 59457 --- diff --git a/legacy/eeze/src/lib/eeze_disk.c b/legacy/eeze/src/lib/eeze_disk.c index 1adc23c196..72aa21c3a4 100644 --- a/legacy/eeze/src/lib/eeze_disk.c +++ b/legacy/eeze/src/lib/eeze_disk.c @@ -215,8 +215,12 @@ eeze_disk_scan(Eeze_Disk *disk) if (!disk->cache.vendor) disk->cache.vendor = udev_device_get_property_value(disk->device, "ID_VENDOR"); + if (!disk->cache.vendor) + if (!disk->cache.vendor) disk->cache.vendor = udev_device_get_sysattr_value(disk->device, "vendor"); if (!disk->cache.model) disk->cache.model = udev_device_get_property_value(disk->device, "ID_MODEL"); + if (!disk->cache.model) + if (!disk->cache.model) disk->cache.model = udev_device_get_sysattr_value(disk->device, "model"); if (!disk->cache.serial) disk->cache.serial = udev_device_get_property_value(disk->device, "ID_SERIAL_SHORT"); if (!disk->cache.uuid) @@ -282,6 +286,7 @@ eeze_disk_vendor_get(Eeze_Disk *disk) return disk->cache.vendor; disk->cache.vendor = udev_device_get_property_value(disk->device, "ID_VENDOR"); + if (!disk->cache.vendor) disk->cache.vendor = udev_device_get_sysattr_value(disk->device, "vendor"); return disk->cache.vendor; } @@ -294,6 +299,7 @@ eeze_disk_model_get(Eeze_Disk *disk) return disk->cache.model; disk->cache.model = udev_device_get_property_value(disk->device, "ID_MODEL"); + if (!disk->cache.model) disk->cache.model = udev_device_get_sysattr_value(disk->device, "model"); return disk->cache.model; }