summaryrefslogtreecommitdiff
path: root/src/kernel/drive.h
diff options
context:
space:
mode:
authorBenji Dial <benji6283@gmail.com>2021-03-01 22:35:26 -0500
committerBenji Dial <benji6283@gmail.com>2021-03-01 22:35:26 -0500
commit1d69a46f5d9823bbf2e6211ca367b409d2d5f7a7 (patch)
treea49a5498080551270a827a205cde49477d4d89ff /src/kernel/drive.h
parent6f1b50a4cc6c232ee505a543f006abb1c6cd33cf (diff)
downloadportland-os-1d69a46f5d9823bbf2e6211ca367b409d2d5f7a7.tar.gz
minimal file writing, shutdown keybinding (Win+Shift+Q)
Diffstat (limited to 'src/kernel/drive.h')
-rw-r--r--src/kernel/drive.h3
1 files changed, 3 insertions, 0 deletions
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);