Bug 6056

Summary: hostid utility sometimes prints 64-bit number
Product: Busybox Reporter: Alexander Zubkov <green>
Component: OtherAssignee: unassigned
Status: RESOLVED FIXED    
Severity: major CC: busybox-cvs
Priority: P5    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Host: Target:
Build:

Description Alexander Zubkov 2013-03-03 10:55:40 UTC
hostid should print 32-bit number. But on platforms with 64-bit long (which is used for storing hostid) it can output 64-bit numbers in some cases:
# ./busybox hostid
ffffffffb45de613
In linux coreutils this case is specially commented:
http://git.savannah.gnu.org/cgit/coreutils.git/tree/src/hostid.c
It happens when hostid number is sign-extended.
Comment 1 Denys Vlasenko 2013-03-04 02:06:53 UTC
commit 9bbf6b98c42a212b8a4b1aa02975ac18bb612922
Author: Denys Vlasenko <vda.linux@googlemail.com>
Date:   Mon Mar 4 03:04:38 2013 +0100

    hostid: do not output sign-extended host id. Closes 6056