hostid: do not output sign-extended host id. Closes 6056
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
93b51819cf
commit
9bbf6b98c4
@ -36,7 +36,8 @@ int hostid_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
|
|||||||
bb_show_usage();
|
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();
|
return fflush_all();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user