Add writing to existing files and overwriting cp
This commit is contained in:
@@ -51,12 +51,12 @@ static void append_sequence(const char *s) {
|
||||
}
|
||||
}
|
||||
|
||||
static uint64_t stream_write(__attribute__((unused)) const stream_t *self, __attribute__((unused)) const char *from,
|
||||
static uint64_t stream_write(__attribute__((unused)) stream_t *self, __attribute__((unused)) const char *from,
|
||||
__attribute__((unused)) uint64_t bytes) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
static uint64_t stream_read(__attribute__((unused)) const stream_t *self, uint64_t max, char *to) {
|
||||
static uint64_t stream_read(__attribute__((unused)) stream_t *self, uint64_t max, char *to) {
|
||||
while (!buffer_length) {
|
||||
__asm__ volatile("sti");
|
||||
process_next();
|
||||
@@ -79,10 +79,14 @@ static uint64_t stream_read(__attribute__((unused)) const stream_t *self, uint64
|
||||
return size;
|
||||
}
|
||||
|
||||
static uint64_t stream_truncate(__attribute__((unused)) stream_t *self, __attribute__((unused)) uint64_t size) {
|
||||
return size;
|
||||
}
|
||||
|
||||
static void stream_close(__attribute__((unused)) stream_t *self) {
|
||||
}
|
||||
|
||||
static stream_t stream = {stream_write, stream_read, stream_close};
|
||||
static stream_t stream = {stream_write, stream_read, stream_truncate, stream_close};
|
||||
|
||||
static void on_key(uint8_t scancode) {
|
||||
const uint8_t pressed = !(scancode & 0x80);
|
||||
|
||||
Reference in New Issue
Block a user