1N/A Copyright (C) 1998-2000, 2002, 2007, 2009-2010 Free Software 1N/A This program is free software; you can redistribute it and/or modify 1N/A it under the terms of the GNU General Public License as published by 1N/A the Free Software Foundation; either version 3 of the License, or 1N/A (at your option) any later version. 1N/A This program is distributed in the hope that it will be useful, 1N/A but WITHOUT ANY WARRANTY; without even the implied warranty of 1N/A MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1N/A GNU General Public License for more details. 1N/A You should have received a copy of the GNU General Public License 1N/A/* returns the minimum size of clusters for a given file system type */ 1N/A/* returns the minimum size of clusters for a given file system type */ 1N/A/* returns the maxmimum size of clusters for a given file system type */ 1N/A/* returns the minimum number of clusters for a given file system type */ 1N/A/* returns the maximum number of clusters for a given file system type */ 1N/A/* what is this supposed to be? What drugs are M$ on? (Can I have some? :-) */ 1N/A _(
"You need %s of free disk space to shrink this " 1N/A "partition to this size. Currently, only %s is " 1N/A/******************************************************************************/ 1N/A/* DO NOT EDIT THIS ALGORITHM! 1N/A * As far as I can tell, this is the same algorithm used by Microsoft to 1N/A * calculate the size of the file allocaion tables, and the number of clusters. 1N/A * I have not verified this by dissassembling Microsoft code - I came to this 1N/A * conclusion by empirical analysis (i.e. trial and error - this was HORRIBLE). 1N/A * If you think this code makes no sense, then you are right. I will restrain 1N/A * the urge to inflict serious bodily harm on Microsoft people. 1N/A for (i = 0; i <
2; i++) {
1N/A /* looks like this should be part of the loop condition? 1N/A * Need to build the Big Table TM again to check 1N/A/****************************************************************************/ 1N/A /* only make the cluster size really small (<4k) if a bigger one is 1N/A * isn't possible. Windows never makes FS's like this, but it 1N/A * seems to work... (do more tests!) 1N/A/* Same as fat_calc_sizes, except it only attempts to match a particular 1N/A * cluster size. This is useful, because the FAT resizer can only shrink the 1N/A/* libparted can only reduce the cluster size at this point */ 1N/A/* Calculates the number of sectors needed to be added to cluster_offset, 1N/A to make the cluster on the new file system match up with the ones 1N/A on the old file system. 1N/A However, some space is reserved by fat_calc_resize_sizes() and 1N/A friends, to allow room for this space. If too much of this space is left 1N/A over, everyone will complain, so we have to be greedy, and use it all up... 1N/A#
endif /* !DISCOVER_ONLY */