From 1d69a46f5d9823bbf2e6211ca367b409d2d5f7a7 Mon Sep 17 00:00:00 2001 From: Benji Dial Date: Mon, 1 Mar 2021 22:35:26 -0500 Subject: minimal file writing, shutdown keybinding (Win+Shift+Q) --- src/kernel/drive.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/kernel/drive.h') diff --git a/src/kernel/drive.h b/src/kernel/drive.h index 03fe4b6..93811e8 100644 --- a/src/kernel/drive.h +++ b/src/kernel/drive.h @@ -33,7 +33,10 @@ struct drive { file_id_t (*get_file) (const struct drive *d, const char *path); void (*free_file) (const struct drive *d, file_id_t fid); void (*load_sector) (const struct drive *d, file_id_t fid, uint32_t sector, void *at); + void (*save_sector) (const struct drive *d, file_id_t fid, uint32_t sector, const void *from); + bool (*is_writable) (const struct drive *d, file_id_t fid); uint32_t (*get_file_length) (const struct drive *d, file_id_t fid); + void (*set_file_length) (const struct drive *d, file_id_t fid, uint32_t new_len); uint32_t (*enumerate_dir) (const struct drive *d, const char *path, struct directory_content_info *info, uint32_t max); uint32_t (*n_dir_entries) (const struct drive *d, const char *path); uint32_t (*get_free_sectors)(const struct drive *d); -- cgit v1.2.3