summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kernel/kalloc.c2
-rw-r--r--kernel/printf.c1
-rw-r--r--mkfs/mkfs.c2
-rw-r--r--user/ls.c1
4 files changed, 4 insertions, 2 deletions
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;