From 3ba84e3fe30b968f907301e172f092dc277c95a4 Mon Sep 17 00:00:00 2001 From: Adrien Bourmault Date: Fri, 24 May 2019 11:28:18 +0200 Subject: [PATCH] Work on ATA --- kaleid/kernel/sh/shcmds.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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);