search for: src_fd

Displaying 10 results from an estimated 10 matches for "src_fd".

Did you mean: src_bo
2017 Jul 01
0
[PATCH] Add new hash.c32 module
...+} + +static const char *unrockridge_iso(const char *name) +{ + const struct syslinux_version *sv; + sv = syslinux_version(); + if (sv->filesystem != SYSLINUX_FS_ISOLINUX) { + return unrockridge(name); + } else { + return name; + } +} + +static uint8_t *md5_file(const char *filename) +{ + int src_fd, count; + uint8_t in_buf[4096]; + static uint8_t hash_value[16*2+1]; + static unsigned char hash[16]; + MD5_CTX context; + + src_fd = open(filename, O_RDONLY); + if (src_fd < 0) { + src_fd = open(unrockridge_iso(filename), O_RDONLY); + } + if (src_fd < 0) { + return NULL; + } + + MD5Init(&a...
2013 Jun 26
6
[PROGS PATCH] Import btrfs-extent-same
...nt16_t reserved1; /* out - number of files that got deduped */ + uint32_t reserved2; + struct btrfs_ioctl_same_extent_info info[0]; +}; + +static void usage(const char *prog) +{ + printf("Usage: %s len file1 loff1 file2 loff2\n", prog); +} + +int main(int argc, char **argv) +{ + int ret, src_fd, i, numfiles; + char *srcf, *destf; + struct btrfs_ioctl_same_args *same; + struct btrfs_ioctl_same_extent_info *info; + unsigned long long bytes = 0ULL; + + if (argc < 6 || (argc % 2)) { + usage(argv[0]); + return 1; + } + + numfiles = (argc / 2) - 2; + + printf("Deduping %d total files\...
2016 Oct 27
2
Samba and BTRFS server-side copy
On Thu, 27 Oct 2016 15:39:27 -0700, Jeremy Allison <jra at samba.org> wrote : > On Fri, Oct 28, 2016 at 12:08:50AM +0200, Saint Germain via samba > wrote: > > On Thu, 27 Oct 2016 14:50:48 -0700, Jeremy Allison <jra at samba.org> > > wrote : > > > > > > Server-side copy can be requested using smbclient, using > > > the "scopy"
2017 Aug 03
0
[PATCH 3/6] daemon: Refine check for Device and Dev_or_Path parameters (RHBZ#1477623).
...dest) return -1; } - dest_is_dev = STRPREFIX (dest, "/dev/"); + dest_is_dev = is_device_parameter (dest); if (dest_is_dev) r = asprintf (&of_arg, "of=%s", dest); @@ -71,7 +71,7 @@ do_copy_size (const char *src, const char *dest, int64_t ssize) { int src_fd, dest_fd; - if (STRPREFIX (src, "/dev/")) + if (is_device_parameter (src)) src_fd = open (src, O_RDONLY | O_CLOEXEC); else { CLEANUP_FREE char *buf = sysroot_path (src); @@ -86,7 +86,7 @@ do_copy_size (const char *src, const char *dest, int64_t ssize) return -1; }...
2016 Oct 27
0
Samba and BTRFS server-side copy
...quot;BTRFS_IOC_CLONE_RANGE failed: %s, length %llu, " "src fd: %lld off: %llu, dest fd: %d off: %llu\n", strerror(errno), (unsigned long long)cr_args.src_length, (long long)cr_args.src_fd, (unsigned long long)cr_args.src_offset, dest_fsp->fh->fd, (unsigned long long)cr_args.dest_offset)); if you see any of these then it happened.
2016 Oct 27
2
Samba and BTRFS server-side copy
...(5, ("BTRFS_IOC_CLONE_RANGE failed: %s, length > %llu, " "src fd: %lld off: %llu, dest fd: %d off: %llu\n", > strerror(errno), > (unsigned long long)cr_args.src_length, > (long long)cr_args.src_fd, > (unsigned long long)cr_args.src_offset, > dest_fsp->fh->fd, > (unsigned long long)cr_args.dest_offset)); > > if you see any of these then it happened. Ok I understand how to check that it happene...
2010 Aug 31
13
[PATCH v2] Add progress bars
This is an updated and extended version of the original patch: https://www.redhat.com/archives/libguestfs/2010-August/msg00163.html This adds OCaml and Perl bindings (both tested), support for progress bars in virt-resize, and adds progress notifications to a number of the simpler commands. Still to do is to add progress messages to more commands. There are still a few commands which would be
2016 Mar 06
8
[PATCH 0/5] Use less stack.
Various changes/fixes to use smaller stack frames. Rich.
2016 Mar 07
2
[PATCH v2] Use less stack.
...if (send_file_write (buf, r) < 0) { pclose (fp); return -1; diff --git a/daemon/copy.c b/daemon/copy.c index 6f3e844..2a6720b 100644 --- a/daemon/copy.c +++ b/daemon/copy.c @@ -50,11 +50,17 @@ copy (const char *src, const char *src_display, { int64_t saved_size = size; int src_fd, dest_fd; - char buf[BUFSIZ]; + CLEANUP_FREE char *buf = NULL; size_t n; ssize_t r; int err; + buf = malloc (BUFSIZ); + if (buf == NULL) { + reply_with_perror ("malloc"); + return -1; + } + if ((optargs_bitmask & GUESTFS_COPY_DEVICE_TO_DEVICE_SRCOFFSET_BITMASK...
2017 Aug 03
9
[PATCH 0/6] tests: Fix handling of device API parameters (RHBZ#1477623).
https://bugzilla.redhat.com/show_bug.cgi?id=1477623 The first two patches are cleanups. The third patch changes the way that we handle Device and Dev_or_Path parameters so that a parameter marked as such can really only contain a block device name (and not, for instance, a chardev). Using a chardev here caused hangs in the API. The next two patches fix API usage to conform to this new stricter