From a2e4051b9932cba9d0b8d858044b09bf421f68c7 Mon Sep 17 00:00:00 2001 From: Ravjot Singh Samra Date: Tue, 28 Dec 2021 13:53:42 +1300 Subject: [PATCH 1/4] Added missing va_end(). --- kernel/printf.c | 1 + 1 file changed, 1 insertion(+) 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); From c1c16269b1991e1e1be16887d3e21d0f7e5f8d19 Mon Sep 17 00:00:00 2001 From: mrm Date: Tue, 28 Dec 2021 07:06:14 +0900 Subject: [PATCH 2/4] fix comment in mkfs.c --- mkfs/mkfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { From 9f3673c4da3c2a829fe74f4b950c50568ca937dc Mon Sep 17 00:00:00 2001 From: WaheedHafez Date: Fri, 19 Nov 2021 18:45:49 +0200 Subject: [PATCH 3/4] fix 'kfree' comment in kalloc.c 'kfree' has a parameter named 'pa' but referenced in the comment as 'v'. --- kernel/kalloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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.) From 2462656f215822ffb3bcd854ddc68b3894058c59 Mon Sep 17 00:00:00 2001 From: John Jolly Date: Sat, 6 Nov 2021 04:47:37 +0000 Subject: [PATCH 4/4] [user/ls]: List specific device file When using the ls userspace program to list a specific device file, nothing would be displayed. This was because ls only tests for T_FILE and T_DIR. T_DEVICE files would fall through the case block. Adding T_DEVICE to the T_FILE case allows a device file to be listed. $ ls console console 3 19 0 --- user/ls.c | 1 + 1 file changed, 1 insertion(+) 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;