search for: str_resize2f

Displaying 20 results from an estimated 21 matches for "str_resize2f".

Did you mean: str_resize2fs
2016 Jan 18
1
[PATCH] Add -f option to resize2fs -P in vfs_minimum_size.
...t a/daemon/ext2.c b/daemon/ext2.c index 898d066..9ba4f09 100644 --- a/daemon/ext2.c +++ b/daemon/ext2.c @@ -317,7 +317,7 @@ ext_minimum_size (const char *device) long block_size; const char *pattern = "Estimated minimum size of the filesystem: "; - r = command (&out, &err, str_resize2fs, "-P", device, NULL); + r = command (&out, &err, str_resize2fs, "-P", "-f", device, NULL); if (r == -1) { reply_with_error ("%s", err); return -1; -- 1.8.3.1
2015 Oct 14
1
[PATCH v2] New API: resize2fs_P
...size2fs_P (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; + const char *pattern = "Estimated minimum size of the filesystem: "; + + r = command (&out, &err, str_resize2fs, "-P", device, NULL); + if (r == -1) { + reply_with_error ("%s", err); + return -1; + } + + lines = split_lines (out); + if (lines == NULL) + return -1; + + for (i = 0; lines[i] != NULL; ++i) { + if (verbose) + fprintf (stderr, "resize2fs_P: lines[%zu...
2015 Oct 13
4
[PATCH] New API: resize2fs_P
...do_resize2fs_P (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; + char pattern[] = "Estimated minimum size of the filesystem: "; + + r = command (&out, &err, str_resize2fs, "-P", device, NULL); + if (r == -1) { + reply_with_error ("%s", err); + return -1; + } + + lines = split_lines (out); + if (lines == NULL) + return -1; + + for (i = 0; lines[i] != NULL; ++i) { + if (verbose) + fprintf (stderr, "resize2fs-P: lines[%zu...
2015 Oct 13
0
Re: [PATCH] New API: resize2fs_P
...CLEANUP_FREE char *err = NULL, *out = NULL; > + CLEANUP_FREE_STRING_LIST char **lines = NULL; > + int r; > + size_t i; > + char *p; > + int64_t ret; > + char pattern[] = "Estimated minimum size of the filesystem: "; > + > + r = command (&out, &err, str_resize2fs, "-P", device, NULL); > + if (r == -1) { > + reply_with_error ("%s", err); > + return -1; > + } > + > + lines = split_lines (out); > + if (lines == NULL) > + return -1; > + > + for (i = 0; lines[i] != NULL; ++i) { > + if (verbos...
2015 Jul 08
0
[PATCH 2/5] labels: move e2label to ext2.c and call it locally
...n int ext_set_label (const char *device, const char *label); /*-- in blkid.c --*/ extern char *get_blkid_tag (const char *device, const char *tag); diff --git a/daemon/ext2.c b/daemon/ext2.c index e8d2655..7bb1221 100644 --- a/daemon/ext2.c +++ b/daemon/ext2.c @@ -38,6 +38,7 @@ GUESTFSD_EXT_CMD(str_resize2fs, resize2fs); GUESTFSD_EXT_CMD(str_mke2fs, mke2fs); GUESTFSD_EXT_CMD(str_lsattr, lsattr); GUESTFSD_EXT_CMD(str_chattr, chattr); +GUESTFSD_EXT_CMD(str_e2label, e2label); /* https://bugzilla.redhat.com/show_bug.cgi?id=978302#c1 */ int @@ -123,14 +124,30 @@ do_tune2fs_l (const char *device) }...
2015 Oct 16
0
[PATCH 2/2] Include resize2fs_P into get_min_size.
...out = NULL; CLEANUP_FREE_STRING_LIST char **lines = NULL; @@ -288,6 +311,7 @@ do_resize2fs_P (const char *device) size_t i; char *p; int64_t ret; + int32_t block_size; const char *pattern = "Estimated minimum size of the filesystem: "; r = command (&out, &err, str_resize2fs, "-P", device, NULL); @@ -301,13 +325,16 @@ do_resize2fs_P (const char *device) return -1; for (i = 0; lines[i] != NULL; ++i) { - if (verbose) - fprintf (stderr, "resize2fs_P: lines[%zu] = \"%s\"\n", i, lines[i]); - if ((p = strstr (lines[i], pa...
2015 Oct 19
0
[PATCH 2/2] Include resize2fs_P into vfs_min_size.
...out = NULL; CLEANUP_FREE_STRING_LIST char **lines = NULL; @@ -288,6 +314,7 @@ do_resize2fs_P (const char *device) size_t i; char *p; int64_t ret; + int32_t block_size; const char *pattern = "Estimated minimum size of the filesystem: "; r = command (&out, &err, str_resize2fs, "-P", device, NULL); @@ -301,16 +328,22 @@ do_resize2fs_P (const char *device) return -1; for (i = 0; lines[i] != NULL; ++i) { - if (verbose) - fprintf (stderr, "resize2fs_P: lines[%zu] = \"%s\"\n", i, lines[i]); - if ((p = strstr (lines[i], pa...
2012 Aug 30
1
[PATCH] collect list of called external commands
...); if (r == -1) { pulse_mode_cancel (); diff --git a/daemon/ext2.c b/daemon/ext2.c index 7876e66..7a769bd 100644 --- a/daemon/ext2.c +++ b/daemon/ext2.c @@ -31,6 +31,13 @@ #define MAX_ARGS 64 +GUESTFS_EXT_CMD(str_tune2fs, tune2fs); +GUESTFS_EXT_CMD(str_e2fsck, e2fsck); +GUESTFS_EXT_CMD(str_resize2fs, resize2fs); +GUESTFS_EXT_CMD(str_mke2fs, mke2fs); +GUESTFS_EXT_CMD(str_lsattr, lsattr); +GUESTFS_EXT_CMD(str_chattr, chattr); + /* Choose which tools like mke2fs to use. For RHEL 5 (only) there * is a special set of tools which support ext2/3/4. eg. On RHEL 5, * mke2fs only supports ext2/3...
2015 Oct 20
0
[PATCHv3 2/2] Include resize2fs_P into vfs_min_size.
...ar *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; + long block_size; const char *pattern = "Estimated minimum size of the filesystem: "; r = command (&out, &err, str_resize2fs, "-P", device, NULL); @@ -300,17 +327,36 @@ do_resize2fs_P (const char *device) if (lines == NULL) return -1; - for (i = 0; lines[i] != NULL; ++i) { - if (verbose) - fprintf (stderr, "resize2fs_P: lines[%zu] = \"%s\"\n", i, lines[i]); +#if __WORDSIZE...
2015 Oct 19
1
Re: [PATCH 2/2] Include resize2fs_P into vfs_min_size.
...char **lines = NULL; > @@ -288,6 +314,7 @@ do_resize2fs_P (const char *device) > size_t i; > char *p; > int64_t ret; > + int32_t block_size; > const char *pattern = "Estimated minimum size of the filesystem: "; > > r = command (&out, &err, str_resize2fs, "-P", device, NULL); > @@ -301,16 +328,22 @@ do_resize2fs_P (const char *device) > return -1; > > for (i = 0; lines[i] != NULL; ++i) { > - if (verbose) > - fprintf (stderr, "resize2fs_P: lines[%zu] = \"%s\"\n", i, lines[i]); > -...
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 Jul 08
5
[PATCH v2 0/4] labels: rework
We should use the existing function from specific fs, if not, move it to specific fs files. Chen Hanxiao (4): labels: move e2label to ext2.c and call it directly labels: move ntfslabel to ntfs.c labels: use existing do_xfs_admin for xfslabel labels: return ENOTSUP if could not set label for specific fs daemon/daemon.h | 2 ++ daemon/ext2.c | 23 ++++++++++++-----
2012 Aug 30
2
[PATCH v2] daemon: collect list of called external commands
...if (r == -1) { pulse_mode_cancel (); diff --git a/daemon/ext2.c b/daemon/ext2.c index 943b441..40b36d2 100644 --- a/daemon/ext2.c +++ b/daemon/ext2.c @@ -31,6 +31,13 @@ #define MAX_ARGS 64 +GUESTFSD_EXT_CMD(str_tune2fs, tune2fs); +GUESTFSD_EXT_CMD(str_e2fsck, e2fsck); +GUESTFSD_EXT_CMD(str_resize2fs, resize2fs); +GUESTFSD_EXT_CMD(str_mke2fs, mke2fs); +GUESTFSD_EXT_CMD(str_lsattr, lsattr); +GUESTFSD_EXT_CMD(str_chattr, chattr); + char ** do_tune2fs_l (const char *device) { @@ -39,7 +46,7 @@ do_tune2fs_l (const char *device) char *p, *pend, *colon; DECLARE_STRINGSBUF (ret); - r = co...
2017 Jul 27
0
[PATCH v2] daemon: Remove GUESTFSD_EXT_CMD.
..._error ("%s: %s", path, err); diff --git a/daemon/ext2.c b/daemon/ext2.c index d694b236e..0c776b6d1 100644 --- a/daemon/ext2.c +++ b/daemon/ext2.c @@ -33,14 +33,6 @@ #define MAX_ARGS 128 -GUESTFSD_EXT_CMD(str_tune2fs, tune2fs); -GUESTFSD_EXT_CMD(str_e2fsck, e2fsck); -GUESTFSD_EXT_CMD(str_resize2fs, resize2fs); -GUESTFSD_EXT_CMD(str_mke2fs, mke2fs); -GUESTFSD_EXT_CMD(str_lsattr, lsattr); -GUESTFSD_EXT_CMD(str_chattr, chattr); -GUESTFSD_EXT_CMD(str_e2label, e2label); - /* https://bugzilla.redhat.com/show_bug.cgi?id=978302#c1 */ int fstype_is_extfs (const char *fstype) @@ -57,7 +49,7 @@ do_...
2015 Oct 20
4
[PATCHv3 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. Difference to v2: Changed name to vfs_minimum_size. Changed parsing to xstrtol + STR* macros where possible. Maxim Perevedentsev (2): New API: vfs_min_size Include resize2fs_P into vfs_min_size. daemon/Makefile.am | 1 +
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
2017 Jul 24
0
[PATCH 2/2] daemon: Replace GUESTFSD_EXT_CMD with --print-external-commands.
..._error ("%s: %s", path, err); diff --git a/daemon/ext2.c b/daemon/ext2.c index d694b236e..b64c93e83 100644 --- a/daemon/ext2.c +++ b/daemon/ext2.c @@ -33,13 +33,8 @@ #define MAX_ARGS 128 -GUESTFSD_EXT_CMD(str_tune2fs, tune2fs); -GUESTFSD_EXT_CMD(str_e2fsck, e2fsck); -GUESTFSD_EXT_CMD(str_resize2fs, resize2fs); -GUESTFSD_EXT_CMD(str_mke2fs, mke2fs); -GUESTFSD_EXT_CMD(str_lsattr, lsattr); -GUESTFSD_EXT_CMD(str_chattr, chattr); -GUESTFSD_EXT_CMD(str_e2label, e2label); +DECLARE_EXTERNAL_COMMANDS ("tune2fs", "e2fsck", "resize2fs", + "m...
2015 Jul 08
9
[PATCH 0/5] labels: rework
We should use the existing function from specific fs, if not, move it to specific fs files. Chen Hanxiao (5): label: move btrfslabel to btrfs.c label: move e2label to ext2.c and call it locally label: move ntfslabel to ntfs.c label: use existing do_xfs_admin for xfslabel labels: return ENOTSUP if could not set label for specific fs daemon/btrfs.c | 16 +++++++++++ daemon/daemon.h |
2015 Oct 20
8
[PATCHv4 0/2] Introduce vfs_minimum_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. Difference to v2: Changed name to vfs_minimum_size. Changed parsing to xstrtol + STR* macros where possible. Difference to v3: Decapitalize error messages. Maxim Perevedentsev (2): New API: vfs_minimum_size Include resize2fs_P into
2017 Jul 27
3
[PATCH v2] daemon: Remove GUESTFSD_EXT_CMD.
This is a simpler patch that removes GUESTFSD_EXT_CMD completely.