diff --git a/kaleid/kernel/sh/shcmds.c b/kaleid/kernel/sh/shcmds.c index f563634..2839796 100644 --- a/kaleid/kernel/sh/shcmds.c +++ b/kaleid/kernel/sh/shcmds.c @@ -127,20 +127,20 @@ error_t CmdDie(int argc, char **argv, char *cmdline) error_t CmdDumpATASect(int argc, char **argv, char *cmdline) { - char sector[1024] = {0}; + char sector[512] = {0}; int sectNumber = ShAtoi(argv[1]); - int nb = ShAtoi(argv[2]); + int nb = 1; //ShAtoi(argv[2]); int x = 0; int step = 16; - if (!sectNumber) { + if (sectNumber <= 0 || sectNumber > 255) { KernLog("Bad argument\n\n"); return EINVAL; } if (!nb) nb = 1; - KernLog("Sector number: %d\n", sectNumber); + KernLog("Sector begin: %d\n", (sectNumber - 1)*512); IoReadATA(sector, nb, sectNumber);