summaryrefslogtreecommitdiff
path: root/src/user/knob/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/user/knob/file.c')
-rw-r--r--src/user/knob/file.c20
1 files changed, 3 insertions, 17 deletions
diff --git a/src/user/knob/file.c b/src/user/knob/file.c
index 283f984..8d7a327 100644
--- a/src/user/knob/file.c
+++ b/src/user/knob/file.c
@@ -28,19 +28,8 @@ struct file {
uint32_t length;
};
-const char *remove_prefix(const char *path, uint8_t *dn_out) {
- if ((path[0] == 's') && (path[1] == 'd'))
- PANIC("remove_prefix not fully implemented");
-
- *dn_out = 0;//change this later to an "active drive" or something
- return path;
-}
-
struct file *open_file(const char *path) {
- uint8_t dn;
- path = remove_prefix(path, &dn);
-
- _file_handle_t h = _open_file(dn, path);
+ _file_handle_t h = _open_file(0, path);
if (!h)
return 0;
@@ -131,16 +120,13 @@ void trunc_file(struct file *f) {
//return value must be manually freed, unless it is a null pointer
_dir_info_entry_t *get_directory_info(const char *path, uint32_t *count_out) {
- uint8_t dn;
- path = remove_prefix(path, &dn);
-
- uint32_t count = _count_of_dir(dn, path);
+ uint32_t count = _count_of_dir(0, path);
if (!count) {
*count_out = 0;
return 0;
}
_dir_info_entry_t *buffer = get_block(count * sizeof(_dir_info_entry_t));
- *count_out = _enumerate_dir(dn, path, buffer, count);
+ *count_out = _enumerate_dir(0, path, buffer, count);
return buffer;
} \ No newline at end of file