X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=udev_device.c;h=bc0b33077e274eedcaf913c11d0d3b27e0112f0d;hb=c3d6ca8767427b4b0ba9248a7787510903e7d34a;hp=b680246bf8e035945bf82d01a96f4e3e16a278d6;hpb=95776dc6ec174f47fa4dd4d8abf5d457223e5dd4;p=elogind.git diff --git a/udev_device.c b/udev_device.c index b680246bf..bc0b33077 100644 --- a/udev_device.c +++ b/udev_device.c @@ -1,6 +1,4 @@ /* - * udev_device.c - main udev data object - * * Copyright (C) 2004-2006 Kay Sievers * * This program is free software; you can redistribute it and/or modify it @@ -14,7 +12,7 @@ * * 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. * */ @@ -70,13 +68,13 @@ void udev_device_cleanup(struct udevice *udev) 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); }