FreeBSD/sys/boot/usb/tools/sysinit.c
/* the following function converts the numbers into host endian format */
the following function converts the numbers into host endian format
the following function converts the numbers into host endian format
static uint32_t
read32(uint32_t val)
{
	uint32_t temp;
	uint32_t endian;
	endian = endian32;
	temp = 0;
	while (val) {
		temp |= (val & 0xF) << ((endian & 0xF) * 4);
		endian >>= 4;
		val >>= 4;
	}
	return (temp);
}
static uint32_t read32 ( uint32_t val ) { uint32_t temp ; uint32_t endian ; endian = endian32 ; temp = 0 ; while ( val ) { temp |= ( val & 0xF ) << ( ( endian & 0xF ) * 4 ) ; endian >>= 4 ; val >>= 4 ; } return ( temp ) ; }
the following function converts the numbers into host endian format
the following function converts the numbers into host endian format