Thanks a lot. This was very useful!<div><br></div><div>Regards,</div><div>Lisa<br><br><div class="gmail_quote">2012/8/1 Curtis Gedak <span dir="ltr"><<a href="mailto:gedakc@gmail.com" target="_blank">gedakc@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Lisa,<br>
<br>
Responses to questions follow in-line.<div class="im"><br>
<br>
On 12-07-27 05:49 AM, Lisa Vitolo wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I need to implement these two things:<br>
1) knowing the minimum size a partition can be resized to (for when there is a filesystem and we don't want to destroy its data);<br>
</blockquote>
<br></div>
The minimum size for a partition depends on the minimum size of the file system.  The minimum partition size can also be affected by the type of alignment used.  For example with modern disk drives, the size of a cylinder is 255 heads * 63 sectors per track = 16,065 sectors.  Please note that cylinder alignment is used for legacy operating systems, such as DOS.  Newer operating systems and disk drives work well with, and often default to MiB alignment.<div class="im">
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
2) resizing a partition together with its filesystem, if resizing is supported for that particular filesystem.<br>
I've read that for resizing a filesystem I need to call directly the filesystem services as you don't support it anymore starting from libparted 3.0, and that's okay.<br>
</blockquote>
<br></div>
The resizing capability for FAT16, FAT32, HFS, and HFS+ was re-introduced in a separate library with parted 3.1.0.<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
For the second task, from what I heard libparted still provides ped_file_system_open and ped_file_system_get_resize_<u></u>constraint, but it seems I'm not able to access them in my code. I've included the headers parted.h and filesys.h, but I still receive an error from the compiler (not the linker) that it doesn't find them. My version of parted is 3.0-1. What am I missing? :)<br>

</blockquote>
<br></div>
I suggest that you start your project using the latest version of parted-3.1 (not 3.0-1).<br>
<a href="http://lists.gnu.org/archive/html/bug-parted/2012-03/msg00001.html" target="_blank">http://lists.gnu.org/archive/<u></u>html/bug-parted/2012-03/<u></u>msg00001.html</a><br>
<br>
For an example of how to link with the new libparted-fs-resize library, you might look at the GParted source code.  Specifically <a href="http://configure.in" target="_blank">configure.in</a>, and src/Makefile.am.<br>
<a href="http://gparted.org" target="_blank">http://gparted.org</a><br>
<br>
Regards,<br>
Curtis Gedak<br>
<br>
<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.<br>
</div>