Re: [PATCH] tests: fix fdisk/bsd for big endian systems

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thursday 29 May 2014, Ruediger Meier wrote:
> From: Ruediger Meier <ruediger.meier@xxxxxxxxxxx>
> 
> Signed-off-by: Ruediger Meier <ruediger.meier@xxxxxxxxxxx>
> ---
>  tests/ts/fdisk/bsd | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/tests/ts/fdisk/bsd b/tests/ts/fdisk/bsd
> index 7e3c787..32b3f31 100755
> --- a/tests/ts/fdisk/bsd
> +++ b/tests/ts/fdisk/bsd
> @@ -39,6 +39,17 @@ FDISK_CMD_BSD_LIST_TYPES="b\nl\nq\n"         # list supported PT types and quit
>  
>  #set -x
>  
> +# BSD disklabel depends on endianess
> +BYTE_ORDER=$($TS_HELPER_SYSINFO byte-order)
> +function fdisk_bsd_byte_order_clean
> +{
> +	[ $BYTE_ORDER = "BE" ] || return
> +	sed -i \
> +	-e s/2e1cee529cb59c9341afef0443f196a1/c2273b52976351db75596c47c10b0725/\
> +	-e s/b5c121c2091b2ff26b880551feac7112/9a234a5b99e37d2ce0d92b65437b93cd/\

Argh, I have screwed it.

> +	"$TS_OUTPUT"
> +}
> +
>  function print_layout {
>  	echo -ne "\n---layout----------" >> $TS_OUTPUT
>  	$TS_CMD_FDISK -l ${TEST_IMAGE_NAME}  >> $TS_OUTPUT
> @@ -102,5 +113,6 @@ echo -e "${FDISK_CMD_BSD_LIST_TYPES}" | \
>  	$TS_CMD_FDISK ${TEST_IMAGE_NAME} | \
>  	sed 's/Reading .*//g; s/Welcome to fdisk .*//' >> $TS_OUTPUT 2>&1
>  
> +fdisk_bsd_byte_order_clean
>  ts_fdisk_clean ${TEST_IMAGE_NAME}
>  ts_finalize
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux