[maemo-commits] [maemo-commits] r14311 - in projects/haf/trunk/dosfstools/debian: . patches
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Thu Oct 4 10:08:07 EEST 2007
- Previous message: [maemo-commits] r14310 - in projects/haf/trunk/hildon-desktop: . libhildondesktop
- Next message: [maemo-commits] r14312 - projects/haf/trunk/dosfstools/debian
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: kihamala Date: 2007-10-04 10:08:06 +0300 (Thu, 04 Oct 2007) New Revision: 14311 Added: projects/haf/trunk/dosfstools/debian/patches/08-limit-cluster-msg.patch Modified: projects/haf/trunk/dosfstools/debian/changelog Log: added limit for 'Cluster N out of range' messages Modified: projects/haf/trunk/dosfstools/debian/changelog =================================================================== --- projects/haf/trunk/dosfstools/debian/changelog 2007-10-04 07:07:11 UTC (rev 14310) +++ projects/haf/trunk/dosfstools/debian/changelog 2007-10-04 07:08:06 UTC (rev 14311) @@ -1,6 +1,8 @@ dosfstools (2.11-0osso5~unreleased) unstable; urgency=low - * Added osso_mem* magic. Fixes: NB#71826 + * Added osso_mem* magic, preventing eating all system memory. Fixes: NB#71826 + * Added a limit for the 'Cluster N out of range...' messages. + Fixes: NB#71620 -- Kimmo Hämäläinen <kimmo.hamalainen at nokia.com> Thu, 4 Oct 2007 09:48:06 +0300 Added: projects/haf/trunk/dosfstools/debian/patches/08-limit-cluster-msg.patch =================================================================== --- projects/haf/trunk/dosfstools/debian/patches/08-limit-cluster-msg.patch 2007-10-04 07:07:11 UTC (rev 14310) +++ projects/haf/trunk/dosfstools/debian/patches/08-limit-cluster-msg.patch 2007-10-04 07:08:06 UTC (rev 14311) @@ -0,0 +1,30 @@ +diff -pur dosfstools-2.11/dosfsck/fat.c dosfstools-2.11.new/dosfsck/fat.c +--- dosfstools-2.11/dosfsck/fat.c 2003-06-14 23:03:20.000000000 +0300 ++++ dosfstools-2.11.new/dosfsck/fat.c 2007-10-04 10:05:32.673762744 +0300 +@@ -53,6 +53,7 @@ void read_fat(DOS_FS *fs) + unsigned long i; + void *first,*second,*use; + int first_ok,second_ok; ++ int msg_to_print = 100, total_msg = 0, msg_printed = 0; + + eff_size = ((fs->clusters+2)*fs->fat_bits+7)/8; + first = alloc(eff_size); +@@ -102,10 +103,18 @@ void read_fat(DOS_FS *fs) + for (i = 2; i < fs->clusters+2; i++) + if (fs->fat[i].value >= fs->clusters+2 && + (fs->fat[i].value < FAT_MIN_BAD(fs))) { ++ if (msg_to_print >= msg_printed) { + printf("Cluster %ld out of range (%ld > %ld). Setting to EOF.\n", + i-2,fs->fat[i].value,fs->clusters+2-1); ++ ++msg_printed; ++ } + set_fat(fs,i,-1); ++ ++total_msg; + } ++ if (total_msg - msg_printed > 0) { ++ printf("Skipped %d 'Cluster N out of range...' messages.\n", ++ total_msg - msg_printed); ++ } + free(first); + if (second) + free(second);
- Previous message: [maemo-commits] r14310 - in projects/haf/trunk/hildon-desktop: . libhildondesktop
- Next message: [maemo-commits] r14312 - projects/haf/trunk/dosfstools/debian
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]