projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
93b5181
)
hostid: do not output sign-extended host id. Closes 6056
author
Denys Vlasenko
<vda.linux@googlemail.com>
Mon, 4 Mar 2013 02:04:38 +0000
(
03:04
+0100)
committer
Denys Vlasenko
<vda.linux@googlemail.com>
Mon, 4 Mar 2013 02:04:38 +0000
(
03:04
+0100)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
coreutils/hostid.c
patch
|
blob
|
history
diff --git
a/coreutils/hostid.c
b/coreutils/hostid.c
index 5c1a4e0861751d3e727a6fc48c4f386f46d8dd4d..e5b1f51883aec008fad29d2f71f68220e63e1821 100644
(file)
--- a/
coreutils/hostid.c
+++ b/
coreutils/hostid.c
@@
-36,7
+36,8
@@
int hostid_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
bb_show_usage();
}
- printf("%08lx\n", gethostid());
+ /* POSIX says gethostid returns a "32-bit identifier" */
+ printf("%08x\n", (unsigned)(uint32_t)gethostid());
return fflush_all();
}