/*
- * udev_device.c - main udev data object
- *
* Copyright (C) 2004-2006 Kay Sievers <kay.sievers@vrfy.org>
*
* This program is free software; you can redistribute it and/or modify it
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
- * 675 Mass Ave, Cambridge, MA 02139, USA.
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
dev_t udev_device_get_devt(struct udevice *udev)
{
const char *attr;
- unsigned int major, minor;
+ unsigned int maj, min;
/* read it from sysfs */
attr = sysfs_attr_get_value(udev->dev->devpath, "dev");
if (attr != NULL) {
- if (sscanf(attr, "%u:%u", &major, &minor) == 2)
- return makedev(major, minor);
+ if (sscanf(attr, "%u:%u", &maj, &min) == 2)
+ return makedev(maj, min);
}
return makedev(0, 0);
}