1
0
Fork 0
forked from len0rd/rockbox

Made the fat test code compile again.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29456 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Björn Stenberg 2011-02-28 10:48:58 +00:00
parent d8f6c75ab9
commit 3a5eaa8fa9
5 changed files with 38 additions and 41 deletions

View file

@ -8,14 +8,15 @@
#include "disk.h"
#include "dir.h"
#include "file.h"
#include "ata.h"
void dbg_dump_sector(int sec);
void dbg_dump_buffer(unsigned char *buf, int len, int offset);
void dbg_console(void);
void mutex_init(void* l) {}
void mutex_lock(void* l) {}
void mutex_unlock(void* l) {}
void mutex_init(struct mutex* l) {}
void mutex_lock(struct mutex* l) {}
void mutex_unlock(struct mutex* l) {}
void panicf( char *fmt, ...)
{
@ -49,7 +50,7 @@ void dbg_dump_sector(int sec)
{
unsigned char buf[512];
ata_read_sectors(sec,1,buf);
storage_read_sectors(sec,1,buf);
DEBUGF("---< Sector %d >-----------------------------------------\n", sec);
dbg_dump_buffer(buf, 512, 0);
}
@ -92,8 +93,7 @@ void dbg_dir(char* currdir)
if (dir)
{
while ( (entry = readdir(dir)) ) {
DEBUGF("%15s (%d bytes) %x\n",
entry->d_name, entry->size, entry->startcluster);
DEBUGF("%15s %lx\n", entry->d_name, entry->startcluster);
}
closedir(dir);
}
@ -508,7 +508,7 @@ int dbg_mkdir(char* name)
{
int fd;
fd = mkdir(name, 0);
fd = mkdir(name);
if (fd<0) {
DEBUGF("Failed creating directory\n");
return -1;
@ -565,7 +565,7 @@ int dbg_cmd(int argc, char *argv[])
if (!strcasecmp(cmd, "ds"))
{
if ( arg1 ) {
DEBUGF("secnum: %d\n", strtol(arg1, NULL, 0));
DEBUGF("secnum: %ld\n", strtol(arg1, NULL, 0));
dbg_dump_sector(strtol(arg1, NULL, 0));
}
}