Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1nGpcl-0001jP-1l for mharc-grub-devel@gnu.org; Sun, 06 Feb 2022 17:03:11 -0500 Received: from eggs.gnu.org ([209.51.188.92]:59522) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nGpb1-00006j-RB for grub-devel@gnu.org; Sun, 06 Feb 2022 17:01:26 -0500 Received: from [2607:f8b0:4864:20::836] (port=43682 helo=mail-qt1-x836.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nGpae-0000j6-Gj for grub-devel@gnu.org; Sun, 06 Feb 2022 17:01:13 -0500 Received: by mail-qt1-x836.google.com with SMTP id x5so10515003qtw.10 for ; Sun, 06 Feb 2022 14:00:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficientek-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=GCecRorvHopBRlzOqmeRTVf1kgYgMSVkMAkT17E+vgY=; b=K3AUFKByhwMh9uwVXnSvYDhInAhdxVOivGu6cfG+vv+Tn80/AfpCBo8VP9Psly/ytn SeYdY0lbpIqy26rx1nOj9ldcmOKltw98deb7N66z0er1D2FxCVmUkhq2USiozLBEBLkU aZvZNV7/va3acjfmLh2DzqYFl2X2DCGuFvU7KpunVYv425LUM6ANqdrtz6kD1mnCMeEd bPoro60zuaa0IHgHICgigu74xuPolLcy4ETrwKC6fScBJEz3bGWBVHu/JJjuZtoW8G/z 1QvIpBklh4z809ccUu7/Q2OndcO1slJInDICKiitoMz621IRHeEChd958jdZYJWllBTB 8XDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=GCecRorvHopBRlzOqmeRTVf1kgYgMSVkMAkT17E+vgY=; b=RTAyesqVmLU1ZifJvJzj7AHihKg1MwS6e19akM4EfVx+z+SqeLSFVXcbx8Oi7zomeY k2EuPT6TQq1hDHVMKjDYnSJF2D1rmVmGnJOtfGh0i/Kn0CgR7nlTbjz/2DzJs9dRwGZV UmIRGbgRPNYmPr7Io5vvGH36xOpTAlrralVjZD1eoA7SsjYVMlOY1QEVsdDsoJ3TWlHi srQ0DtMahbNNWEULmR3Z+UNMxTjvC3IeuprazaYcLZTC06O9+g79z4Cv5dzqoNOc+p+v 8Ol8JMyhrEPWElzf9oRTRNdltzKvjuuDEmiasF1UxjeIK5dY5MQbixiZSPKfB/uiYcY+ gWyg== X-Gm-Message-State: AOAM533XKNSbKSYHQ+pHwmFpGky0VfcFCavuG9mCYO9ic2rPxcbm86GG iq73mNLE7e5l6GR+RTeNPkFN1O8gGaC3vw== X-Google-Smtp-Source: ABdhPJyeOfqGYbiI9CEbDVDxm33O1elb+WSwRwqqaYQXhE3gPJ/6bhgBTlPHO6HFofq+zY3T+2wGXg== X-Received: by 2002:ac8:5e08:: with SMTP id h8mr6047563qtx.201.1644184849581; Sun, 06 Feb 2022 14:00:49 -0800 (PST) Received: from localhost.localdomain (garza.riseup.net. [198.252.153.109]) by smtp.gmail.com with ESMTPSA id u17sm4664220qkp.90.2022.02.06.14.00.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 06 Feb 2022 14:00:49 -0800 (PST) From: Glenn Washburn To: Daniel Kiper , grub-devel@gnu.org Cc: Glenn Washburn , Daniel Kiper Subject: [PATCH v3 3/5] tests: Remove $((BASE#NUM)) bashism in grub-fs-tester Date: Sun, 6 Feb 2022 16:00:10 -0600 Message-Id: <401b227cb2596f81de5fbdabef3d0c81112ef455.1644184605.git.development@efficientek.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::836 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::836; envelope-from=development@efficientek.com; helo=mail-qt1-x836.google.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Feb 2022 22:01:29 -0000 This bashism allows converting NUM in base BASE to decimal. Its not needed because the only place its used is to convert from hexidecimal and this can also be done with the more portable $((0xHEXNUM)) syntax. Signed-off-by: Glenn Washburn Reviewed-by: Daniel Kiper --- tests/util/grub-fs-tester.in | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/util/grub-fs-tester.in b/tests/util/grub-fs-tester.in index aa72b2174..a1f3f299b 100644 --- a/tests/util/grub-fs-tester.in +++ b/tests/util/grub-fs-tester.in @@ -459,7 +459,7 @@ for LOGSECSIZE in $(range "$MINLOGSECSIZE" "$MAXLOGSECSIZE" 1); do # FIXME: not so sure about AFFS # OS LIMITATION: minix2/minix3 could be formatted in a way to permit more. x"minix3" | x"minix2" | x"hfs"| x"affs" | xaffs_intl | xreiserfs_old | xext2_old) - BIGBLOCKCNT=$((16#7fffffff));; + BIGBLOCKCNT=$((0x7fffffff));; # FS LIMITATION: redundant storage # We have only limited space. Mirroring multiplies it very effectively. @@ -669,18 +669,18 @@ for LOGSECSIZE in $(range "$MINLOGSECSIZE" "$MAXLOGSECSIZE" 1); do # mkfs.hfs and mkfs.hfsplus don't fill UUID. x"hfsplus") "mkfs.hfsplus" -b $BLKSIZE -v "$FSLABEL" "${MOUNTDEVICE}" - dd if=/dev/urandom of="${MOUNTDEVICE}" bs=1 seek=$((16#468)) conv=notrunc count=8 ;; + dd if=/dev/urandom of="${MOUNTDEVICE}" bs=1 seek=$((0x468)) conv=notrunc count=8 ;; x"hfsplus_wrap") "mkfs.hfsplus" -w -b $BLKSIZE -v "$FSLABEL" "${MOUNTDEVICE}" - dd if=/dev/urandom of="${MOUNTDEVICE}" bs=1 seek=$((16#468)) conv=notrunc count=8 + dd if=/dev/urandom of="${MOUNTDEVICE}" bs=1 seek=$((0x468)) conv=notrunc count=8 MOUNTFS="hfsplus";; x"hfsplus_casesens") "mkfs.hfsplus" -s -b $BLKSIZE -v "$FSLABEL" "${MOUNTDEVICE}" - dd if=/dev/urandom of="${MOUNTDEVICE}" bs=1 seek=$((16#468)) conv=notrunc count=8 + dd if=/dev/urandom of="${MOUNTDEVICE}" bs=1 seek=$((0x468)) conv=notrunc count=8 MOUNTFS="hfsplus";; x"hfs") "mkfs.hfs" -b $BLKSIZE -v "`echo $FSLABEL |recode utf8..macroman`" -h "${MOUNTDEVICE}" - dd if=/dev/urandom of="${MOUNTDEVICE}" bs=1 seek=$((16#474)) conv=notrunc count=8 + dd if=/dev/urandom of="${MOUNTDEVICE}" bs=1 seek=$((0x474)) conv=notrunc count=8 MOUNTOPTS="iocharset=utf8,codepage=macroman," ;; x"vfat"*|xmsdos*) -- 2.27.0