From 6dee7dc521b6fe4928f4352ef1ef6af3852d410f Mon Sep 17 00:00:00 2001 From: keni Date: Sun, 17 Feb 2008 23:49:47 +0000 Subject: [PATCH] Placeholder for Amiga large disks (untested) placeholder so we don't lose large disk fix, but I can't test it --- sys/amiga/amidos.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sys/amiga/amidos.c b/sys/amiga/amidos.c index 90fdccf73..b4a19cdc8 100644 --- a/sys/amiga/amidos.c +++ b/sys/amiga/amidos.c @@ -119,7 +119,15 @@ long freediskspace(path) char *path; { +#ifdef UNTESTED + /* these changes from Patric Mueller for AROS to + * handle larger disks. Also needs limits.h and aros/oldprograms.h + * for AROS. (keni) + */ + unsigned long long freeBytes = 0; +#else register long freeBytes = 0; +#endif register struct InfoData *infoData; /* Remember... longword aligned */ char fileName[32]; @@ -160,6 +168,9 @@ char *path; freeBytes = infoData->id_NumBlocks - infoData->id_NumBlocksUsed; freeBytes -= (freeBytes + EXTENSION) / (EXTENSION + 1); freeBytes *= infoData->id_BytesPerBlock; +#ifdef UNTESTED + if (freeBytes > LONG_MAX) { freeBytes = LONG_MAX; } +#endif } if (freeBytes < 0) freeBytes = 0;