X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fudev%2Fudev-builtin-path_id.c;h=763f3c3113be024ec72c0d18011b09ca4b320be3;hb=5c11fbe3a75e8015f2c26736787d4279c091f091;hp=da0273197bded6645cc0e4ceffe1b3ef1c6c134f;hpb=090be8653471e1abe3f1cdd32eaad0fbd65f85cd;p=elogind.git diff --git a/src/udev/udev-builtin-path_id.c b/src/udev/udev-builtin-path_id.c index da0273197..763f3c311 100644 --- a/src/udev/udev-builtin-path_id.c +++ b/src/udev/udev-builtin-path_id.c @@ -452,6 +452,19 @@ static struct udev_device *handle_usb(struct udev_device *parent, char **path) return parent; } +static struct udev_device *handle_bcma(struct udev_device *parent, char **path) +{ + const char *sysname; + unsigned int core; + + sysname = udev_device_get_sysname(parent); + if (sscanf(sysname, "bcma%*u:%u", &core) != 1) + return NULL; + + path_prepend(path, "bcma-%u", core); + return parent; +} + static struct udev_device *handle_ccw(struct udev_device *parent, struct udev_device *dev, char **path) { struct udev_device *scsi_dev; @@ -509,6 +522,9 @@ static int builtin_path_id(struct udev_device *dev, int argc, char *argv[], bool } else if (streq(subsys, "usb")) { parent = handle_usb(parent, &path); some_transport = true; + } else if (streq(subsys, "bcma")) { + parent = handle_bcma(parent, &path); + some_transport = true; } else if (streq(subsys, "serio")) { path_prepend(&path, "serio-%s", udev_device_get_sysnum(parent)); parent = skip_subsystem(parent, "serio"); @@ -531,6 +547,7 @@ static int builtin_path_id(struct udev_device *dev, int argc, char *argv[], bool } else if (streq(subsys, "scm")) { path_prepend(&path, "scm-%s", udev_device_get_sysname(parent)); parent = skip_subsystem(parent, "scm"); + some_transport = true; } parent = udev_device_get_parent(parent);