Displaying 2 results from an estimated 2 matches for "ntfsresize_info".
2015 Oct 16
2
[PATCH] New API: ntfsresize_info
...3 files changed, 86 insertions(+), 1 deletion(-)
diff --git a/daemon/ntfs.c b/daemon/ntfs.c
index 1ead159..f0a8c3b 100644
--- a/daemon/ntfs.c
+++ b/daemon/ntfs.c
@@ -153,6 +153,74 @@ do_ntfsresize_size (const char *device, int64_t size)
return do_ntfsresize (device, size, 0);
}
+int64_t
+do_ntfsresize_info (const char *device)
+{
+ CLEANUP_FREE char *err = NULL, *out = NULL;
+ CLEANUP_FREE_STRING_LIST char **lines = NULL;
+ int r;
+ size_t i;
+ char *p;
+ int64_t ret, volume_size = 0;
+ const char *size_pattern = "You might resize at ",
+ *full_pattern = "Volume is f...
2015 Oct 16
0
Re: [PATCH] New API: ntfsresize_info
On Friday 16 October 2015 15:55:44 Maxim Perevedentsev wrote:
> Get minimum size of NTFS filesystem in bytes. This is used primarily for shrinking images.
>
> In case of a full images ntfsresize returns error code and does not print minimum size.
> So we calculate it manually by rounding 'volume size' up to 'cluster size'.
NACK to a separate API per-filesystem.
As I