From e72bc6cfb01f6959670a5c80130f0167065eedd7 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Thu, 7 May 1998 00:09:40 +0000 Subject: if d_npartitions < RAW_PART, set to RAW_PART so we don't get ENXIO and bail --- sys/arch/pmax/dev/rz.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sys/arch/pmax/dev/rz.c') 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", -- cgit v1.2.3