diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2012-02-08 10:56:17 +0000 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2012-02-08 10:56:17 +0000 |
commit | cd4c26a27fd425755f9f4c7d2318942a184f7390 (patch) | |
tree | ae91dd8c778f2f602c93ad60604b5ae82aa59ad4 /tools/lvresize.c | |
parent | f9bd70878b56a585b298fb57d2d291c122919ff0 (diff) | |
download | lvm2-cd4c26a27fd425755f9f4c7d2318942a184f7390.tar.gz lvm2-cd4c26a27fd425755f9f4c7d2318942a184f7390.tar.xz lvm2-cd4c26a27fd425755f9f4c7d2318942a184f7390.zip |
Set status for error path
Do not leave status unitialized, since in some cases, it's tested,
when the function returns error.
Diffstat (limited to 'tools/lvresize.c')
-rw-r--r-- | tools/lvresize.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/lvresize.c b/tools/lvresize.c index 14637bf4..bf2388e1 100644 --- a/tools/lvresize.c +++ b/tools/lvresize.c @@ -159,6 +159,9 @@ static int _fsadm_cmd(struct cmd_context *cmd, argv[i++] = (fcmd == FSADM_CMD_RESIZE) ? "resize" : "check"; + if (status) + *status = -1; + if (dm_snprintf(lv_path, PATH_MAX, "%s%s/%s", cmd->dev_dir, lp->vg_name, lp->lv_name) < 0) { log_error("Couldn't create LV path for %s", lp->lv_name); |