summaryrefslogtreecommitdiffstats
path: root/etc/MAKEDEV
diff options
context:
space:
mode:
authoriedowse <iedowse@FreeBSD.org>2002-08-10 22:03:58 +0000
committeriedowse <iedowse@FreeBSD.org>2002-08-10 22:03:58 +0000
commit3e2d19afb9bdd2dfa6868b6e843d91fa0a846f9c (patch)
tree371523028407c3fa4d6803b51d3b9922fed20185 /etc/MAKEDEV
parentf43070c32510080cd90cfad7384d00f798c8d852 (diff)
downloadFreeBSD-src-3e2d19afb9bdd2dfa6868b6e843d91fa0a846f9c.zip
FreeBSD-src-3e2d19afb9bdd2dfa6868b6e843d91fa0a846f9c.tar.gz
Remove some unnecessary sanity checks that break "sh MAKEDEV cd"
and others, because test(1) does not do shortcut evaluation. Fix the same off-by-one error for acd*t* that revision 1.326 fixed for other *cd devices. Suggested by: bde Reviewed by: bde
Diffstat (limited to 'etc/MAKEDEV')
-rw-r--r--etc/MAKEDEV8
1 files changed, 4 insertions, 4 deletions
diff --git a/etc/MAKEDEV b/etc/MAKEDEV
index 89e42c9..ed1e587 100644
--- a/etc/MAKEDEV
+++ b/etc/MAKEDEV
@@ -796,10 +796,10 @@ acd*t*)
tracks=`expr $i : '.*t\(.*\)'`;
name=acd;
chr=117;
- if [ -z "${units}" -o "${units}" -le 0 ]; then
- units=1
+ if [ -z "${units}" ]; then
+ units=0
fi
- if [ -z "${tracks}" -o "${tracks}" -le 0 ]; then
+ if [ -z "${tracks}" ]; then
tracks=100
fi
if [ "${units}" -le 31 -a "${tracks}" -le 169 ]; then
@@ -830,7 +830,7 @@ acd*|cd*|mcd*|scd*)
mcd*) units=`expr $i : '...\(.*\)'`; name=mcd; chr=29;;
scd*) units=`expr $i : '...\(.*\)'`; name=scd; chr=45;;
esac
- if [ -z "${units}" -o "${units}" -le 0 ]; then
+ if [ -z "${units}" ]; then
units=0
fi
if [ "${units}" -le 31 ]; then
OpenPOWER on IntegriCloud