[dm-devel] boolian logic bug in vgremove
Andre Noll
maan at systemlinux.org
Wed Jan 31 15:30:06 UTC 2007
Hi
In the argument checking code of vgreduce.c there are two occasions of
'&' that really should be '&&'. Patch below.
Signed-off.by: Andre Noll <maan at systemlinux.org>
---
Index: vgreduce.c
===================================================================
RCS file: /cvs/lvm2/LVM2/tools/vgreduce.c,v
retrieving revision 1.55
diff -u -r1.55 vgreduce.c
--- vgreduce.c 9 Jan 2007 23:14:34 -0000 1.55
+++ vgreduce.c 31 Jan 2007 15:17:01 -0000
@@ -427,13 +427,13 @@
int ret = 1;
int consistent = 1;
- if (!argc & !arg_count(cmd, removemissing_ARG)) {
+ if (!argc && !arg_count(cmd, removemissing_ARG)) {
log_error("Please give volume group name and "
"physical volume paths");
return EINVALID_CMD_LINE;
}
- if (!argc & arg_count(cmd, removemissing_ARG)) {
+ if (!argc && arg_count(cmd, removemissing_ARG)) {
log_error("Please give volume group name");
return EINVALID_CMD_LINE;
}
Andre
--
The only person who always got his work done by Friday was Robinson Crusoe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/dm-devel/attachments/20070131/72eb1449/attachment.sig>
More information about the dm-devel
mailing list