search for: tar_buf

Displaying 4 results from an estimated 4 matches for "tar_buf".

Did you mean: tag_buf
2015 Sep 29
2
[PATCH 1/2] copy-in: print tar stderr when it fails
...st char *localpath, const char *remotedir) { CLEANUP_CMD_CLOSE struct command *cmd = guestfs_int_new_command (g); - int fd; + int fd, err_fd; int r; char fdbuf[64]; size_t buf_len = strlen (localpath) + 1; char buf[buf_len]; const char *dirname, *basename; + CLEANUP_FREE char *tar_buf = NULL; int remote_is_dir = guestfs_is_dir (g, remotedir); if (remote_is_dir == -1) @@ -67,7 +69,7 @@ guestfs_impl_copy_in (guestfs_h *g, const char *localpath, const char *remotedir guestfs_int_cmd_add_arg (cmd, "-"); guestfs_int_cmd_add_arg (cmd, basename); - r = guestf...
2015 Sep 29
2
Re: [PATCH 2/2] copy-in: error out early if the localpath does not exist (RHBZ#1267032)
...n-out.c > index 0dd8cd3..2b1e4d4 100644 > --- a/src/copy-in-out.c > +++ b/src/copy-in-out.c > @@ -47,6 +47,12 @@ guestfs_impl_copy_in (guestfs_h *g, const char *localpath, const char *remotedir > char buf[buf_len]; > const char *dirname, *basename; > CLEANUP_FREE char *tar_buf = NULL; > + struct stat statbuf; > + > + if (stat (localpath, &statbuf) == -1) { > + error (g, _("source '%s' does not exist (or cannot be read)"), localpath); > + return -1; > + } > > int remote_is_dir = guestfs_is_dir (g, remotedir); &gt...
2015 Sep 29
0
[PATCH 2/2] copy-in: error out early if the localpath does not exist (RHBZ#1267032)
...it a/src/copy-in-out.c b/src/copy-in-out.c index 0dd8cd3..2b1e4d4 100644 --- a/src/copy-in-out.c +++ b/src/copy-in-out.c @@ -47,6 +47,12 @@ guestfs_impl_copy_in (guestfs_h *g, const char *localpath, const char *remotedir char buf[buf_len]; const char *dirname, *basename; CLEANUP_FREE char *tar_buf = NULL; + struct stat statbuf; + + if (stat (localpath, &statbuf) == -1) { + error (g, _("source '%s' does not exist (or cannot be read)"), localpath); + return -1; + } int remote_is_dir = guestfs_is_dir (g, remotedir); if (remote_is_dir == -1) -- 2.1.0
2015 Sep 29
0
Re: [PATCH 2/2] copy-in: error out early if the localpath does not exist (RHBZ#1267032)
...1e4d4 100644 > > --- a/src/copy-in-out.c > > +++ b/src/copy-in-out.c > > @@ -47,6 +47,12 @@ guestfs_impl_copy_in (guestfs_h *g, const char *localpath, const char *remotedir > > char buf[buf_len]; > > const char *dirname, *basename; > > CLEANUP_FREE char *tar_buf = NULL; > > + struct stat statbuf; > > + > > + if (stat (localpath, &statbuf) == -1) { > > + error (g, _("source '%s' does not exist (or cannot be read)"), localpath); > > + return -1; > > + } > > > > int remote_is_...