diff --git a/kernel/kalloc.c b/kernel/kalloc.c index fa6a0ac..0699e7e 100644 --- a/kernel/kalloc.c +++ b/kernel/kalloc.c @@ -39,7 +39,7 @@ freerange(void *pa_start, void *pa_end) kfree(p); } -// Free the page of physical memory pointed at by v, +// Free the page of physical memory pointed at by pa, // which normally should have been returned by a // call to kalloc(). (The exception is when // initializing the allocator; see kinit above.) diff --git a/kernel/printf.c b/kernel/printf.c index e1347de..1a50203 100644 --- a/kernel/printf.c +++ b/kernel/printf.c @@ -109,6 +109,7 @@ printf(char *fmt, ...) break; } } + va_end(ap); if(locking) release(&pr.lock); diff --git a/mkfs/mkfs.c b/mkfs/mkfs.c index 9ad4abb..1ec326b 100644 --- a/mkfs/mkfs.c +++ b/mkfs/mkfs.c @@ -42,7 +42,7 @@ uint ialloc(ushort type); void iappend(uint inum, void *p, int n); void die(const char *); -// convert to intel byte order +// convert to riscv byte order ushort xshort(ushort x) { diff --git a/user/ls.c b/user/ls.c index b54d951..c67b84b 100644 --- a/user/ls.c +++ b/user/ls.c @@ -42,6 +42,7 @@ ls(char *path) } switch(st.type){ + case T_DEVICE: case T_FILE: printf("%s %d %d %l\n", fmtname(path), st.type, st.ino, st.size); break;