Commit 831f7b91 authored by Andrew Vagin's avatar Andrew Vagin Committed by Pavel Emelyanov

tty: use PRIx64 to print dev_t

dev_t is %ul on x86_64 and %ull on arm32

tty.c: In function 'get_tty_driver':
tty.c:247:2: error: format '%lx' expects argument of type 'long unsigned int', but argument 4 has type 'dev_t' [-Werror=format=]
  snprintf(id, sizeof(id), "tty[%lx:%lx]", rdev, dev);
Signed-off-by: 's avatarAndrew Vagin <avagin@virtuozzo.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 0e891b3b
......@@ -244,7 +244,7 @@ struct tty_driver *get_tty_driver(dev_t rdev, dev_t dev)
int major, minor;
char id[42];
snprintf(id, sizeof(id), "tty[%lx:%lx]", rdev, dev);
snprintf(id, sizeof(id), "tty[%"PRIx64":%"PRIx64"]", rdev, dev);
if (external_lookup_id(id) || inherit_fd_lookup_id(id) >= 0)
return &ext_driver;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment