From b57247e8aa760d448f0704520da1e0f82a881250 Mon Sep 17 00:00:00 2001 From: Ali Mashtizadeh Date: Tue, 28 Nov 2023 23:42:11 -0500 Subject: [PATCH] Print usage in kernel debugger for pci, debug and disk functions. --- sys/dev/pci.c | 1 + sys/kern/debug.c | 6 ++++-- sys/kern/disk.c | 3 ++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/sys/dev/pci.c b/sys/dev/pci.c index fec4cb8..500765a 100644 --- a/sys/dev/pci.c +++ b/sys/dev/pci.c @@ -397,6 +397,7 @@ Debug_PCIDump(int argc, const char *argv[]) uint32_t bar; if (argc != 4) { + kprintf("pcidump requires 3 arguments!\n"); kprintf("Usage: pcidump \n"); return; } diff --git a/sys/kern/debug.c b/sys/kern/debug.c index 95aa9e3..8a186f6 100644 --- a/sys/kern/debug.c +++ b/sys/kern/debug.c @@ -208,7 +208,8 @@ Debug_Dump(int argc, const char *argv[]) if (argc != 3) { - kprintf("Dump requires 3 arguments\n"); + kprintf("dump requires 2 arguments!\n"); + kprintf("Usage: dump \n"); return; } @@ -227,7 +228,8 @@ Debug_Disasm(int argc, const char *argv[]) int len = 1; if (argc != 2 && argc != 3) { - kprintf("Disasm requires 2 or 3 arguments\n"); + kprintf("disasm requires 1 or 2 arguments!\n"); + kprintf("Usage: disasm []\n"); return; } diff --git a/sys/kern/disk.c b/sys/kern/disk.c index e594c64..c3be235 100644 --- a/sys/kern/disk.c +++ b/sys/kern/disk.c @@ -80,7 +80,8 @@ Debug_DumpDisk(int argc, const char *argv[]) SGArray sga; if (argc != 4) { - kprintf("dumpdisk requires 4 arguments!\n"); + kprintf("dumpdisk requires 3 arguments\n"); + kprintf("Usage: dumpdisk \n"); return; }