diff options
author | Björn Stenberg <bjorn@haxx.se> | 2002-11-22 23:55:08 +0000 |
---|---|---|
committer | Björn Stenberg <bjorn@haxx.se> | 2002-11-22 23:55:08 +0000 |
commit | ac88b9e5ff8bc16f93a8454e3b5e42c97c408ff0 (patch) | |
tree | 047dcec1a1d18f911d40be7de602dd43c43a5525 /firmware/drivers | |
parent | b5184d761b9c3b0fa79ba891ae148b0a44f13757 (diff) | |
download | rockbox-ac88b9e5ff8bc16f93a8454e3b5e42c97c408ff0.tar.gz rockbox-ac88b9e5ff8bc16f93a8454e3b5e42c97c408ff0.zip |
Fixed warnings.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2876 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers')
-rw-r--r-- | firmware/drivers/ata.c | 6 | ||||
-rw-r--r-- | firmware/drivers/fat.c | 14 |
2 files changed, 15 insertions, 5 deletions
diff --git a/firmware/drivers/ata.c b/firmware/drivers/ata.c index 58349f69a6..9a61c2e0a4 100644 --- a/firmware/drivers/ata.c +++ b/firmware/drivers/ata.c | |||
@@ -173,6 +173,12 @@ int ata_read_sectors(unsigned long start, | |||
173 | int count; | 173 | int count; |
174 | void* buf; | 174 | void* buf; |
175 | 175 | ||
176 | if ( incount > 1 ) | ||
177 | DEBUGF("[Reading %d blocks: 0x%x to 0x%x]\n", | ||
178 | incount, start, start+incount-1); | ||
179 | else | ||
180 | DEBUGF("[Reading block 0x%x]\n", start); | ||
181 | |||
176 | last_disk_activity = current_tick; | 182 | last_disk_activity = current_tick; |
177 | 183 | ||
178 | mutex_lock(&ata_mtx); | 184 | mutex_lock(&ata_mtx); |
diff --git a/firmware/drivers/fat.c b/firmware/drivers/fat.c index 6418349943..907947f31b 100644 --- a/firmware/drivers/fat.c +++ b/firmware/drivers/fat.c | |||
@@ -638,6 +638,7 @@ static int flush_fat(void) | |||
638 | return 0; | 638 | return 0; |
639 | } | 639 | } |
640 | 640 | ||
641 | #ifdef HAVE_RTC | ||
641 | static void fat_time(unsigned short* date, | 642 | static void fat_time(unsigned short* date, |
642 | unsigned short* time, | 643 | unsigned short* time, |
643 | unsigned short* tenth ) | 644 | unsigned short* tenth ) |
@@ -657,6 +658,7 @@ static void fat_time(unsigned short* date, | |||
657 | if (tenth) | 658 | if (tenth) |
658 | *tenth = (tm->tm_sec & 1) * 100; | 659 | *tenth = (tm->tm_sec & 1) * 100; |
659 | } | 660 | } |
661 | #endif | ||
660 | 662 | ||
661 | static int write_long_name(struct fat_file* file, | 663 | static int write_long_name(struct fat_file* file, |
662 | unsigned int firstentry, | 664 | unsigned int firstentry, |
@@ -1044,7 +1046,6 @@ static int update_file_size( struct fat_file* file, int size ) | |||
1044 | unsigned int* sizeptr; | 1046 | unsigned int* sizeptr; |
1045 | unsigned short* clusptr; | 1047 | unsigned short* clusptr; |
1046 | struct fat_file dir; | 1048 | struct fat_file dir; |
1047 | unsigned short date=0, time=0; | ||
1048 | int err; | 1049 | int err; |
1049 | 1050 | ||
1050 | LDEBUGF("update_file_size(cluster:%x entry:%d size:%d)\n", | 1051 | 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 ) | |||
1076 | *sizeptr = SWAB32(size); | 1077 | *sizeptr = SWAB32(size); |
1077 | 1078 | ||
1078 | #ifdef HAVE_RTC | 1079 | #ifdef HAVE_RTC |
1079 | fat_time(&date, &time, NULL); | 1080 | { |
1080 | *(unsigned short*)(entry + FATDIR_WRTTIME) = SWAB16(time); | 1081 | unsigned short date=0, time=0; |
1081 | *(unsigned short*)(entry + FATDIR_WRTDATE) = SWAB16(date); | 1082 | fat_time(&date, &time, NULL); |
1082 | *(unsigned short*)(entry + FATDIR_LSTACCDATE) = SWAB16(date); | 1083 | *(unsigned short*)(entry + FATDIR_WRTTIME) = SWAB16(time); |
1084 | *(unsigned short*)(entry + FATDIR_WRTDATE) = SWAB16(date); | ||
1085 | *(unsigned short*)(entry + FATDIR_LSTACCDATE) = SWAB16(date); | ||
1086 | } | ||
1083 | #endif | 1087 | #endif |
1084 | 1088 | ||
1085 | err = fat_seek( &dir, sector ); | 1089 | err = fat_seek( &dir, sector ); |