projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3eac1bc
)
automount: fix deserialization of dev_t
author
Lennart Poettering
<lennart@poettering.net>
Wed, 17 Oct 2018 18:15:26 +0000
(20:15 +0200)
committer
Lennart Poettering
<lennart@poettering.net>
Fri, 26 Oct 2018 08:40:01 +0000
(10:40 +0200)
let's prefer "unsigned long" rather than "unsigned", in case there are
archs that have 32bit int, but 64bit dev_t.
(Also one cast was wrong anyway.)
src/core/automount.c
patch
|
blob
|
history
diff --git
a/src/core/automount.c
b/src/core/automount.c
index
70232f3
..
eebcc3b
100644
(file)
--- a/
src/core/automount.c
+++ b/
src/core/automount.c
@@
-882,12
+882,13
@@
static int automount_deserialize_item(Unit *u, const char *key, const char *valu
a->result = f;
} else if (streq(key, "dev-id")) {
- unsigned d;
+ unsigned
long
d;
- if (safe_atou(value, &d) < 0)
+ if (safe_ato
l
u(value, &d) < 0)
log_unit_debug(u, "Failed to parse dev-id value: %s", value);
else
- a->dev_id = (unsigned) d;
+ a->dev_id = (dev_t) d;
+
} else if (streq(key, "token")) {
unsigned token;