share.h 701 B

12345678910111213141516171819202122
  1. /* /share: writable, page-backed in-memory filesystem (see share.c).
  2. *
  3. * The board is usually netbooted without a writable disk, so the WebDAV
  4. * server needs somewhere to put uploads. Names are plain strings (not 8.3)
  5. * and may contain spaces; everything is volatile (a reboot/kexec starts
  6. * empty). The VFS mounts it at /share. */
  7. #ifndef SHARE_H
  8. #define SHARE_H
  9. struct fs_ops;
  10. #define SHARE_PATH_MAX 64
  11. #define SHARE_MAX_ENTRIES 64
  12. #define SHARE_MAX_BYTES (16u * 1024u * 1024u)
  13. /* Allocate the entry table. Idempotent; 0 when ready, -1 when out of
  14. * memory. Files added before a second call are preserved. */
  15. int share_init(void);
  16. extern const struct fs_ops share_ops;
  17. #endif