CeDOS - src/shell/ls.c

src/shell/ls.c (view raw)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include "cedos.h"
#include "stdio.h"

#include <stdint.h>

void main(char *args) {
    char buffer[256];

    int index = 0;

    while (1) {
        int next = dir_next(2, index, buffer);

        if (next == -1) { return; }

        printf("%s\n", buffer);
        index = next;
    }
}