Commit 24fbb994 authored by Patrick Mochel's avatar Patrick Mochel

partitions: use the name in disk->kobj.name, instead of disk->disk_name.

Some names (for some reason) have a '/' in them, making them no good for directory
names. disk->kobj.name has already been transformed to turn those into '!', so this
makes sure we use those when setting the name for the partitions' names.
parent cad58392
...@@ -378,7 +378,7 @@ void add_partition(struct gendisk *disk, int part, sector_t start, sector_t len) ...@@ -378,7 +378,7 @@ void add_partition(struct gendisk *disk, int part, sector_t start, sector_t len)
p->nr_sects = len; p->nr_sects = len;
devfs_register_partition(disk, part); devfs_register_partition(disk, part);
kobject_init(&p->kobj); kobject_init(&p->kobj);
snprintf(p->kobj.name,KOBJ_NAME_LEN,"%s%d",disk->disk_name,part); snprintf(p->kobj.name,KOBJ_NAME_LEN,"%s%d",disk->kobj.name,part);
p->kobj.parent = &disk->kobj; p->kobj.parent = &disk->kobj;
p->kobj.subsys = &part_subsys; p->kobj.subsys = &part_subsys;
kobject_register(&p->kobj); kobject_register(&p->kobj);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment