diff options
author | Dave Wysochanski <dwysocha@redhat.com> | 2009-09-14 19:44:15 +0000 |
---|---|---|
committer | Dave Wysochanski <dwysocha@redhat.com> | 2009-09-14 19:44:15 +0000 |
commit | 905240f91da66571da073df8784f1f42b2888328 (patch) | |
tree | 070f57080ddf3e5cb67534db4ab7833a32ca5b0a /tools | |
parent | fca434258aa399ac3bb475d27d43d4dd656a7cd7 (diff) | |
download | lvm2-905240f91da66571da073df8784f1f42b2888328.tar.gz lvm2-905240f91da66571da073df8784f1f42b2888328.tar.xz lvm2-905240f91da66571da073df8784f1f42b2888328.zip |
Use vg_is_exported(vg) macro everywhere.
This patch is all just cleanup and no other patch depends on it.
Replace explicit dereference and check with vg_is_exported().
Update a few copyrights and remove unnecessary whitespace.
Should be no functional change.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/vgchange.c | 4 | ||||
-rw-r--r-- | tools/vgimport.c | 4 | ||||
-rw-r--r-- | tools/vgscan.c | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/tools/vgchange.c b/tools/vgchange.c index 19c3eb7e..b3177eb4 100644 --- a/tools/vgchange.c +++ b/tools/vgchange.c @@ -446,7 +446,7 @@ static int _vgchange_refresh(struct cmd_context *cmd, struct volume_group *vg) if (!vg_refresh_visible(cmd, vg)) return ECMD_FAILED; - + return ECMD_PROCESSED; } @@ -459,7 +459,7 @@ static int vgchange_single(struct cmd_context *cmd, const char *vg_name, if (vg_read_error(vg)) return ECMD_FAILED; - if (vg_status(vg) & EXPORTED_VG) { + if (vg_is_exported(vg)) { log_error("Volume group \"%s\" is exported", vg_name); return ECMD_FAILED; } diff --git a/tools/vgimport.c b/tools/vgimport.c index 864a7009..5161b623 100644 --- a/tools/vgimport.c +++ b/tools/vgimport.c @@ -1,6 +1,6 @@ /* * Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved. - * Copyright (C) 2004-2007 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2009 Red Hat, Inc. All rights reserved. * * This file is part of LVM2. * @@ -26,7 +26,7 @@ static int vgimport_single(struct cmd_context *cmd __attribute((unused)), if (vg_read_error(vg)) goto error; - if (!(vg_status(vg) & EXPORTED_VG)) { + if (!vg_is_exported(vg)) { log_error("Volume group \"%s\" is not exported", vg_name); goto error; } diff --git a/tools/vgscan.c b/tools/vgscan.c index 769c5cfa..a7aef5f0 100644 --- a/tools/vgscan.c +++ b/tools/vgscan.c @@ -1,6 +1,6 @@ /* * Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved. - * Copyright (C) 2004-2007 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2009 Red Hat, Inc. All rights reserved. * * This file is part of LVM2. * @@ -23,7 +23,7 @@ static int vgscan_single(struct cmd_context *cmd, const char *vg_name, return ECMD_FAILED; log_print("Found %svolume group \"%s\" using metadata type %s", - (vg_status(vg) & EXPORTED_VG) ? "exported " : "", vg_name, + vg_is_exported(vg) ? "exported " : "", vg_name, vg->fid->fmt->name); check_current_backup(vg); |