Module Name: src
Committed By: tsutsui
Date: Sun Jan 22 16:56:22 UTC 2012
Modified Files:
src/distrib/common/bootimage: Makefile.bootimage
Log Message:
Appease warnings `"expr 0 \* 1024 \* 1024 / 512" returned non-zero status.'
SWAPMB could be zero (in install-image case) and
expr(1) returns exit status 1 in that case. Umm.
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/distrib/common/bootimage/Makefile.bootimage
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/distrib/common/bootimage/Makefile.bootimage
diff -u src/distrib/common/bootimage/Makefile.bootimage:1.2 src/distrib/common/bootimage/Makefile.bootimage:1.3
--- src/distrib/common/bootimage/Makefile.bootimage:1.2 Sun Jan 22 16:50:00 2012
+++ src/distrib/common/bootimage/Makefile.bootimage Sun Jan 22 16:56:22 2012
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.bootimage,v 1.2 2012/01/22 16:50:00 tsutsui Exp $
+# $NetBSD: Makefile.bootimage,v 1.3 2012/01/22 16:56:22 tsutsui Exp $
#
# Copyright (c) 2009, 2010, 2011 Izumi Tsutsui. All rights reserved.
#
@@ -146,8 +146,9 @@ INSTALLBOOT_AFTER_DISKLABEL?= no
IMAGEMB?= 2048 # 2048MB
SWAPMB?= 128 # 128MB
+# XXX: SWAPMB could be zero and expr(1) returns exit status 1 in that case
IMAGESECTORS!= expr ${IMAGEMB} \* 1024 \* 1024 / 512
-SWAPSECTORS!= expr ${SWAPMB} \* 1024 \* 1024 / 512
+SWAPSECTORS!= expr ${SWAPMB} \* 1024 \* 1024 / 512 || true
.if ${USE_MBR} == "no"
LABELSECTORS?= 0
@@ -176,7 +177,7 @@ SWAPOFFSET!= expr ${LABELSECTORS} + ${FS
# parameters for sunlabel
FSCYLINDERS!= expr ${FSSECTORS} / \( ${HEADS} \* ${SECTORS} \)
-SWAPCYLINDERS!= expr ${SWAPSECTORS} / \( ${HEADS} \* ${SECTORS} \)
+SWAPCYLINDERS!= expr ${SWAPSECTORS} / \( ${HEADS} \* ${SECTORS} \) || true
#