Work on ATA
This commit is contained in:
parent
b15c0020c3
commit
3ba84e3fe3
|
@ -127,20 +127,20 @@ error_t CmdDie(int argc, char **argv, char *cmdline)
|
||||||
|
|
||||||
error_t CmdDumpATASect(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 sectNumber = ShAtoi(argv[1]);
|
||||||
int nb = ShAtoi(argv[2]);
|
int nb = 1; //ShAtoi(argv[2]);
|
||||||
int x = 0;
|
int x = 0;
|
||||||
int step = 16;
|
int step = 16;
|
||||||
|
|
||||||
if (!sectNumber) {
|
if (sectNumber <= 0 || sectNumber > 255) {
|
||||||
KernLog("Bad argument\n\n");
|
KernLog("Bad argument\n\n");
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!nb) nb = 1;
|
if (!nb) nb = 1;
|
||||||
|
|
||||||
KernLog("Sector number: %d\n", sectNumber);
|
KernLog("Sector begin: %d\n", (sectNumber - 1)*512);
|
||||||
|
|
||||||
IoReadATA(sector, nb, sectNumber);
|
IoReadATA(sector, nb, sectNumber);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue