sandboxblockdev.h 572 B

1234567891011121314151617181920212223242526
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * Copyright (c) 2013, Henrik Nordstrom <henrik@henriknordstrom.net>
  4. */
  5. #ifndef __SANDBOX_BLOCK_DEV__
  6. #define __SANDBOX_BLOCK_DEV__
  7. struct host_block_dev {
  8. #ifndef CONFIG_BLK
  9. struct blk_desc blk_dev;
  10. #endif
  11. char *filename;
  12. int fd;
  13. };
  14. /**
  15. * host_dev_bind() - Bind or unbind a device
  16. *
  17. * @dev: Device number (0=first slot)
  18. * @filename: Host filename to use, or NULL to unbind
  19. * @removable: true if the block device should mark itself as removable
  20. */
  21. int host_dev_bind(int dev, char *filename, bool removable);
  22. #endif