1
0
Fork 0
forked from len0rd/rockbox

more long policy

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6065 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jean-Philippe Bernardy 2005-02-25 18:50:16 +00:00
parent 5786b384ab
commit fc19445ba0
5 changed files with 17 additions and 17 deletions

View file

@ -43,7 +43,7 @@ static int format(
char *str;
char tmpbuf[12], pad;
int ch, width, val, sign;
long lval;
long lval, lsign;
unsigned int uval;
unsigned long ulval;
bool ok = true;
@ -116,7 +116,7 @@ static int format(
while (ulval);
break;
case 'd':
lval = sign = va_arg (ap, long);
lval = lsign = va_arg (ap, long);
if (lval < 0)
lval = -lval;
do
@ -125,7 +125,7 @@ static int format(
lval /= 10;
}
while (lval > 0);
if (sign < 0)
if (lsign < 0)
*--str = '-';
break;

View file

@ -243,7 +243,7 @@ bool old_recorder = false;
int ata_spinup_time = 0;
static bool spinup = false;
static bool sleeping = true;
static int sleep_timeout = 5*HZ;
static long sleep_timeout = 5*HZ;
static bool poweroff = false;
#ifdef HAVE_ATA_POWER_OFF
static int poweroff_timeout = 2*HZ;
@ -270,7 +270,7 @@ static int set_features(void);
static int wait_for_bsy(void) __attribute__ ((section (".icode")));
static int wait_for_bsy(void)
{
int timeout = current_tick + HZ*30;
long timeout = current_tick + HZ*30;
while (TIME_BEFORE(current_tick, timeout) && (ATA_STATUS & STATUS_BSY)) {
last_disk_activity = current_tick;
yield();
@ -285,7 +285,7 @@ static int wait_for_bsy(void)
static int wait_for_rdy(void) __attribute__ ((section (".icode")));
static int wait_for_rdy(void)
{
int timeout;
long timeout;
if (!wait_for_bsy())
return 0;
@ -479,7 +479,7 @@ int ata_read_sectors(IF_MV2(int drive,)
void* inbuf)
{
int ret = 0;
int timeout;
long timeout;
int count;
void* buf;
long spinup_start;
@ -762,7 +762,7 @@ int ata_write_sectors(IF_MV2(int drive,)
{
int i;
int ret = 0;
int spinup_start;
long spinup_start;
#ifdef HAVE_MULTIVOLUME
(void)drive; /* unused for now */

View file

@ -629,7 +629,7 @@ static void flush_fat_sector(struct fat_cache_entry *fce,
sectorbuf);
if(rc < 0)
{
panicf("flush_fat_sector() - Could not write sector %d"
panicf("flush_fat_sector() - Could not write sector %ld"
" (error %d)\n",
secnum, rc);
}
@ -649,7 +649,7 @@ static void flush_fat_sector(struct fat_cache_entry *fce,
secnum, 1, sectorbuf);
if(rc < 0)
{
panicf("flush_fat_sector() - Could not write sector %d"
panicf("flush_fat_sector() - Could not write sector %ld"
" (error %d)\n",
secnum, rc);
}
@ -832,15 +832,15 @@ static int update_fat_entry(IF_MV2(struct bpb* fat_bpb,)
{
long sector = entry / CLUSTERS_PER_FAT_SECTOR;
int offset = entry % CLUSTERS_PER_FAT_SECTOR;
long unsigned int* sec;
unsigned long* sec;
LDEBUGF("update_fat_entry(%lx,%lx)\n",entry,val);
if (entry==val)
panicf("Creating FAT loop: %x,%x\n",entry,val);
panicf("Creating FAT loop: %lx,%lx\n",entry,val);
if ( entry < 2 )
panicf("Updating reserved FAT entry %d.\n",entry);
panicf("Updating reserved FAT entry %ld.\n",entry);
sec = cache_fat_sector(IF_MV2(fat_bpb,) sector, true);
if (!sec)
@ -2012,9 +2012,9 @@ static int transfer(IF_MV2(struct bpb* fat_bpb,)
firstallowed = fat_bpb->firstdatasector;
if (start < firstallowed)
panicf("Write %d before data\n", firstallowed - start);
panicf("Write %ld before data\n", firstallowed - start);
if (start + count > fat_bpb->totalsectors)
panicf("Write %d after data\n",
panicf("Write %ld after data\n",
start + count - fat_bpb->totalsectors);
rc = ata_write_sectors(IF_MV2(fat_bpb->drive,)
start + fat_bpb->startsector, count, buf);

View file

@ -68,7 +68,7 @@ struct fat_dir
{
unsigned int entry;
unsigned int entrycount;
int sector;
long sector;
struct fat_file file;
unsigned char sectorcache[3][SECTOR_SIZE];
};

View file

@ -289,7 +289,7 @@ static void tick_start(unsigned int interval_in_ms)
if(count > 0xffffL)
{
panicf("Error! The tick interval is too long (%dms->%x)\n",
panicf("Error! The tick interval is too long (%dms->%lx)\n",
interval_in_ms, count);
return;
}