Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1nGcXW-0004AK-3G for mharc-grub-devel@gnu.org; Sun, 06 Feb 2022 03:04:55 -0500 Received: from eggs.gnu.org ([209.51.188.92]:32982) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nGcXD-000455-DK for grub-devel@gnu.org; Sun, 06 Feb 2022 03:04:36 -0500 Received: from [2607:f8b0:4864:20::835] (port=42699 helo=mail-qt1-x835.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nGcX9-0008I9-Io for grub-devel@gnu.org; Sun, 06 Feb 2022 03:04:33 -0500 Received: by mail-qt1-x835.google.com with SMTP id s1so9537357qtw.9 for ; Sun, 06 Feb 2022 00:04:30 -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=mID6NttgkOMmKT8mRfsnXVZULZdqZndwS0utUWR4Mhdlu7L32UTAH5KpqYlinnT5bH /6cWU07iu0V2782xLBelXEIy67PVUZlsBq70wh6dnmEobJmvoMU7D/x9CVBc81WIZc52 xEhIokUOoUFQa21YfbAD3dGSs1UM0a9FdNXnA/F0q4Mr/SxgHAqZvySXlyGv83qkyANN 0zfpL5O2T8anl7qwGjrpgreRwFC/d71CnwPMdp/69suS1PXSaYqEfydhK48nyef5rqah 0tTSCAi6Ya/yrNNp6CA3v2f+O81hJllb9CvqXRVjTxvaWE7S/tEkmb7UHT+HVsQoCUKY oYpA== 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=elAJ4/IBjge8n+mPtv8XHJPEONN9Oex6gT8ACnK7PDQA32Gf03zi2FW/nvvH0kY1x3 CLfAJXLOt8oHpDTui8xIJP/4zbMeB7PrGmC6nCir+lSaZedC64TT07r7lrd1Bp0gN7Dp tfWtqyUYF95Vp//cv7SlYvj9bA257BHE62c8fe5VEIcVGr6KTjbbH6APe7myq+WUDjPs Ql+JhkaADlZMcS9Q0tjoDrZW39VIZoYJQPyPxfuKk1lqEgnct+4Iw0IPCwzRrdYt8VU5 mjgCLhQ+NZW/gGA0o9QdmwxokFIhyBYtG0eEBEui/vYja64lrLkwiOOzGaW4LANxRoqy Ar1A== X-Gm-Message-State: AOAM530rwV1DYMhQIYze1KX1BqCvviW08mJB/MQAV+vIAZjplkFA2SmD pAhjtzMii1/XeMSs8Z5r+oV8EWX3Ca2dew== X-Google-Smtp-Source: ABdhPJxhfnk7YjfVLT639qElm1OEOd2xpVG2hdFSSF2p1VV97wnQ4X9WudDzQrtVfQWxPTm7PnDcNg== X-Received: by 2002:a05:622a:1356:: with SMTP id w22mr4452985qtk.100.1644134669880; Sun, 06 Feb 2022 00:04:29 -0800 (PST) Received: from localhost.localdomain (garza.riseup.net. [198.252.153.109]) by smtp.gmail.com with ESMTPSA id y2sm3549666qke.33.2022.02.06.00.04.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 06 Feb 2022 00:04:29 -0800 (PST) From: Glenn Washburn To: Daniel Kiper , grub-devel@gnu.org Cc: Glenn Washburn , Daniel Kiper Subject: [PATCH 3/5] tests: Remove $((BASE#NUM)) bashism in grub-fs-tester Date: Sun, 6 Feb 2022 02:02:42 -0600 Message-Id: <401b227cb2596f81de5fbdabef3d0c81112ef455.1644134385.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::835 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::835; envelope-from=development@efficientek.com; helo=mail-qt1-x835.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 08:04:36 -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