summaryrefslogtreecommitdiffstats
path: root/sys/geom/vinum
diff options
context:
space:
mode:
authorlulf <lulf@FreeBSD.org>2010-10-01 06:12:13 +0000
committerlulf <lulf@FreeBSD.org>2010-10-01 06:12:13 +0000
commit57b68bbf1163b956fb3b92b5fc2be5efc3975ae5 (patch)
tree098478b847663c1524abad1fdeec040eae414edf /sys/geom/vinum
parentbca578aa589a604cbcbbcd06f44a9ad7ee03b217 (diff)
downloadFreeBSD-src-57b68bbf1163b956fb3b92b5fc2be5efc3975ae5.zip
FreeBSD-src-57b68bbf1163b956fb3b92b5fc2be5efc3975ae5.tar.gz
- Check flag with the bitwise operator, not the logical operator.
Submitted by: arundel MFC after: 1 week
Diffstat (limited to 'sys/geom/vinum')
-rw-r--r--sys/geom/vinum/geom_vinum_move.c4
-rw-r--r--sys/geom/vinum/geom_vinum_rename.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/geom/vinum/geom_vinum_move.c b/sys/geom/vinum/geom_vinum_move.c
index 8c295f6..1fe480c 100644
--- a/sys/geom/vinum/geom_vinum_move.c
+++ b/sys/geom/vinum/geom_vinum_move.c
@@ -115,13 +115,13 @@ gv_move_sd(struct gv_softc *sc, struct gv_sd *cursd,
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);
diff --git a/sys/geom/vinum/geom_vinum_rename.c b/sys/geom/vinum/geom_vinum_rename.c
index 7764c85..d4e76c2 100644
--- a/sys/geom/vinum/geom_vinum_rename.c
+++ b/sys/geom/vinum/geom_vinum_rename.c
@@ -173,7 +173,7 @@ gv_rename_plex(struct gv_softc *sc, struct gv_plex *p, char *newname, int flags)
/* 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, struct gv_volume *v, char *newname,
/* 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.
OpenPOWER on IntegriCloud