Date: Fri, 8 Aug 2008 17:42:43 -0600 (MDT) From: Mark A <mark@genre121.com> To: FreeBSD-gnats-submit@FreeBSD.org Subject: conf/126386: NANO_MEDIASIZE overflow Message-ID: <20080808234243.C60C25E0D@mail.genre121.com> Resent-Message-ID: <200808090000.m7900EOA016397@freefall.freebsd.org>
index | next in thread | raw e-mail
>Number: 126386
>Category: conf
>Synopsis: NANO_MEDIASIZE overflow
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sat Aug 09 00:00:13 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator: Mark A
>Release: FreeBSD 7.0-RELEASE-p2 i386
>Organization:
>Environment:
System: FreeBSD mail.genre121.com 7.0-RELEASE-p2 FreeBSD 7.0-RELEASE-p2 #0: Thu Jul 17 02:11:59 MDT 2008 mark@mail.genre121.com:/usr/obj/usr/src/sys/MAIL i386
>Description:
In /usr/src/tools/tools/nanobsd/FlashDevice.sub there are 2 lines
in question...
NANO_MEDIASIZE=`expr 4097802240 / 512`
NANO_MEDIASIZE=`expr 4224761856 / 512`
Those result with...
expr 4097802240 / 512
4194303
expr 4224761856 / 512
4194303
>How-To-Repeat:
Include "FlashDevice Sandisk 4g" in your nanobsd configuration
file.
Insert a few debugging print statements in nanobsd.sh where
NANO_MEDIASIZE is used.
When "/bin/sh nanobsd.sh -c nanobsd.conf" is run $NANO_MEDIASIZE
always prints 4194303.
>Fix:
Use expr -e
expr -e 4097802240 / 512
8003520
expr -e 4224761856 / 512
8251488
The man page for expr also states that if EXPR_COMPAT is
set then expr -e is used.
>Release-Note:
>Audit-Trail:
>Unformatted:
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080808234243.C60C25E0D>
