Skip to content

Commit

Permalink
simplify concat by the new function for advancing a cluster reference
Browse files Browse the repository at this point in the history
  • Loading branch information
sgerwk committed Mar 10, 2018
1 parent 28c2101 commit d357747
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions tools/fattool.c
Original file line number Diff line number Diff line change
Expand Up @@ -1504,18 +1504,10 @@ int main(int argn, char *argv[]) {
exit(1);
}

size = 0;
directory = startdirectory;
index = startindex;
for (cl = target;
cl >= FAT_FIRST;
cl = fatreferencegettarget(f,
directory, index, previous)) {
size += fatbytespercluster(f);
directory = NULL;
index = 0;
previous = cl;
}
ncluster = fatreferencelast(f, &directory, &index, &previous);
size = fatbytespercluster(f) * ncluster;

pos = size - fatentrygetsize(startdirectory, startindex);
if (pos > 0 && ! ! strcmp(option3, "-")) {
Expand Down

0 comments on commit d357747

Please sign in to comment.