From bce944d1498eaa3b6940ee234c863b3548a66b37 Mon Sep 17 00:00:00 2001 From: Benji Dial Date: Sun, 24 Jan 2021 12:00:11 -0500 Subject: graphics! --- src/user/knob/file.c | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) (limited to 'src/user/knob/file.c') diff --git a/src/user/knob/file.c b/src/user/knob/file.c index f1a039d..3083503 100644 --- a/src/user/knob/file.c +++ b/src/user/knob/file.c @@ -1,8 +1,9 @@ -#include -#include #include +#include #include -#include + +#include +#include struct ofl_node { struct ofl_node *next; @@ -27,23 +28,10 @@ struct file { }; const char *remove_prefix(const char *path, uint8_t *dn_out) { - if ((path[0] != 's') || (path[1] != 'd')) - goto no_prefix; - - const char *num_part = path + 2; - for (uint32_t i = 0; num_part[i]; ++i) - if (num_part[i] == ':') { - - uint32_t dn_large; - if (!try_sntoi(num_part, i, &dn_large) || dn_large > 255) - goto no_prefix; - - *dn_out = (uint8_t)dn_large; - return num_part + i + 1; - } + if ((path[0] == 's') && (path[1] == 'd')) + PANIC("remove_prefix not fully implemented"); -no_prefix: - *dn_out = current_drive; + *dn_out = 0;//change this later to an "active drive" or something return path; } -- cgit v1.2.3