Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1n7rI0-0006HZ-2c for mharc-grub-devel@gnu.org; Wed, 12 Jan 2022 23:00:40 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40118) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n7rHv-0006E9-KE for grub-devel@gnu.org; Wed, 12 Jan 2022 23:00:35 -0500 Received: from [2607:f8b0:4864:20::f2e] (port=41586 helo=mail-qv1-xf2e.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n7rHj-0001fL-FK for grub-devel@gnu.org; Wed, 12 Jan 2022 23:00:29 -0500 Received: by mail-qv1-xf2e.google.com with SMTP id hu2so5361174qvb.8 for ; Wed, 12 Jan 2022 20:00:21 -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=FKG/nnN8lxlCt/3V6QxAH1t6wB3YZI2H5RVWbvujVtU=; b=0u/KeCJLCrI4YVEgUcfthUZP0O8IPp9xJ5cPC6d/3ci4GcE7kcvD9ePlwBk/WtJGEO m0jMcGM3Dp7w/yM6zqBMaA6fhvrwaZYpyIJD0YYli3xtYD3DcM/2G5/bmPIKnzuMlkNh qwIhyhRPWDJsG2FSBAVS5SbVB/Lp1FhcgBfE201K8lqxORq7dZa61k6GPrcaIZFGwj/p Ik9NAJnNkpHOX+9ctz3ZroNE02c8WnMxShEV2BUyXIhhpr9LCVYcWTRe3G6+ILuEFxPm BARSTnfOh92z3sPSyOnoQU+L/ftoSH+tEkdBFu4xQmvsJ6uCkf1bKKnrY8ATYy3yD9sG LeGA== 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=FKG/nnN8lxlCt/3V6QxAH1t6wB3YZI2H5RVWbvujVtU=; b=HpXbaYyV9MRsuUYvlzk9Ew3VpiHTGpQHNgIw8fc40XRxOFS3ihAv6Uh6nLwgl4RM7P oZmDofCRM3YxMLH8o2k4Z0jXXBhwIq4HS8klcOeEyNaEkgTMQuM4ctzkb0iqkFvafqAG ytkfePeSQssIGxTCLRjBCck6IClLnVt2q7ZC2y1f6P5GIJzc5b0SM26pGjqdJHBjurLt gJjtbAIAQkkgN5MHStD+rGIfP6/z+uwIewB/rcLtuTOG2xTEl4DHV1i+W6eH3S7/yKgU R0NP17ugm1skcymjG2hETEjohSeGB2YqlWaGLAJde3FLvf6bWF7J6COUZ6LjKlaH4htn k4hg== X-Gm-Message-State: AOAM5311QcuURSzan18SBR8O52CjhDCinVQmI00/Mbv9yh4bws5An1Av 1wcsmImZ4PtA1SCRQOGB03R6yTCvgGq2vg== X-Google-Smtp-Source: ABdhPJxZLyZpmSBr7W3B+T3ym+HVQ/5+c4LHJOxqaC20ydR+VhOQpV2ZYnlIndnT7SuoeovLpPwI5g== X-Received: by 2002:a05:6214:268e:: with SMTP id gm14mr2397320qvb.24.1642046421288; Wed, 12 Jan 2022 20:00:21 -0800 (PST) Received: from localhost.localdomain ([37.218.244.251]) by smtp.gmail.com with ESMTPSA id 94sm1100138qtf.87.2022.01.12.20.00.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jan 2022 20:00:21 -0800 (PST) From: Glenn Washburn To: Daniel Kiper , grub-devel@gnu.org Cc: Glenn Washburn Subject: [PATCH 3/5] tests: Remove $((BASE#NUM)) bashism in grub-fs-tester Date: Wed, 12 Jan 2022 21:59:41 -0600 Message-Id: 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::f2e (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::f2e; envelope-from=development@efficientek.com; helo=mail-qv1-xf2e.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, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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: Thu, 13 Jan 2022 04:00: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 --- 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