diff options
Diffstat (limited to 'fs/devfs-core.c')
-rw-r--r-- | fs/devfs-core.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/fs/devfs-core.c b/fs/devfs-core.c index 82e4811b38..2475ab959a 100644 --- a/fs/devfs-core.c +++ b/fs/devfs-core.c @@ -107,6 +107,20 @@ struct cdev *cdev_by_partuuid(const char *partuuid) return NULL; } +struct cdev *cdev_by_diskuuid(const char *diskuuid) +{ + struct cdev *cdev; + + if (!diskuuid) + return NULL; + + list_for_each_entry(cdev, &cdev_list, list) { + if (!cdev->master && !strcasecmp(cdev->uuid, diskuuid)) + return cdev; + } + return NULL; +} + /** * device_find_partition - find a partition belonging to a physical device * |