From owner-svn-src-head@FreeBSD.ORG Fri Oct 1 06:12:13 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C7528106566C; Fri, 1 Oct 2010 06:12:13 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9C8228FC0C; Fri, 1 Oct 2010 06:12:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o916CDHY093077; Fri, 1 Oct 2010 06:12:13 GMT (envelope-from lulf@svn.freebsd.org) Received: (from lulf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o916CDcL093074; Fri, 1 Oct 2010 06:12:13 GMT (envelope-from lulf@svn.freebsd.org) Message-Id: <201010010612.o916CDcL093074@svn.freebsd.org> From: Ulf Lilleengen Date: Fri, 1 Oct 2010 06:12:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213318 - head/sys/geom/vinum X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Oct 2010 06:12:13 -0000 Author: lulf Date: Fri Oct 1 06:12:13 2010 New Revision: 213318 URL: http://svn.freebsd.org/changeset/base/213318 Log: - Check flag with the bitwise operator, not the logical operator. Submitted by: arundel MFC after: 1 week Modified: head/sys/geom/vinum/geom_vinum_move.c head/sys/geom/vinum/geom_vinum_rename.c Modified: head/sys/geom/vinum/geom_vinum_move.c ============================================================================== --- head/sys/geom/vinum/geom_vinum_move.c Fri Oct 1 03:59:18 2010 (r213317) +++ head/sys/geom/vinum/geom_vinum_move.c Fri Oct 1 06:12:13 2010 (r213318) @@ -115,13 +115,13 @@ gv_move_sd(struct gv_softc *sc, struct g if ((gv_consumer_is_open(d->consumer) || gv_consumer_is_open(destination->consumer)) && - !(flags && GV_FLAG_F)) { + !(flags & GV_FLAG_F)) { G_VINUM_DEBUG(0, "consumers on current and destination drive " " still open"); return (GV_ERR_ISBUSY); } - if (!(flags && GV_FLAG_F)) { + if (!(flags & GV_FLAG_F)) { G_VINUM_DEBUG(1, "-f flag not passed; move would be " "destructive"); return (GV_ERR_INVFLAG); Modified: head/sys/geom/vinum/geom_vinum_rename.c ============================================================================== --- head/sys/geom/vinum/geom_vinum_rename.c Fri Oct 1 03:59:18 2010 (r213317) +++ head/sys/geom/vinum/geom_vinum_rename.c Fri Oct 1 06:12:13 2010 (r213318) @@ -173,7 +173,7 @@ gv_rename_plex(struct gv_softc *sc, stru /* Fix up references and potentially rename subdisks. */ LIST_FOREACH(s, &p->subdisks, in_plex) { strlcpy(s->plex, p->name, sizeof(s->plex)); - if (flags && GV_FLAG_R) { + if (flags & GV_FLAG_R) { /* * Look for the two last dots in the string, and assume * that the old value was ok. @@ -243,7 +243,7 @@ gv_rename_vol(struct gv_softc *sc, struc /* Fix up references and potentially rename plexes. */ LIST_FOREACH(p, &v->plexes, in_volume) { strlcpy(p->volume, v->name, sizeof(p->volume)); - if (flags && GV_FLAG_R) { + if (flags & GV_FLAG_R) { /* * Look for the last dot in the string, and assume that * the old value was ok.