added UML modeler to autotools
This commit is contained in:
@@ -39,75 +39,6 @@ static void usage()
|
||||
printf(" --help|-h show this help\n");
|
||||
}
|
||||
|
||||
#if 0
|
||||
/**
|
||||
* add an iface to a guest
|
||||
*/
|
||||
static void add_if(guest_t *guest, char *name)
|
||||
{
|
||||
iface_t *iface;
|
||||
|
||||
iface = guest->create_iface(guest, name);
|
||||
if (iface)
|
||||
{
|
||||
printf("created guest interface '%s' connected to '%s'\n",
|
||||
iface->get_guestif(iface), iface->get_hostif(iface));
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("failed to create guest interface\n");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* delete an iface from a guest
|
||||
*/
|
||||
static void del_if(guest_t *guest, char *name)
|
||||
{
|
||||
iface_t *iface;
|
||||
iterator_t *iterator;
|
||||
bool found = FALSE;
|
||||
|
||||
iterator = guest->create_iface_iterator(guest);
|
||||
while (iterator->iterate(iterator, (void**)&iface))
|
||||
{
|
||||
if (streq(name, iface->get_guestif(iface)))
|
||||
{
|
||||
iterator->remove(iterator);
|
||||
printf("removing interface '%s' ('%s') from %s\n",
|
||||
iface->get_guestif(iface), iface->get_hostif(iface),
|
||||
guest->get_name(guest));
|
||||
iface->destroy(iface);
|
||||
found = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
iterator->destroy(iterator);
|
||||
if (!found)
|
||||
{
|
||||
printf("guest '%s' has no interface named '%s'\n",
|
||||
guest->get_name(guest), name);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* list interfaces on a guest
|
||||
*/
|
||||
static void list_if(guest_t *guest)
|
||||
{
|
||||
iface_t *iface;
|
||||
iterator_t *iterator;
|
||||
|
||||
iterator = guest->create_iface_iterator(guest);
|
||||
while (iterator->iterate(iterator, (void**)&iface))
|
||||
{
|
||||
printf("'%s' => '%s'\n", iface->get_guestif(iface), iface->get_hostif(iface));
|
||||
|
||||
}
|
||||
iterator->destroy(iterator);
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* readline() wrapper
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user