diff options
author | kay.sievers@vrfy.org <kay.sievers@vrfy.org> | 2005-02-21 13:44:39 +0100 |
---|---|---|
committer | Greg KH <gregkh@suse.de> | 2005-04-26 23:36:13 -0700 |
commit | 7e720bd4ad8257d81d273d98294ebbcc03ade9ba (patch) | |
tree | 5ce8a27d9abe0213679e815d1d13bcc4597da3d8 /udev_db.c | |
parent | 1cec1c241600fc11121f9504bc9e95836c03bd9c (diff) |
[PATCH] switch major/minor to dev_t
Diffstat (limited to 'udev_db.c')
-rw-r--r-- | udev_db.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -79,7 +79,7 @@ int udev_db_add_device(struct udevice *udev) fprintf(f, "P:%s\n", udev->devpath); fprintf(f, "N:%s\n", udev->name); fprintf(f, "S:%s\n", udev->symlink); - fprintf(f, "M:%u:%u\n", udev->major, udev->minor); + fprintf(f, "M:%u:%u\n", major(udev->devt), minor(udev->devt)); fprintf(f, "A:%u\n", udev->partitions); fprintf(f, "R:%u\n", udev->ignore_remove); @@ -92,6 +92,7 @@ static int parse_db_file(struct udevice *udev, const char *filename) { char line[NAME_SIZE]; char temp[NAME_SIZE]; + unsigned int major, minor; char *bufline; char *buf; size_t bufsize; @@ -127,7 +128,8 @@ static int parse_db_file(struct udevice *udev, const char *filename) count = NAME_SIZE-1; strncpy(temp, &bufline[2], count-2); temp[count-2] = '\0'; - sscanf(temp, "%u:%u", &udev->major, &udev->minor); + sscanf(temp, "%u:%u", &major, &minor); + udev->devt = makedev(major, minor); break; case 'S': if (count > NAME_SIZE) |