1
0
Fork 0
forked from len0rd/rockbox

Fixed warnings.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2876 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Björn Stenberg 2002-11-22 23:55:08 +00:00
parent b5184d761b
commit ac88b9e5ff
2 changed files with 15 additions and 5 deletions

View file

@ -173,6 +173,12 @@ int ata_read_sectors(unsigned long start,
int count;
void* buf;
if ( incount > 1 )
DEBUGF("[Reading %d blocks: 0x%x to 0x%x]\n",
incount, start, start+incount-1);
else
DEBUGF("[Reading block 0x%x]\n", start);
last_disk_activity = current_tick;
mutex_lock(&ata_mtx);

View file

@ -638,6 +638,7 @@ static int flush_fat(void)
return 0;
}
#ifdef HAVE_RTC
static void fat_time(unsigned short* date,
unsigned short* time,
unsigned short* tenth )
@ -657,6 +658,7 @@ static void fat_time(unsigned short* date,
if (tenth)
*tenth = (tm->tm_sec & 1) * 100;
}
#endif
static int write_long_name(struct fat_file* file,
unsigned int firstentry,
@ -1044,7 +1046,6 @@ static int update_file_size( struct fat_file* file, int size )
unsigned int* sizeptr;
unsigned short* clusptr;
struct fat_file dir;
unsigned short date=0, time=0;
int err;
LDEBUGF("update_file_size(cluster:%x entry:%d size:%d)\n",
@ -1076,10 +1077,13 @@ static int update_file_size( struct fat_file* file, int size )
*sizeptr = SWAB32(size);
#ifdef HAVE_RTC
{
unsigned short date=0, time=0;
fat_time(&date, &time, NULL);
*(unsigned short*)(entry + FATDIR_WRTTIME) = SWAB16(time);
*(unsigned short*)(entry + FATDIR_WRTDATE) = SWAB16(date);
*(unsigned short*)(entry + FATDIR_LSTACCDATE) = SWAB16(date);
}
#endif
err = fat_seek( &dir, sector );