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 05-06-2010, 08:54 PM
David Cantrell
Default Use udev_device_get_by_path() to get /dev/disk/by-path link

Still scan the list of devices from udev, but call
udev_device_get_by_path() to return the full /dev/disk/by-path link. If
we do not have one, return None. Caller should account for lack of a
by-path link.

Resolves: rhbz#589713
Resolves: rhbz#589717
storage/devices.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/storage/devices.py b/storage/devices.py
index 7e23b9e..d2bf5da 100644
--- a/storage/devices.py
+++ b/storage/devices.py
@@ -152,9 +152,9 @@ def deviceNameToDiskByPath(deviceName=None):

for dev in udev_get_block_devices():
if udev_device_get_name(dev) == deviceName:
- return udev_device_get_path(dev)
+ return udev_device_get_by_path(dev)

- return deviceName
+ return None

class Device(object):

Anaconda-devel-list mailing list

Thread Tools

All times are GMT. The time now is 07:14 AM.

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