Displaying 9 results from an estimated 9 matches for "estimate_rtn".
2020 Feb 18
2
[PATCH] make-fs: Don't use du --apparent-size to estimate input size.
...---
make-fs/make-fs.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/make-fs/make-fs.c b/make-fs/make-fs.c
index 5d8c3a385..386142280 100644
--- a/make-fs/make-fs.c
+++ b/make-fs/make-fs.c
@@ -393,7 +393,7 @@ static int
estimate_input (const char *input, uint64_t *estimate_rtn, char **ifmt_rtn)
{
struct stat statbuf;
- const char *argv[6];
+ const char *argv[5];
CLEANUP_UNLINK_FREE char *tmpfile = NULL;
CLEANUP_FCLOSE FILE *fp = NULL;
char line[256];
@@ -424,11 +424,10 @@ estimate_input (const char *input, uint64_t *estimate_rtn, char **ifmt_rtn)
}...
2014 Jul 28
5
[PATCH] make-fs: respect libguestfs' temporary dir
Do not hardcode /tmp.
---
make-fs/make-fs.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/make-fs/make-fs.c b/make-fs/make-fs.c
index 1bec3e2..9c11fef 100644
--- a/make-fs/make-fs.c
+++ b/make-fs/make-fs.c
@@ -381,8 +381,9 @@ estimate_input (const char *input, uint64_t *estimate_rtn, char **ifmt_rtn)
CLEANUP_FCLOSE FILE *fp = NULL;
char line[256];
size_t len;
+ CLEANUP_FREE char *tmpdir = guestfs_get_tmpdir (g);
- if (asprintf (&tmpfile, "/tmp/makefsXXXXXX") == -1) {
+ if (asprintf (&tmpfile, "%s/makefsXXXXXX", tmpdir) == -1) {
pe...
2020 Feb 18
0
Re: [PATCH] make-fs: Don't use du --apparent-size to estimate input size.
...> 1 file changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/make-fs/make-fs.c b/make-fs/make-fs.c
> index 5d8c3a385..386142280 100644
> --- a/make-fs/make-fs.c
> +++ b/make-fs/make-fs.c
> @@ -393,7 +393,7 @@ static int
> estimate_input (const char *input, uint64_t *estimate_rtn, char **ifmt_rtn)
> {
> struct stat statbuf;
> - const char *argv[6];
> + const char *argv[5];
> CLEANUP_UNLINK_FREE char *tmpfile = NULL;
> CLEANUP_FCLOSE FILE *fp = NULL;
> char line[256];
> @@ -424,11 +424,10 @@ estimate_input (const char *input, uint64_t *...
2020 Feb 18
2
Re: [PATCH] make-fs: Don't use du --apparent-size to estimate input size.
...(+), 6 deletions(-)
> >
> > diff --git a/make-fs/make-fs.c b/make-fs/make-fs.c
> > index 5d8c3a385..386142280 100644
> > --- a/make-fs/make-fs.c
> > +++ b/make-fs/make-fs.c
> > @@ -393,7 +393,7 @@ static int
> > estimate_input (const char *input, uint64_t *estimate_rtn, char **ifmt_rtn)
> > {
> > struct stat statbuf;
> > - const char *argv[6];
> > + const char *argv[5];
> > CLEANUP_UNLINK_FREE char *tmpfile = NULL;
> > CLEANUP_FCLOSE FILE *fp = NULL;
> > char line[256];
> > @@ -424,11 +424,10 @@ estim...
2016 Sep 08
4
[PATCH 0/3] Use gnulib's getprogname
Hi,
this series update libguestfs to a recent gnulib version, so that we
can use its new getprogname module, and solve altogether one of the
porting issues (the need for 'program_name' by the error module of
gnulib), and have a single way to get the name of the current program.
A number of changes in tools mostly, although mechanical.
Thanks,
Pino Toscano (3):
Update gnulib to latest
2014 Jan 27
0
[PATCH INCOMPLETE] Rewrite virt-make-fs in C (originally Perl).
...rect blocks (ext2, ext3), and extents
+ * - Journal size
+ * - Internal fragmentation of files
+ *
+ * What we could also do is try shrinking the filesystem after
+ * creating and populating it, but that is complex given partitions.
+ */
+static int
+estimate_input (const char *input, uint64_t *estimate_rtn, char **ifmt_rtn)
+{
+ struct stat statbuf;
+ const char *argv[6];
+ CLEANUP_UNLINK_FREE char *tmpfile = NULL;
+ FILE *fp;
+ char line[256];
+
+ if (asprintf (&tmpfile, "/tmp/makefsXXXXXX") == -1) {
+ perror ("asprintf");
+ return -1;
+ }
+ if (mkstemp (tmpfile...
2014 Jan 27
2
[PATCH INCOMPLETE] Rewrite virt-make-fs in C (originally Perl).
I thought it would be easy to rewrite virt-make-fs in C.
Two days later ...
The Perl program uses a lot of external commands, which makes
it pretty tedious to implement in C.
Rich.
2015 Feb 14
2
[PATCH 0/2] Change guestfs__*
libguestfs has used double and triple underscores in identifiers.
These aren't valid for global names in C++.
(http://stackoverflow.com/a/228797)
These large but completely mechanical patches change the illegal
identifiers to legal ones.
Rich.
2017 Apr 04
1
[PATCH] Use Unicode single quotes ‘’ in place of short single quoted strings throughout.
...quot;),
_("setting temporary directory"), ctxstr, tmpdir);
return -1;
}
diff --git a/make-fs/make-fs.c b/make-fs/make-fs.c
index 961127ab9..27cdb9fd2 100644
--- a/make-fs/make-fs.c
+++ b/make-fs/make-fs.c
@@ -443,7 +443,7 @@ estimate_input (const char *input, uint64_t *estimate_rtn, char **ifmt_rtn)
}
if (sscanf (line, "%" SCNu64, estimate_rtn) != 1) {
- fprintf (stderr, _("%s: cannot parse the output of 'du' command: %s\n"),
+ fprintf (stderr, _("%s: cannot parse the output of ‘du’ command: %s\n"),
g...