
From: Christophe Saout <christophe@saout.de>

We forgot to change part_dev_read in fs/partitions/check.c to return the
device in the new %u:%u format in sysfs.

cat /sys/block/hda/hda5/dev should return 3:5 instead of 0305



 25-akpm/fs/partitions/check.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff -puN fs/partitions/check.c~part_dev_read-fix fs/partitions/check.c
--- 25/fs/partitions/check.c~part_dev_read-fix	Tue Aug 12 12:42:44 2003
+++ 25-akpm/fs/partitions/check.c	Tue Aug 12 12:42:44 2003
@@ -223,9 +223,8 @@ static struct sysfs_ops part_sysfs_ops =
 static ssize_t part_dev_read(struct hd_struct * p, char *page)
 {
 	struct gendisk *disk = container_of(p->kobj.parent,struct gendisk,kobj);
-	int part = p->partno;
-	dev_t base = MKDEV(disk->major, disk->first_minor); 
-	return sprintf(page, "%04x\n", (unsigned)(base + part));
+	dev_t dev = MKDEV(disk->major, disk->first_minor + p->partno);
+	return print_dev_t(page, dev);
 }
 static ssize_t part_start_read(struct hd_struct * p, char *page)
 {

_
