chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
udevd: add --debug-trace option
[elogind.git]
/
udev_device.c
diff --git
a/udev_device.c
b/udev_device.c
index b680246bf8e035945bf82d01a96f4e3e16a278d6..bc0b33077e274eedcaf913c11d0d3b27e0112f0d 100644
(file)
--- 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 <kay.sievers@vrfy.org>
*
* This program is free software; you can redistribute it and/or modify it
* Copyright (C) 2004-2006 Kay Sievers <kay.sievers@vrfy.org>
*
* 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.,
*
* 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;
dev_t udev_device_get_devt(struct udevice *udev)
{
const char *attr;
- unsigned int maj
or, minor
;
+ unsigned int maj
, min
;
/* read it from sysfs */
attr = sysfs_attr_get_value(udev->dev->devpath, "dev");
if (attr != NULL) {
/* read it from sysfs */
attr = sysfs_attr_get_value(udev->dev->devpath, "dev");
if (attr != NULL) {
- if (sscanf(attr, "%u:%u", &maj
or, &minor
) == 2)
- return makedev(maj
or, minor
);
+ if (sscanf(attr, "%u:%u", &maj
, &min
) == 2)
+ return makedev(maj
, min
);
}
return makedev(0, 0);
}
}
return makedev(0, 0);
}