OESF Portables Forum
Model Specific Forums => Sharp Zaurus => Zaurus - pdaXrom => Topic started by: rgrep on October 16, 2004, 02:18:37 am
-
There is a bug in the dosfsck utility (part of dosfstools) which causes the following behaviour:
# dosfsck /dev/mmcd/disc0/part1
dosfsck 2.9 (15 May 2003)
dosfsck 2.9, 15 May 2003, FAT32, LFN
Logical sector size is zero.
The fixed version shows this output instead:
# dosfsck /dev/mmcd/disc0/part1
dosfsck 2.10, 22 Sep 2003, FAT32, LFN
/dev/mmcd/disc0/part1: 0 files, 0/34603 clusters
To fix the bug I had to apply the following patch to the dosfstools source code:
diff -rNu dosfstools-2.10.orig/dosfsck/boot.c dosfstools-2.10/dosfsck/boot.c
--- dosfstools-2.10.orig/dosfsck/boot.c 2003-06-15 08:03:20.000000000 +1200
+++ dosfstools-2.10/dosfsck/boot.c 2004-10-16 14:59:27.000000000 +1300
@@ -34,13 +34,13 @@
{ 0xff, "5.25\" 320k floppy 2s/40tr/8sec" },
};
-#if defined __alpha || defined __ia64__ || defined __s390x__ || defined __x86_64__ || defined __ppc64__
+#if defined __alpha || defined __ia64__ || defined __s390x__ || defined __x86_64__ || defined __ppc64__ || __arm__
/* Unaligned fields must first be copied byte-wise */
#define GET_UNALIGNED_W(f) \
({ \
unsigned short __v; \
memcpy( &__v, &f, sizeof(__v) ); \
- CF_LE_W( *(unsigned short *)&f ); \
+ CF_LE_W( *(unsigned short *)&__v ); \
})
#else
#define GET_UNALIGNED_W(f) CF_LE_W( *(unsigned short *)&f )
This patch is available from http://beer.geek.nz/software/zaurus/dosfstools/ (http://beer.geek.nz/software/zaurus/dosfstools/)
I got the idea for the fix from this Debian bug report (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=258839).
You can download the fixed dosfstools ipk from my unstable feed (http://beer.geek.nz/software/zaurus/feed/unstable/).
-
Thanks. It fixed the problem i was getting
File system has -3 clusters but only space for 1462 FAT entries...