[Ocfs2-tools-devel] [PATCH 03/25] o2cb_config: Add o2cb_config_remove_cluster()
Joel Becker
Joel.Becker at oracle.com
Wed Jun 23 18:56:03 PDT 2010
On Wed, Jun 23, 2010 at 11:44:13AM -0700, Sunil Mushran wrote:
> o2cb_config_remove_cluster() added to allow removal of cluster from the config.
>
> Signed-off-by: Sunil Mushran <sunil.mushran at oracle.com>
> ---
> o2cb_ctl/o2cb_config.c | 15 +++++++++++++++
> o2cb_ctl/o2cb_config.h | 3 +--
> 2 files changed, 16 insertions(+), 2 deletions(-)
>
> diff --git a/o2cb_ctl/o2cb_config.c b/o2cb_ctl/o2cb_config.c
> index 224c69d..dd46089 100644
> --- a/o2cb_ctl/o2cb_config.c
> +++ b/o2cb_ctl/o2cb_config.c
> @@ -631,6 +631,21 @@ O2CBCluster *o2cb_config_add_cluster(O2CBConfig *config,
> return cluster;
> } /* o2cb_cluster_add_cluster() */
>
> +gint o2cb_config_remove_cluster(O2CBConfig *config, const gchar *name)
> +{
> + O2CBCluster *cluster;
> +
> + g_return_val_if_fail(config != NULL, -1);
> + cluster = o2cb_config_get_cluster_by_name(config, name);
> + if (!cluster)
> + return -1;
Return -ENOENT here.
Joel
--
"The trouble with being punctual is that nobody's there to
appreciate it."
- Franklin P. Jones
Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127
More information about the Ocfs2-tools-devel
mailing list