search for: ntfs_min_siz

Displaying 9 results from an estimated 9 matches for "ntfs_min_siz".

Did you mean: ntfs_min_size
2015 Oct 19
5
Re: [PATCH 1/2] New API: vfs_min_size
.../daemon/daemon.h > +++ b/daemon/daemon.h > @@ -283,6 +283,7 @@ extern int btrfs_set_uuid_random (const char *device); > /*-- in ntfs.c --*/ > extern char *ntfs_get_label (const char *device); > extern int ntfs_set_label (const char *device, const char *label); > +extern int64_t ntfs_min_size (const char *device); > > /*-- in swap.c --*/ > extern int swap_set_uuid (const char *device, const char *uuid); > diff --git a/daemon/fs-min-size.c b/daemon/fs-min-size.c > new file mode 100644 > index 0000000..9c107d1 > --- /dev/null > +++ b/daemon/fs-min-size.c > @...
2015 Oct 19
5
[PATCHv2 0/2] Introduce vfs_min_size API to get minimum filesystem size.
Tried to make it in accordance with your comments. Difference to v1: Added reply_with_error where necessary. Changed name get_min_size -> vfs_min_size. Maxim Perevedentsev (2): New API: vfs_min_size Include resize2fs_P into vfs_min_size. daemon/Makefile.am | 1 + daemon/daemon.h | 2 ++ daemon/ext2.c | 45 ++++++++++++++++++++++++++----- daemon/fs-min-size.c | 49
2015 Oct 19
0
[PATCH 1/2] New API: vfs_min_size
...508691a..a690152 100644 --- a/daemon/daemon.h +++ b/daemon/daemon.h @@ -283,6 +283,7 @@ extern int btrfs_set_uuid_random (const char *device); /*-- in ntfs.c --*/ extern char *ntfs_get_label (const char *device); extern int ntfs_set_label (const char *device, const char *label); +extern int64_t ntfs_min_size (const char *device); /*-- in swap.c --*/ extern int swap_set_uuid (const char *device, const char *uuid); diff --git a/daemon/fs-min-size.c b/daemon/fs-min-size.c new file mode 100644 index 0000000..9c107d1 --- /dev/null +++ b/daemon/fs-min-size.c @@ -0,0 +1,46 @@ +/* libguestfs - the guestfsd...
2015 Oct 20
0
Re: [PATCH 1/2] New API: vfs_min_size
On 10/19/2015 07:45 PM, Pino Toscano wrote: > On Monday 19 October 2015 17:05:02 Maxim Perevedentsev wrote: >> +int64_t >> +ntfs_min_size (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; > The scope of "ret" could be redu...
2015 Oct 20
0
Re: [PATCH 1/2] New API: vfs_min_size
...str_ntfsresize, "--info", "-ff", device, NULL); >> + >> + lines = split_lines (out); >> + if (lines == NULL) >> + return -1; >> + >> + if (verbose) { >> + for (i = 0; lines[i] != NULL; ++i) >> + fprintf (stderr, "ntfs_min_size: lines[%zu] = \"%s\"\n", i, lines[i]); >> + } >> + >> + if (r == -1) { >> + /* If volume is full, ntfsresize returns error. */ >> + for (i = 0; lines[i] != NULL; ++i) { >> + if (strstr (lines[i], full_pattern)) > Better use STRPREF...
2015 Oct 19
0
[PATCH 2/2] Include resize2fs_P into vfs_min_size.
...daemon/fs-min-size.c +++ b/daemon/fs-min-size.c @@ -35,6 +35,9 @@ do_vfs_min_size(const mountable_t *mountable) if (vfs_type == NULL) return -1; + else if (fstype_is_extfs (vfs_type)) + r = ext_min_size (mountable->device); + else if (STREQ (vfs_type, "ntfs")) r = ntfs_min_size (mountable->device); diff --git a/generator/actions.ml b/generator/actions.ml index 0646a16..22358ef 100644 --- a/generator/actions.ml +++ b/generator/actions.ml @@ -12752,24 +12752,12 @@ Only some filesystem types support setting UUIDs. To read the UUID on a filesystem, call C<guestfs_vf...
2015 Oct 16
0
[PATCH 1/2] New API: get_min_size
...d for check, so force ntfsresize */ + r = command (&out, &err, str_ntfsresize, "--info", "-ff", device, NULL); + + lines = split_lines (out); + if (lines == NULL) + return -1; + + if (verbose) { + for (i = 0; lines[i] != NULL; ++i) + fprintf (stderr, "ntfs_min_size: lines[%zu] = \"%s\"\n", i, lines[i]); + } + + if (r == -1) { + /* If volume is full, ntfsresize returns error. */ + for (i = 0; lines[i] != NULL; ++i) { + if (strstr (lines[i], full_pattern)) + is_full = 1; + else if ((p = strstr (lines[i], cluster_size_pat...
2015 Oct 19
1
Re: [PATCH 2/2] Include resize2fs_P into vfs_min_size.
....c > @@ -35,6 +35,9 @@ do_vfs_min_size(const mountable_t *mountable) > if (vfs_type == NULL) > return -1; > > + else if (fstype_is_extfs (vfs_type)) > + r = ext_min_size (mountable->device); > + > else if (STREQ (vfs_type, "ntfs")) > r = ntfs_min_size (mountable->device); > > diff --git a/generator/actions.ml b/generator/actions.ml > index 0646a16..22358ef 100644 > --- a/generator/actions.ml > +++ b/generator/actions.ml > @@ -12752,24 +12752,12 @@ Only some filesystem types support setting UUIDs. > To read the UUID on...
2015 Oct 16
4
[PATCH 0/2] Introduce get_min_size API to get minimum filesystem size.
Tried to make it in accordance with your comments. Maybe you can suggest a better name for API? Maxim Perevedentsev (2): New API: get_min_size Include resize2fs_P into get_min_size. daemon/Makefile.am | 1 + daemon/daemon.h | 2 ++ daemon/ext2.c | 37 ++++++++++++++++++++++++---- daemon/fs-min-size.c | 49 +++++++++++++++++++++++++++++++++++++ daemon/ntfs.c | 68