diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1998-05-07 00:09:40 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1998-05-07 00:09:40 +0000 |
commit | e72bc6cfb01f6959670a5c80130f0167065eedd7 (patch) | |
tree | aec80eb9f293bf9222630f75d57a1fc819615bf9 /sys/arch | |
parent | bde37a268015ca3f420aaf405cb7a68e73883d66 (diff) |
if d_npartitions < RAW_PART, set to RAW_PART so we don't get ENXIO and bail
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/pmax/dev/rz.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/arch/pmax/dev/rz.c b/sys/arch/pmax/dev/rz.c index a8c472a6c1f..bbad670e208 100644 --- a/sys/arch/pmax/dev/rz.c +++ b/sys/arch/pmax/dev/rz.c @@ -881,8 +881,9 @@ rzopen(dev, flags, mode, p) rzgetinfo(dev); lp = sc->sc_label; - if (part >= lp->d_npartitions || lp->d_partitions[part].p_size == 0) - { + if (lp->d_npartitions < RAW_PART) + lp->d_npartitions = RAW_PART; + if (part >= lp->d_npartitions || lp->d_partitions[part].p_size == 0) { printf("rzopen: ENXIO on rz%d%c unit %d part %d\n", unit, "abcdefg"[part], unit, part); printf("# partions %d, size of %d = %d\n", |