FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu Kernel Team

 
 
LinkBack Thread Tools
 
Old 01-15-2010, 08:23 PM
Peter Jones
 
Default Add udev accessor for ID_MODEL_FROM_DATABASE/ID_MODEL.

We get model info from udev, and it's useful to expose it.
---
storage/udev.py | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/storage/udev.py b/storage/udev.py
index 8f1f78f..42b27e6 100644
--- a/storage/udev.py
+++ b/storage/udev.py
@@ -276,6 +276,10 @@ def udev_device_get_vendor(udev_info):
""" Get the vendor of the device as reported by udev. """
return udev_info.get("ID_VENDOR_FROM_DATABASE", udev_info.get("ID_VENDOR"))

+def udev_device_get_model(udev_info):
+ """ Get the model of the device as reported by udev. """
+ return udev_info.get("ID_MODEL_FROM_DATABASE", udev_info.get("ID_MODEL"))
+
def udev_device_get_bus(udev_info):
""" Get the bus a device is connected to the system by. """
return udev_info.get("ID_BUS", "").upper()
--
1.6.5.2

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 06:29 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org