[PATCH v2 10/10] x86: upgrade: make code comment appear as log lines

Adrian Schmutzler mail at adrianschmutzler.de
Tue Nov 10 06:56:41 EST 2020


Hi,

> -----Original Message-----
> From: openwrt-devel [mailto:openwrt-devel-bounces at lists.openwrt.org]
> On Behalf Of Yousong Zhou
> Sent: Dienstag, 10. November 2020 03:22
> To: Adrian Schmutzler <mail at adrianschmutzler.de>; Philip Prindeville
> <philipp at redfish-solutions.com>
> Cc: Yousong Zhou <yszhou4tech at gmail.com>; OpenWrt Development List
> <openwrt-devel at lists.openwrt.org>
> Subject: [PATCH v2 10/10] x86: upgrade: make code comment appear as log
> lines
> 
> This is mainly to make it clear records in/out in the following lines are for
> extracting boot sectors
> 
> Before
> 
>   == upgrade: Reading partition table from bootdisk...
>   37+26 records in
>   37+26 records out
>   == upgrade: Reading partition table from image...
> 
> After
> 
>   == upgrade: Reading partition table from bootdisk...
>   == upgrade: Extract boot sector from the image
>   37+26 records in
>   37+26 records out
>   == upgrade: Reading partition table from image...

technically, the commit message would need to be updated from "==" to date.
However, having seen the updated output I'm not so sure anymore whether date really makes it nicer.
For this patch it's just a nitpick, though, I'm sure everybody will understand without changing the message as well.

Best

Adrian

> 
> Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
> ---
>  target/linux/x86/base-files/lib/upgrade/platform.sh | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/target/linux/x86/base-files/lib/upgrade/platform.sh
> b/target/linux/x86/base-files/lib/upgrade/platform.sh
> index 0b54caea29..d8f2eba97e 100644
> --- a/target/linux/x86/base-files/lib/upgrade/platform.sh
> +++ b/target/linux/x86/base-files/lib/upgrade/platform.sh
> @@ -19,7 +19,7 @@ platform_check_image() {
> 
>  	get_partitions "/dev/$diskdev" bootdisk
> 
> -	#extract the boot sector from the image
> +	v "Extract boot sector from the image"
>  	get_image_dd "$1" of=/tmp/image.bs count=63 bs=512b
> 
>  	get_partitions /tmp/image.bs image
> @@ -82,7 +82,7 @@ platform_do_upgrade() {
>  	if [ "$UPGRADE_OPT_SAVE_PARTITIONS" = "1" ]; then
>  		get_partitions "/dev/$diskdev" bootdisk
> 
> -		#extract the boot sector from the image
> +		v "Extract boot sector from the image"
>  		get_image_dd "$1" of=/tmp/image.bs count=63 bs=512b
> 
>  		get_partitions /tmp/image.bs image
> @@ -114,7 +114,6 @@ platform_do_upgrade() {
>  		fi
>  	done < /tmp/partmap.image
> 
> -	#copy partition uuid
>  	v "Writing new UUID to /dev/$diskdev..."
>  	get_image_dd "$1" of="/dev/$diskdev" bs=1 skip=440 count=4
> seek=440 conv=fsync
> 
> @@ -129,5 +128,4 @@ platform_do_upgrade() {
>  		sed -i "s/\(PARTUUID=\)[a-f0-9-]\+/\1$4$3$2$1-$6$5-$8$7-
> $9/ig" /mnt/boot/grub/grub.cfg
>  		umount /mnt
>  	fi
> -
>  }
> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openpgp-digital-signature.asc
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.openwrt.org/pipermail/openwrt-devel/attachments/20201110/621c02ba/attachment.sig>


More information about the openwrt-devel mailing list