diff options
author | pjd <pjd@FreeBSD.org> | 2010-09-17 22:51:45 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2010-09-17 22:51:45 +0000 |
commit | 1fabf17c4cabea3da89bdfc1f25b070fcb6de575 (patch) | |
tree | e75b78a1ff02bf201d54c6f9cd6c9738e7b1e4d9 /sys/boot | |
parent | d63aabd58eddbaccc246f798cd71d9c281733471 (diff) | |
download | FreeBSD-src-1fabf17c4cabea3da89bdfc1f25b070fcb6de575.zip FreeBSD-src-1fabf17c4cabea3da89bdfc1f25b070fcb6de575.tar.gz |
Remove magic value.
Diffstat (limited to 'sys/boot')
-rw-r--r-- | sys/boot/zfs/zfs.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/boot/zfs/zfs.c b/sys/boot/zfs/zfs.c index 5aec766..a995f57 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) |