From owner-freebsd-current Fri Jul 2 12:22:27 1999 Delivered-To: freebsd-current@freebsd.org Received: from janus.syracuse.net (janus.syracuse.net [205.232.47.15]) by hub.freebsd.org (Postfix) with ESMTP id 8989114BD5 for ; Fri, 2 Jul 1999 12:22:24 -0700 (PDT) (envelope-from green@unixhelp.org) Received: from localhost (green@localhost) by janus.syracuse.net (8.9.2/8.8.7) with ESMTP id PAA04809; Fri, 2 Jul 1999 15:22:27 -0400 (EDT) Date: Fri, 2 Jul 1999 15:22:27 -0400 (EDT) From: "Brian F. Feldman" X-Sender: green@janus.syracuse.net To: current@FreeBSD.org Cc: grog@lemis.com Subject: world broken in vinum (PATCH) Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Here's the fix. I'm sure it's not absolutely the same as what Greg will have, but if anyone wants to commit it, it will fix world. Brian Fundakowski Feldman _ __ ___ ____ ___ ___ ___ green@FreeBSD.org _ __ ___ | _ ) __| \ FreeBSD: The Power to Serve! _ __ | _ \._ \ |) | http://www.FreeBSD.org/ _ |___/___/___/ --- src/sbin/vinum/vext.h.orig Fri Jul 2 15:06:24 1999 +++ src/sbin/vinum/vext.h Fri Jul 2 15:12:12 1999 @@ -80,6 +80,9 @@ void vinum_makedev(int argc, char *argv[], char *arg0[]); void vinum_help(int argc, char *argv[], char *arg0[]); void vinum_quit(int argc, char *argv[], char *arg0[]); +void vinum_concat(int argc, char *argv[], char *arg0[]); +void vinum_stripe(int argc, char *argv[], char *arg0[]); +void vinum_mirror(int argc, char *argv[], char *arg0[]); void vinum_setdaemon(int argc, char *argv[], char *arg0[]); void reset_volume_stats(int volno, int recurse); void reset_plex_stats(int plexno, int recurse); @@ -105,6 +108,7 @@ #endif void make_devices(void); void get_drive_info(struct drive *drive, int index); +struct drive *find_drive_by_devname(char *name); void get_sd_info(struct sd *sd, int index); void get_plex_sd_info(struct sd *sd, int plexno, int sdno); void get_plex_info(struct plex *plex, int index); @@ -145,3 +149,6 @@ extern int file_line; /* and line in input file (yes, this is tacky) */ extern char buffer[]; /* buffer to read in to */ + +extern int sflag; +extern char *objectname; --- src/sbin/vinum/commands.c.orig Fri Jul 2 15:13:19 1999 +++ src/sbin/vinum/commands.c Fri Jul 2 15:17:46 1999 @@ -1422,7 +1422,8 @@ } bigchunk = bigchunk > freelist.sectors ? bigchunk : freelist.sectors; /* max it */ } - maxsize = min(maxsize, bigchunk); /* this is as much as we can do */ + if (bigchunk < maxsize) /* this is as much as we can do */ + maxsize = bigchunk; } /* Now create the volume */ @@ -1580,7 +1581,8 @@ } bigchunk = bigchunk > freelist.sectors ? bigchunk : freelist.sectors; /* max it */ } - maxsize[o & 1] = min(maxsize[o & 1], bigchunk); /* get the maximum size of a subdisk */ + if (bigchunk < maxsize[o & 1]) /* get the maximum size of a subdisk */ + maxsize[o & 1] = bigchunk; } } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message