From owner-dev-commits-src-main@freebsd.org Wed Jun 30 17:20:46 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7418B667E6A; Wed, 30 Jun 2021 17:20:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GFSmG2mtLz3Bxg; Wed, 30 Jun 2021 17:20:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 476BC10B51; Wed, 30 Jun 2021 17:20:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15UHKkoG079378; Wed, 30 Jun 2021 17:20:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15UHKkUQ079377; Wed, 30 Jun 2021 17:20:46 GMT (envelope-from git) Date: Wed, 30 Jun 2021 17:20:46 GMT Message-Id: <202106301720.15UHKkUQ079377@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 3f197b101f71 - main - release: Remove C-like string comparison operator MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3f197b101f71ee4f4949c53bf330f61b43749ce9 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 17:20:46 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=3f197b101f71ee4f4949c53bf330f61b43749ce9 commit 3f197b101f71ee4f4949c53bf330f61b43749ce9 Author: Jose Luis Duran AuthorDate: 2021-06-20 00:00:19 +0000 Commit: Warner Losh CommitDate: 2021-06-30 17:13:51 +0000 release: Remove C-like string comparison operator Per [(1), i.e. test(1), the string comparison operator should be `=`, not `==` in sh(1) scripts. No functional change. FreeBSD's test accepts `==` as an alias for `=` for compatibility with gnu test's `==` extension. Reviewed by: imp@, gjb@ Pull Request: https://github.com/freebsd/freebsd-src/pull/485 --- release/tools/arm.subr | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/release/tools/arm.subr b/release/tools/arm.subr index 811d6ddb402d..89b52077e836 100644 --- a/release/tools/arm.subr +++ b/release/tools/arm.subr @@ -65,13 +65,13 @@ umount_loop() { arm_create_disk() { # Create the target raw file and temporary work directory. chroot ${CHROOTDIR} gpart create -s ${PART_SCHEME} ${mddev} - if [ "${PART_SCHEME}" == "GPT" ]; then + if [ "${PART_SCHEME}" = "GPT" ]; then chroot ${CHROOTDIR} gpart add -t efi -l efi -a 512k -s ${FAT_SIZE} ${mddev} chroot ${CHROOTDIR} newfs_msdos -L efi -F ${FAT_TYPE} /dev/${mddev}p1 chroot ${CHROOTDIR} gpart add -t freebsd-ufs -l rootfs -a 64k ${mddev} chroot ${CHROOTDIR} newfs -U -L rootfs /dev/${mddev}p2 fi - if [ "${PART_SCHEME}" == "MBR" ]; then + if [ "${PART_SCHEME}" = "MBR" ]; then chroot ${CHROOTDIR} gpart add -t '!12' -a 512k -s ${FAT_SIZE} ${mddev} chroot ${CHROOTDIR} gpart set -a active -i 1 ${mddev} chroot ${CHROOTDIR} newfs_msdos -L msdosboot -F ${FAT_TYPE} /dev/${mddev}s1 @@ -169,10 +169,10 @@ arm_setup_minimal_loader() { } arm_install_base() { - if [ "${PART_SCHEME}" == "GPT" ]; then + if [ "${PART_SCHEME}" = "GPT" ]; then chroot ${CHROOTDIR} mount /dev/${mddev}p2 ${DESTDIR} fi - if [ "${PART_SCHEME}" == "MBR" ]; then + if [ "${PART_SCHEME}" = "MBR" ]; then chroot ${CHROOTDIR} mount /dev/${mddev}s2a ${DESTDIR} fi _OSVERSION=$(chroot ${CHROOTDIR} /usr/bin/uname -U) @@ -196,13 +196,13 @@ arm_install_base() { echo '# Custom /etc/fstab for FreeBSD embedded images' \ > ${CHROOTDIR}/${DESTDIR}/etc/fstab - if [ "${PART_SCHEME}" == "GPT" ]; then + if [ "${PART_SCHEME}" = "GPT" ]; then echo "/dev/ufs/rootfs / ufs rw 1 1" \ >> ${CHROOTDIR}/${DESTDIR}/etc/fstab echo "/dev/msdosfs/EFI /boot/efi msdosfs rw,noatime 0 0" \ >> ${CHROOTDIR}/${DESTDIR}/etc/fstab fi - if [ "${PART_SCHEME}" == "MBR" ]; then + if [ "${PART_SCHEME}" = "MBR" ]; then echo "/dev/ufs/rootfs / ufs rw 1 1" \ >> ${CHROOTDIR}/${DESTDIR}/etc/fstab echo "/dev/msdosfs/MSDOSBOOT /boot/msdos msdosfs rw,noatime 0 0" \ @@ -232,11 +232,11 @@ arm_install_boot() { FATMOUNT="${DESTDIR%${KERNEL}}/fat" UFSMOUNT="${DESTDIR%${KERNEL}}/ufs" chroot ${CHROOTDIR} mkdir -p "${FATMOUNT}" "${UFSMOUNT}" - if [ "${PART_SCHEME}" == "GPT" ]; then + if [ "${PART_SCHEME}" = "GPT" ]; then dospart="/dev/${mddev}p1" ufspart="/dev/${mddev}p2" fi - if [ "${PART_SCHEME}" == "MBR" ]; then + if [ "${PART_SCHEME}" = "MBR" ]; then dospart="/dev/${mddev}s1" ufspart="/dev/${mddev}s2a" fi @@ -244,7 +244,7 @@ arm_install_boot() { chroot ${CHROOTDIR} mount_msdosfs ${dospart} ${FATMOUNT} chroot ${CHROOTDIR} mount ${ufspart} ${UFSMOUNT} - if [ "${EMBEDDED_TARGET}" == "arm" ]; then + if [ "${EMBEDDED_TARGET}" = "arm" ]; then chroot ${CHROOTDIR} cp -p ${UFSMOUNT}/boot/ubldr.bin \ ${FATMOUNT}/ubldr.bin fi