1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-07 09:56:51 +03:00

udev-builtin-path: fix printf specifiers

This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2013-12-14 23:09:14 -05:00
parent 5958d08962
commit d9de321f78
Notes: Lennart Poettering 2014-02-17 23:00:44 +01:00
Backport: bugfix

View File

@ -71,9 +71,9 @@ static int format_lun_number(struct udev_device *dev, char **path)
/* address method 0, peripheral device addressing with bus id of zero */
if (lun < 256)
return path_prepend(path, "lun-%d", lun);
return path_prepend(path, "lun-%lu", lun);
/* handle all other lun addressing methods by using a variant of the original lun format */
return path_prepend(path, "lun-0x%04x%04x00000000", (lun & 0xffff), (lun >> 16) & 0xffff);
return path_prepend(path, "lun-0x%04lx%04lx00000000", lun & 0xffff, (lun >> 16) & 0xffff);
}
static struct udev_device *skip_subsystem(struct udev_device *dev, const char *subsys)