Beispiel #1
0
void fdisk_reset_ask(struct fdisk_ask *ask)
{
	assert(ask);
	free(ask->query);

	if (fdisk_is_ask(ask, MENU))
		fdisk_ask_menu_reset_items(ask);

	memset(ask, 0, sizeof(*ask));
}
Beispiel #2
0
void fdisk_reset_ask(struct fdisk_ask *ask)
{
	int refcount;

	assert(ask);
	free(ask->query);

	DBG(ASK, ul_debugobj(ask, "reset"));
	refcount = ask->refcount;

	if (fdisk_is_ask(ask, MENU))
		fdisk_ask_menu_reset_items(ask);

	memset(ask, 0, sizeof(*ask));
	ask->refcount = refcount;
}