1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
/*
* lib/part/close.c
*
* Copyright (C) 1997,1998 Russell King
*/
#include <stdlib.h>
#include "util/debug.h"
#include "part/part.h"
/* Prototype: part_t *part_close (part_t *part)
* Function : Close and free all memory associated with this partition device.
* Params : part - partitionable device to close
* Returns : NULL
* Notes : If changes are outstanding, discard the changes.
*/
part_t *part_close (part_t *part)
{
dbg_printf ("part_close()");
dbg_level_up ();
if (part) {
blkio_close (part->blkio);
if (part->partinfo)
free (part->partinfo);
free (part);
}
dbg_level_down ();
dbg_printf ("ret=NULL");
return NULL;
}
|