00001 /* 00002 Copyright (C) 2015- The University of Notre Dame 00003 This software is distributed under the GNU General Public License. 00004 See the file COPYING for details. 00005 */ 00006 00007 #include <stdint.h> 00008 #ifndef DISK_ALLOC_H 00009 #define DISK_ALLOC_H 00010 00011 /* The disk_alloc_create function instantiates 00012 * a virtual device and creates a file system 00013 * generated at the user defined location with 00014 * a maximum capacity given by the user defined 00015 * size. 00016 * @param loc: Location for disk allocation. 00017 * @param size: The size to set the file 00018 * system's capacity (in KB). 00019 * @return: Return 0 on success, else -1. 00020 */ 00021 int disk_alloc_create(char *loc, char *fs, int64_t size); 00022 00023 /* The disk_alloc_delete functions deletes 00024 * a file system at the user defined location. 00025 * @param loc: Location of the disk allocation 00026 * to be deleted. 00027 * @return: Return 0 on success, else -1. 00028 */ 00029 int disk_alloc_delete(char *loc); 00030 #endif