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 /namedev.c | |
parent | 1cec1c241600fc11121f9504bc9e95836c03bd9c (diff) |
[PATCH] switch major/minor to dev_t
Diffstat (limited to 'namedev.c')
-rw-r--r-- | namedev.c | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -228,12 +228,12 @@ static void apply_format(struct udevice *udev, char *string, size_t maxsize, dbg("substitute kernel number '%s'", udev->kernel_number); break; case 'm': - strintcatmax(string, udev->minor, maxsize); - dbg("substitute minor number '%u'", udev->minor); + strintcatmax(string, minor(udev->devt), maxsize); + dbg("substitute minor number '%u'", minor(udev->devt)); break; case 'M': - strintcatmax(string, udev->major, maxsize); - dbg("substitute major number '%u'", udev->major); + strintcatmax(string, major(udev->devt), maxsize); + dbg("substitute major number '%u'", major(udev->devt)); break; case 'c': if (strlen(udev->program_result) == 0) @@ -317,8 +317,9 @@ static void apply_format(struct udevice *udev, char *string, size_t maxsize, case 'N': if (udev->tmp_node[0] == '\0') { dbg("create temporary device node for callout"); - snprintf(udev->tmp_node, NAME_SIZE-1, "%s/.tmp-%u-%u", udev_root, udev->major, udev->minor); - udev_make_node(udev, udev->tmp_node, udev->major, udev->minor, 0600, 0, 0); + snprintf(udev->tmp_node, NAME_SIZE, "%s/.tmp-%u-%u", udev_root, major(udev->devt), minor(udev->devt)); + udev->tmp_node[NAME_SIZE] = '\0'; + udev_make_node(udev, udev->tmp_node, udev->devt, 0600, 0, 0); } strfieldcatmax(string, udev->tmp_node, maxsize); dbg("substitute temporary device node name '%s'", udev->tmp_node); |