From 701c50988f905a1d27d253b34be714db05043c70 Mon Sep 17 00:00:00 2001 From: Pawel Jakub Dawidek Date: Fri, 17 Sep 2010 22:51:45 +0000 Subject: [PATCH] Remove magic value. --- sys/boot/zfs/zfs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/boot/zfs/zfs.c b/sys/boot/zfs/zfs.c index 5aec76676f16..a995f574f7ba 100644 --- a/sys/boot/zfs/zfs.c +++ b/sys/boot/zfs/zfs.c @@ -45,6 +45,8 @@ __FBSDID("$FreeBSD$"); #include "zfsimpl.c" +#define MAXBDDEV 31 + static int zfs_open(const char *path, struct open_file *f); static int zfs_write(struct open_file *f, void *buf, size_t size, size_t *resid); static int zfs_close(struct open_file *f); @@ -402,7 +404,7 @@ zfs_dev_init(void) * diskN, diskNpM or diskNsM. */ zfs_init(); - for (unit = 0; unit < 32 /* XXX */; unit++) { + for (unit = 0; unit < MAXBDDEV; unit++) { sprintf(devname, "disk%d:", unit); fd = open(devname, O_RDONLY); if (fd == -1)