search for: do_vfs_min_size

Displaying 5 results from an estimated 5 matches for "do_vfs_min_size".

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 2/2] Include resize2fs_P into vfs_min_size.
...n ret * block_size; } } + reply_with_error("Minimum size not found. Check output format:\n%s", out); return -1; } diff --git a/daemon/fs-min-size.c b/daemon/fs-min-size.c index 9c107d1..8c7287f 100644 --- a/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/gener...
2015 Oct 19
1
Re: [PATCH 2/2] Include resize2fs_P into vfs_min_size.
...ly_with_error("Minimum size not found. Check output format:\n%s", out); > return -1; > } > > diff --git a/daemon/fs-min-size.c b/daemon/fs-min-size.c > index 9c107d1..8c7287f 100644 > --- a/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); &gt...
2015 Oct 19
0
[PATCH 1/2] New API: vfs_min_size
...ite to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#include <config.h> + +#include <stdio.h> +#include <stdlib.h> +#include <unistd.h> + +#include "daemon.h" +#include "actions.h" + +int64_t +do_vfs_min_size(const mountable_t *mountable) +{ + int64_t r; + + /* How we set the label depends on the filesystem type. */ + CLEANUP_FREE char *vfs_type = do_vfs_type (mountable); + if (vfs_type == NULL) + return -1; + + else if (STREQ (vfs_type, "ntfs")) + r = ntfs_min_size (mountable->d...
2015 Oct 19
5
Re: [PATCH 1/2] New API: vfs_min_size
..., Fifth Floor, Boston, MA 02110-1301 USA. > + */ > + > +#include <config.h> > + > +#include <stdio.h> > +#include <stdlib.h> > +#include <unistd.h> > + > +#include "daemon.h" > +#include "actions.h" > + > +int64_t > +do_vfs_min_size(const mountable_t *mountable) I'd be slightly more verbose here, and call the action like "vfs_minimum_size". (also a minor style nitpick: missing space between function name and the bracket, and in other few places in this patch) > +{ > + int64_t r; > + > + /* How we...