mgmt_remove.c revision 36c5fee33fa8b822175d410202aebcf592c8d342
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* This file deals with XML data for removing various configuration data.
*/
#include <errno.h>
#include <strings.h>
#include <unistd.h>
#include "utility.h"
#include "xml.h"
#include "queue.h"
#include "target.h"
#include "iscsi_cmd.h"
#include "errcode.h"
static char *remove_target(xml_node_t *x);
static char *remove_initiator(xml_node_t *x);
static char *remove_tpgt(xml_node_t *x);
/*ARGSUSED*/
void
{
xml_node_t *x;
char msgbuf[80],
} else {
x = p->x_child;
reply_msg = remove_target(x);
reply_msg = remove_initiator(x);
reply_msg = remove_tpgt(x);
} else {
"Unknown object '%s' for delete element",
x->x_name);
}
}
}
static char *
{
*list,
*c = NULL;
int lun_num;
return (msg);
}
NULL) {
break;
}
return (msg);
}
return (msg);
}
NULL) {
return (msg);
}
goto error;
}
xml_free_node(c);
change_made = True;
}
return (msg);
}
NULL) {
return (msg);
}
goto error;
}
xml_free_node(c);
change_made = True;
}
False) {
return (msg);
}
/*
* Save the iscsi-name which we'll need to remove LUNs.
*/
False) {
return (msg);
}
goto error;
change_made = True;
}
if (change_made == True) {
} else {
}
return (msg);
if (c != NULL)
xml_free_node(c);
return (msg);
}
static char *
{
*name;
return (msg);
}
NULL) {
break;
}
return (msg);
}
return (msg);
}
return (msg);
}
static char *
{
*c = NULL;
return (msg);
}
NULL) {
break;
}
return (msg);
}
return (msg);
}
goto error;
}
xml_free_node(c);
change_made = True;
}
if ((change_made != True) &&
change_made = True;
}
if (change_made == True) {
} else {
}
return (msg);
if (c != NULL)
xml_free_node(c);
return (msg);
}