diskutil_posix.c (986B)
1 /* see LICENSE file for copyright and license details */ 2 #include "../diskutil.h" 3 4 #include <errno.h> 5 6 /* a kernel with no backend: a device's size is what fstat says, and the 7 * list of disks is what opens under the names most systems give them */ 8 #if !(defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)) \ 9 || defined(ARUU_FORCE_POSIX) 10 void 11 blockdev_sys_size(struct BlockDev *dev) 12 { 13 (void)dev; 14 } 15 16 void 17 blockdev_sys_reread(struct BlockDev *dev) 18 { 19 (void)dev; 20 } 21 22 struct BlockDevInfo * 23 blockdev_get_list(void) 24 { 25 return blockdev_probe_list(); 26 } 27 28 int 29 blockdev_mount(const char *dev, const char *dir, const char *fstype, int flags, const char *data) 30 { 31 (void)dev; 32 (void)dir; 33 (void)fstype; 34 (void)flags; 35 (void)data; 36 errno = ENOSYS; 37 return -1; 38 } 39 40 int 41 blockdev_unmount(const char *dir) 42 { 43 (void)dir; 44 errno = ENOSYS; 45 return -1; 46 } 47 48 int 49 blockdev_poweroff(const char *disk) 50 { 51 (void)disk; 52 errno = ENOSYS; 53 return -1; 54 } 55 #endif