~ubuntu-branches/ubuntu/wily/dosfstools/wily-proposed

« back to all changes in this revision

Viewing changes to src/fsck.fat.c

  • Committer: Package Import Robot
  • Author(s): Daniel Baumann
  • Date: 2014-01-17 07:14:46 UTC
  • mfrom: (4.3.13 experimental)
  • Revision ID: package-import@ubuntu.com-20140117071446-rs9c3tpoyh7z17ta
Tags: 3.0.25-1
MergingĀ upstreamĀ versionĀ 3.0.25.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 
3
3
   Copyright (C) 1993 Werner Almesberger <werner.almesberger@lrc.di.epfl.ch>
4
4
   Copyright (C) 1998 Roman Hodek <Roman.Hodek@informatik.uni-erlangen.de>
5
 
   Copyright (C) 2008-2013 Daniel Baumann <mail@daniel-baumann.ch>
 
5
   Copyright (C) 2008-2014 Daniel Baumann <mail@daniel-baumann.ch>
6
6
 
7
7
   This program is free software: you can redistribute it and/or modify
8
8
   it under the terms of the GNU General Public License as published by
105
105
{
106
106
    DOS_FS fs;
107
107
    int salvage_files, verify, c;
108
 
    unsigned n_files_check = 0, n_files_verify = 0;
109
 
    unsigned long free_clusters = 0;
 
108
    uint32_t free_clusters = 0;
110
109
 
111
110
    memset(&fs, 0, sizeof(fs));
112
111
    rw = salvage_files = verify = 0;
197
196
    free_clusters = update_free(&fs);
198
197
    file_unused();
199
198
    qfree(&mem_queue);
200
 
    n_files_check = n_files;
201
199
    if (verify) {
202
200
        n_files = 0;
203
201
        printf("Starting verification pass.\n");
205
203
        scan_root(&fs);
206
204
        reclaim_free(&fs);
207
205
        qfree(&mem_queue);
208
 
        n_files_verify = n_files;
209
206
    }
210
207
 
211
208
exit:
221
218
 
222
219
    if (!boot_only)
223
220
        printf("%s: %u files, %lu/%lu clusters\n", argv[optind],
224
 
               n_files, fs.clusters - free_clusters, fs.clusters);
 
221
               n_files, (unsigned long)fs.clusters - free_clusters, (unsigned long)fs.clusters);
225
222
 
226
223
    return fs_close(rw) ? 1 : 0;
227
224
}