search for: prefix_len

Displaying 20 results from an estimated 53 matches for "prefix_len".

2018 May 22
1
[PATCH v2] v2v: linux: fix kernel detection when split in different packages
...ymlinks:true modpath) then - raise Not_found; let vmlinuz_stat = try g#statns vmlinuz with G.Error _ -> raise Not_found in - (* Get/construct the version. XXX Read this from kernel file. *) - let version = - let prefix_len = String.length "/lib/modules/" in - String.sub modpath prefix_len (String.length modpath - prefix_len) in + (* Determine the modpath from the package, falling back to the + * version in the vmlinuz file name. + *) + let modp...
2010 Apr 27
4
Patch sensible callback framework
...t st; void *data, *dp; size_t alen, clen, rlen, xlen; + callback_record *cb = NULL; clen = alen = 0; data = NULL; if (fstat(fileno(f), &st)) goto err; - if (!S_ISREG(st.st_mode)) { /* Not a regular file, we can't assume we know the file size */ if (prefix_len) { @@ -75,6 +76,11 @@ int floadfile(FILE * f, void **ptr, size rlen = fread((char *)data + clen, 1, alen - clen, f); clen += rlen; + + cb = NULL; + while((cb = foreach_callback_type(cb, CB_FLOADFILE))) { + ((cb_floadfile_t)cb->function)(clen, -1); + } } while...
2018 May 21
1
[PATCH] v2v: linux: fix kernel detection when split in different packages
...h G.Error _ -> raise Not_found in - (* Get/construct the version. XXX Read this from kernel file. *) + (* Get/construct the version from the vmlinuz file. + * XXX Read this from kernel file. + *) let version = - let prefix_len = String.length "/lib/modules/" in - String.sub modpath prefix_len (String.length modpath - prefix_len) in + String.sub vmlinuz 14 (String.length vmlinuz - 14) in + + (* Determine the modpath from the vmlinuz version, and check it + * e...
2023 Mar 20
3
[libguestfs-common PATCH 0/2] detect_kernels: deal with RHEL's kernel-core / kernel-modules-core split
https://bugzilla.redhat.com/show_bug.cgi?id=2175703 Vera Wu's testing covered a backport of this series to the virt-v2v project's rhel-9.2 branch (on top of commit 86517b17be98), where the "detect_kernels" function is still unique/internal to the virt-v2v project. The backport / cherry-pick from libguestfs-common to virt-v2v cannot be automated, but it's not difficult; only
2013 Apr 02
1
v2.2 getting NULL pointer reference with shared namespace in mailbox_tree?
> > With todays nightly: > > > > dsync(wsunpriv at iai.uni-bonn.de): Panic: file imapc-list.c: line 199 (imapc_list_get_vname): assertion failed: (strncmp(prefix, storage_name, prefix_len) == 0 && storage_name[prefix_len] == list->sep) > > Oh, and this would be good to solve too. What does it say with gdb: > > gdb dsync core > fr 5 > p prefix > p storage_name > p prefix_len > p list.sep > p list.ns.prefix Thank you very much for your suppo...
2020 Sep 23
0
[v2v PATCH 3/3] linux: remove special handling of packages with no files
...e Not_found in - (* Determine the modpath from the package, falling back to the - * version in the vmlinuz file name. - *) - let modpath, version = - let prefix = "/lib/modules/" in - try - let prefix_len = String.length prefix in - List.find_map ( - fun filename -> - let filename_len = String.length filename in - if filename_len > prefix_len && - String.is_prefix filename prefix then ( -...
2020 Sep 23
3
[v2v PATCH 1/3] linux: remove warning for packages with no files
Metapackages are valid packages with no files, used to easily install something without manually installing bits. This is the case of the "kernel" package in Fedora/RHEL/etc in the last couple of years. --- v2v/linux_kernels.ml | 1 - 1 file changed, 1 deletion(-) diff --git a/v2v/linux_kernels.ml b/v2v/linux_kernels.ml index 9a41225a..78c1ee59 100644 --- a/v2v/linux_kernels.ml +++
2023 Apr 05
2
[rhel-9.2 v2v PATCH 0/2] detect_kernels: deal with RHEL's kernel-core / kernel-modules-core split
https://bugzilla.redhat.com/show_bug.cgi?id=2175703 In RHEL-9.2, the "detect_kernels" function still exists in virt-v2v, not in the common submodule. Because we need to fix RHBZ#2175703 for RHEL-9.2.z as well, port of the identically named libguestfs-common patch series <http://mid.mail-archive.com/20230320115301.43051-1-lersek at redhat.com> to RHEL-9.2 virt-v2v. This port is
2016 May 12
0
[PATCH 11/11] v2v: improve initrd search
...rce rcaps = try g#statns vmlinuz with G.Error _ -> raise Not_found in (* Get/construct the version. XXX Read this from kernel file. *) - let version = - sprintf "%s-%s" app.G.app2_version app.G.app2_release in + let prefix_len = String.length "/lib/modules/" in + let version = String.sub modpath prefix_len ((String.length modpath) - prefix_len) in (* Find the initramfs which corresponds to the kernel. * Since the initramfs is built at runtime, and doesn't have @@ -...
2016 May 18
0
[PATCH v2 11/11] v2v: improve initrd search
...+158,8 @@ let rec convert ~keep_serial_console (g : G.guestfs) inspect source rcaps = (* Get/construct the version. XXX Read this from kernel file. *) let version = - sprintf "%s-%s" app.G.app2_version app.G.app2_release in + let prefix_len = String.length "/lib/modules/" in + String.sub modpath prefix_len (String.length modpath - prefix_len) in (* Find the initramfs which corresponds to the kernel. * Since the initramfs is built at runtime, and doesn't have @@ -173,12 +174,11...
2010 Apr 23
1
Path simple menu integrated progress indicator
...*ptr, size_t *len, void (*callback)(const char* file, size_t cur, size_t total)); int zloadfile(const char *, void **, size_t *); int floadfile(FILE *, void **, size_t *, const void *, size_t); - +int floadfile_w_callback(FILE *f, void **ptr, size_t *len, const void *prefix, + size_t prefix_len, const char *filename, void (*callback)(const char* file, size_t cur, size_t total)); #endif diff -uprN syslinux-3.86-vanilla//com32/include/syslinux/vesacon.h syslinux-3.86/com32/include/syslinux/vesacon.h --- syslinux-3.86-vanilla//com32/include/syslinux/vesacon.h 2010-03-31 11:24:25.0000000...
2016 Aug 24
2
[PATCH 2/3] qemu: Implement virtio-pstore device
...d); > + > + info->flags = 0; > + if (g_str_has_suffix(name, ".enc.z")) { > + info->flags |= VIRTIO_PSTORE_FL_COMPRESSED; > + } > + > + return filename; > +} > + > +static int prefix_idx; > +static int prefix_count; > +static int prefix_len; > + > +static int filter_pstore(const struct dirent *de) > +{ > + int i; > + > + for (i = 0; i < prefix_count; i++) { > + const char *prefix = virtio_pstore_file_prefix[prefix_idx + i]; > + > + if (g_str_has_prefix(de->d_name, prefix)) { > +...
2016 Aug 24
2
[PATCH 2/3] qemu: Implement virtio-pstore device
...d); > + > + info->flags = 0; > + if (g_str_has_suffix(name, ".enc.z")) { > + info->flags |= VIRTIO_PSTORE_FL_COMPRESSED; > + } > + > + return filename; > +} > + > +static int prefix_idx; > +static int prefix_count; > +static int prefix_len; > + > +static int filter_pstore(const struct dirent *de) > +{ > + int i; > + > + for (i = 0; i < prefix_count; i++) { > + const char *prefix = virtio_pstore_file_prefix[prefix_idx + i]; > + > + if (g_str_has_prefix(de->d_name, prefix)) { > +...
2008 Oct 17
3
[PATCH 0/3] ocfs2: add security EA and ACL support v3
Hi, These three patches fix the problems in the version two. And them base on the Tao's patches: ocfs2/xattr: xattr improvement The first patch fix some problem in xattr code. The second patch add security EA support. The third patch add ACL support. Best regards, tiger
2016 Aug 26
0
[PATCH 2/3] qemu: Implement virtio-pstore device
...+ if (g_str_has_suffix(name, ".enc.z")) { > > + info->flags |= VIRTIO_PSTORE_FL_COMPRESSED; > > + } > > + > > + return filename; > > +} > > + > > +static int prefix_idx; > > +static int prefix_count; > > +static int prefix_len; > > + > > +static int filter_pstore(const struct dirent *de) > > +{ > > + int i; > > + > > + for (i = 0; i < prefix_count; i++) { > > + const char *prefix = virtio_pstore_file_prefix[prefix_idx + i]; > > + > > + if (g_str...
2016 Sep 09
0
[PATCH] v2v: linux: Move kernel detection to a separate module.
...ymlinks:true modpath) then - raise Not_found; - let vmlinuz_stat = - try g#statns vmlinuz with G.Error _ -> raise Not_found in - - (* Get/construct the version. XXX Read this from kernel file. *) - let version = - let prefix_len = String.length "/lib/modules/" in - String.sub modpath prefix_len (String.length modpath - prefix_len) in - - (* Find the initramfs which corresponds to the kernel. - * Since the initramfs is built at runtime, and doesn't have - * t...
2016 Sep 09
2
[PATCH] v2v: linux: Move kernel detection to a separate module.
This is a sort of follow-up to the Linux_bootloaders patch. It turns out all the kernel detection code is nicely self- contained and can therefore be moved to its own module. Rich.
2016 Aug 15
2
[PATCH v2] v2v: factor out bootloader handling
...rub filesystem. *) + List.map ((^) grub_prefix) vmlinuzes + + method set_default_kernel vmlinuz = + if not (String.is_prefix vmlinuz grub_prefix) then + error (f_"kernel %s is not under grub tree %s") + vmlinuz grub_prefix; + let kernel_under_grub_prefix = + let prefix_len = String.length grub_prefix in + let kernel_len = String.length vmlinuz in + String.sub vmlinuz prefix_len (kernel_len - prefix_len) in + + (* Find the grub entry for the given kernel. *) + let paths = g#aug_match (sprintf "/files%s/title/kernel[. = '%s']" +...
2013 Sep 28
1
Panic: file mail-storage.c: line 834 (mailbox_verify_name): assertion failed
...result of a configuration problem, however after quite some tinkering with configuration I am still missing the source of the problem. Sep 28 16:57:21 shwurzbung dovecot: imap(wizz): Panic: file mail-storage.c: line 834 (mailbox_verify_name): assertion failed: (strncmp(vname, ns->prefix, ns->prefix_len-1) == 0) Sep 28 16:57:21 shwurzbung dovecot: imap(wizz): Fatal: master: service(imap): child 23203 killed with signal 6 (core not dumped - set service imap { drop_priv_before_exec=yes }) The problem above appears with both dovecot 2.2.5 and 2.2.6. It did not happen while using dovecot 2.1.12. Oper...
2015 Nov 20
0
[PATCH] v2v: factor out bootloader handling
...es in + + (* Prepend grub filesystem. *) + List.map ((^) prefix) vmlinuzes + + method set_default kernel = + if not (String.is_prefix kernel prefix) then + error (f_"kernel %s is not under grub tree %s") + kernel prefix; + let kernel_under_grub_prefix = + let prefix_len = String.length prefix in + let kernel_len = String.length kernel in + String.sub kernel prefix_len (kernel_len - prefix_len) in + + (* Find the grub entry for the given kernel. *) + let paths = g#aug_match (sprintf "/files%s/title/kernel[. = '%s']" +...