Displaying 13 results from an estimated 13 matches for "do_cat".
2014 Jun 23
2
[PATCH] cat: add -m option
...------
cat/virt-cat.pod | 36 ++++++++++++++++++++++++++++++++++++
2 files changed, 74 insertions(+), 7 deletions(-)
diff --git a/cat/cat.c b/cat/cat.c
index e86ecf3..72bf81b 100644
--- a/cat/cat.c
+++ b/cat/cat.c
@@ -46,6 +46,7 @@ const char *libvirt_uri = NULL;
int inspector = 1;
static int do_cat (int argc, char *argv[]);
+static int do_cat_simple (int argc, char *argv[]);
static int is_windows (guestfs_h *g, const char *root);
static char *windows_path (guestfs_h *g, const char *root, const char *filename);
@@ -70,6 +71,8 @@ usage (int status)
" --format[=raw|..]...
2014 Jun 23
2
Re: [PATCH] cat: add -m option
On Monday 23 June 2014 12:29:07 Richard W.M. Jones wrote:
> On Mon, Jun 23, 2014 at 01:00:11PM +0200, Pino Toscano wrote:
> > static int
> >
> > +do_cat_simple (int argc, char *argv[])
> > +{
> > + unsigned errors = 0;
> > + int i;
> > +
> > + for (i = 0; i < argc; ++i) {
> > + if (guestfs_download (g, argv[i], "/dev/stdout") == -1)
> > + errors++;
> > + }
> > +
> >...
2015 May 21
1
Re: [PATCH v3 1/3] virt-ls: support drive letters on Windows
...r, otherwise
if is_windows returns false that string is leaked.
> +
> + if (is_windows (g, root))
> + return root;
> + else
> + return NULL;
> +}
> +
I'd inline the whole get_windows_root just before the
"while (optind < argc)", like done in cat/cat.c:do_cat.
Another option could be factor out this code somewhere (like windows.c).
--
Pino Toscano
2008 Apr 29
2
reproducible segmentation fault caused by textConnection()
Dear all,
It seems that textConnection() can trigger a segmentation fault. The
following script (using two large loops) makes this bug reproducible:
for (i in 1:10000) {
z=textConnection(NULL,open='w')
for (j in 1:100) {
write(runif(1)*1e6,file=z)
write('\n',file=z)
}
close(z)
}
The bug could be reproduced on R-2.6.1, R-2.7.0 and on the latest
R-devel
2015 May 20
6
[PATCH v3 0/3] RFE: support Windows drive letter in virt-ls
Fixes RHBZ#845234.
v3 changes: Drive letters works if inspection is enabled (-m is not given)
v2 changes: Ammended so it doesn't do inspection for every dir to list.
Maros Zatko (3):
virt-ls: support drive letters on Windows
virt-ls: update usage for win drive letters
docs: amend virt-ls manpage with win drive letters
cat/ls.c | 41 +++++++++++++++++++++++++++++++++++++----
2014 Aug 28
14
[PATCH 00/13] code refactorings for tools
Hi,
this series does a couple of code reorganizations/refactoring in code
used by tools: the windows path handling code, and the two types of
file editing (using editor, and using perl expression).
There's still a code duplication between the two variants of file
editing, but it is just within a single source, and can be easily
solved now (planning as next step).
Pino Toscano (13):
edit:
2009 Aug 12
23
[PATCH 0/23] factor and const-correctness
This started as a simple warning-elimination change.
I'll get back to that series shortly ;-)
It turned into a factorization and constification exercise
during which I got a taste of ocaml. Thanks to Rich Jones
for help with a few snippets in generator.ml.
The overall result is that many previously-manually-maintained
bits from daemon/*.c functions are now hoisted into the automatically-
2012 Mar 13
2
[PATCH 0/2] 'int' to 'size_t' changes
These two patches are probably not completely independent, but
separating them is a lot of work.
With *both* patches applied, all the tests and extra-tests pass.
That's no guarantee however that there isn't a mistake, so I don't
think this patch is a candidate for the 1.16 branch, until it's had a
lot more testing in development.
Rich.
2018 Sep 19
0
[PATCH 2/2] Introduce a --key option in tools that accept keys
...} else
error (EXIT_FAILURE, 0,
_("unknown long option: %s (%d)"),
@@ -249,6 +254,7 @@ main (int argc, char *argv[])
/* Free up data structures, no longer needed after this point. */
free_drives (drvs);
free_mps (mps);
+ free_key_store (ks);
r = do_cat (argc - optind, &argv[optind]);
diff --git a/cat/log.c b/cat/log.c
index d6e98cb4c..afba541ca 100644
--- a/cat/log.c
+++ b/cat/log.c
@@ -81,6 +81,7 @@ usage (int status)
" --echo-keys Don't turn off echo for passphrases\n"
" --format...
2018 Sep 19
5
[PATCH 0/2] RFC: --key option for tools
Hi,
the following series adds a --key option in the majority of tools: this
makes it possible to pass LUKS credentials programmatically, avoid the
need to manually input them, or unsafely pass them via stdin.
Thanks,
Pino Toscano (2):
mltools: create a cmdline_options struct
Introduce a --key option in tools that accept keys
builder/cmdline.ml | 2 +-
2017 Jan 20
5
[PATCH 0/5] Rename src/ to lib/ and move common code to common/
This patch series moves some files and directories around but is only
code motion (or supposed to be).
A new directory, common/, is created for all of the common code which
is currently shared in random ways between parts of the project.
And src/ becomes lib/ (the largest change, but mostly mechanical).
In full this series makes the following changes:
src/libprotocol -> common/protocol
2017 Jan 25
10
[PATCH v2 0/7] Rename src/ to lib/ and move common code to common/
Previous patch series was posted here:
https://www.redhat.com/archives/libguestfs/2017-January/msg00059.html
v2 simply extends this patch series to cover the extra directories
common/edit, common/progress, common/windows and common/parallel.
The only remaining item is to consider whether we should rename mllib
to something else, mlcommon was my suggestion.
Rich.
2009 Aug 03
1
[PATCH 1/2] Convert all TABs-as-indentation to spaces.
...if (add_string (&ret, &size, &alloc, "") == -1) {
- free (out);
- return NULL;
+ free (out);
+ return NULL;
}
}
diff --git a/daemon/file.c b/daemon/file.c
index aab7e93..63d8dd2 100644
--- a/daemon/file.c
+++ b/daemon/file.c
@@ -97,18 +97,18 @@ do_cat (char *path)
if (size >= alloc) {
alloc += 8192;
if (alloc > max) {
- reply_with_error ("cat: %s: file is too large for message buffer",
- path);
- free (buf);
- close (fd);
- return NULL;
+ reply_with_error ("cat: %s: file is too large for message...