dosfsck -V gives doubled file count

Bug #381520 reported by Jeffry Johnston
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dosfstools (Ubuntu)
New
Undecided
Unassigned

Bug Description

Release of Ubuntu:
Description: Ubuntu 8.04.2
Release: 8.04

Version of the package:
dosfstools:
  Installed: 2.11-2.3ubuntu1
  Candidate: 2.11-2.3ubuntu1
  Version table:
 *** 2.11-2.3ubuntu1 0
        500 http://us.archive.ubuntu.com hardy/main Packages
        100 /var/lib/dpkg/status

Expected:
~>sudo dosfsck /dev/sdb1
dosfsck 2.11, 12 Mar 2005, FAT32, LFN
/dev/sdb1: 846 files, 449437/481366 clusters

~>sudo dosfsck -V /dev/sdb1
dosfsck 2.11, 12 Mar 2005, FAT32, LFN
Starting check/repair pass.
Starting verification pass.
/dev/sdb1: 846 files, 449437/481366 clusters

Actual:
~>sudo dosfsck /dev/sdb1
dosfsck 2.11, 12 Mar 2005, FAT32, LFN
/dev/sdb1: 846 files, 449437/481366 clusters

~>sudo dosfsck -V /dev/sdb1
dosfsck 2.11, 12 Mar 2005, FAT32, LFN
Starting check/repair pass.
Starting verification pass.
/dev/sdb1: 1692 files, 449437/481366 clusters

I suspect it is counting the files on both the first and second passes, without resetting the count, and that is why I am seeing a doubled result (846 * 2 = 1692).

I can think of 3 possible fixes right now: 1) store the count in a separate variable from the first pass, 2) keep track of the pass and only count during one of them, 3) or clear the count to 0 when starting the second pass.

description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.