From 4bd9480dce80147d45d2cfb255932e611b4fbe49 Mon Sep 17 00:00:00 2001 From: Alasdair Kergon Date: Fri, 26 Mar 2004 15:35:01 +0000 Subject: [PATCH] lv_info_by_lvid --- lib/activate/activate.c | 16 ++++++++++++++++ lib/activate/activate.h | 2 ++ 2 files changed, 18 insertions(+) diff --git a/lib/activate/activate.c b/lib/activate/activate.c index cc0d64de2..d003f5649 100644 --- a/lib/activate/activate.c +++ b/lib/activate/activate.c @@ -51,6 +51,11 @@ int lv_info(const struct logical_volume *lv, struct lvinfo *info) { return 0; } +int lv_info_by_lvid(struct cmd_context *cmd, const char *lvid_s, + struct lvinfo *info) +{ + return 0; +} int lv_snapshot_percent(struct logical_volume *lv, float *percent) { return 0; @@ -290,6 +295,17 @@ int lv_info(const struct logical_volume *lv, struct lvinfo *info) return _lv_info(lv, 0, info); } +int lv_info_by_lvid(struct cmd_context *cmd, const char *lvid_s, + struct lvinfo *info) +{ + struct logical_volume *lv; + + if (!(lv = lv_from_lvid(cmd, lvid_s))) + return 0; + + return _lv_info(lv, 0, info); +} + /* * Returns 1 if percent set, else 0 on failure. */ diff --git a/lib/activate/activate.h b/lib/activate/activate.h index 0f2441dc0..beb2744c6 100644 --- a/lib/activate/activate.h +++ b/lib/activate/activate.h @@ -44,6 +44,8 @@ int lv_mknodes(struct cmd_context *cmd, const struct logical_volume *lv); * Returns 1 if info structure has been populated, else 0. */ int lv_info(const struct logical_volume *lv, struct lvinfo *info); +int lv_info_by_lvid(struct cmd_context *cmd, const char *lvid_s, + struct lvinfo *info); /* * Returns 1 if activate_lv has been set: 1 = activate; 0 = don't. -- 2.43.5