search for: valuelen

Displaying 20 results from an estimated 31 matches for "valuelen".

Did you mean: value_len
2012 Nov 23
14
extended attributes wiredness
Hi, I am using kernel 3.7-rc6. I have written a test application for extended attributes and have for some folders a wired behaviour: #include <stdio.h> #include <string.h> #include <attr/xattr.h> char attrs[1024]; ssize_t attrslen; int i; char value[1024]; ssize_t valuelen; int main(int argc, char *argv[]) { if (argc != 2) { fprintf(stderr, "Syntax: testxattr <filename>\n"); return 1; } printf("processing file %s\n", argv[1]); attrslen = llistxattr(argv[1], attrs, 1024); if (attrslen < 0) { perror("list...
2017 Feb 24
0
[PATCH v2 3/3] inspect: read more fields for RPM packages
...ch_str = NULL, *arch = NULL; + *epoch_str = NULL, *arch = NULL, *url = NULL, *summary = NULL, + *description = NULL; int32_t epoch; /* This function reads one (key, value) pair from the Packages @@ -359,6 +363,9 @@ read_package (guestfs_h *g, release = get_rpm_header_tag (g, value, valuelen, RPMTAG_RELEASE, 's'); epoch_str = get_rpm_header_tag (g, value, valuelen, RPMTAG_EPOCH, 'i'); arch = get_rpm_header_tag (g, value, valuelen, RPMTAG_ARCH, 's'); + url = get_rpm_header_tag (g, value, valuelen, RPMTAG_URL, 's'); + summary = get_rpm_header_tag (...
2018 Feb 15
3
[PATCH v2 0/2] inspect: basic UTF-8 encoding for rpm
This needs Richard's patch: https://www.redhat.com/archives/libguestfs/2018-February/msg00099.html Diff to v1: * factorized the UTF-8 conversion functions * small style fixes Cédric Bosdonnat (2): common: extract UTF-8 conversion function inspector: rpm summary and description may not be utf-8 common/utils/guestfs-utils.h | 1 + common/utils/libxml2-utils.c
2018 Feb 15
0
[PATCH v2 2/2] inspector: rpm summary and description may not be utf-8
...ULL, *summary = NULL, - *description = NULL; + *description = NULL, *summary_raw = NULL, *description_raw = NULL; int32_t epoch; /* This function reads one (key, value) pair from the Packages @@ -342,8 +358,14 @@ read_package (guestfs_h *g, epoch_str = get_rpm_header_tag (g, value, valuelen, RPMTAG_EPOCH, 'i'); arch = get_rpm_header_tag (g, value, valuelen, RPMTAG_ARCH, 's'); url = get_rpm_header_tag (g, value, valuelen, RPMTAG_URL, 's'); - summary = get_rpm_header_tag (g, value, valuelen, RPMTAG_SUMMARY, 's'); - description = get_rpm_header_tag...
2018 Feb 28
0
[PATCH v3 2/2] inspector: rpm summary and description may not be utf-8
...ULL, *summary = NULL, - *description = NULL; + *description = NULL, *summary_raw = NULL, *description_raw = NULL; int32_t epoch; /* This function reads one (key, value) pair from the Packages @@ -342,8 +358,14 @@ read_package (guestfs_h *g, epoch_str = get_rpm_header_tag (g, value, valuelen, RPMTAG_EPOCH, 'i'); arch = get_rpm_header_tag (g, value, valuelen, RPMTAG_ARCH, 's'); url = get_rpm_header_tag (g, value, valuelen, RPMTAG_URL, 's'); - summary = get_rpm_header_tag (g, value, valuelen, RPMTAG_SUMMARY, 's'); - description = get_rpm_header_tag...
2012 Oct 29
1
[PATCH] lib: update inspect_list_applications to return all installed RPMs (RHBZ#859885)
...each link field. */ struct rpm_names_list { struct rpm_name *names; @@ -161,26 +161,62 @@ read_rpm_name (guestfs_h *g, void *listv) { struct rpm_names_list *list = listv; + const unsigned char *link_p; char *name; /* Ignore bogus entries. */ if (keylen == 0 || valuelen < 4) return 0; - /* The name (key) field won't be NUL-terminated, so we must do that. */ - name = safe_malloc (g, keylen+1); - memcpy (name, key, keylen); - name[keylen] = '\0'; - - list->names = safe_realloc (g, list->names, - (list-&gt...
2018 Feb 14
1
[PATCH] inspector: rpm summary and description may not be utf-8
...ULL, *summary = NULL, - *description = NULL; + *description = NULL, *summary_raw = NULL, *description_raw = NULL; int32_t epoch; /* This function reads one (key, value) pair from the Packages @@ -342,8 +403,14 @@ read_package (guestfs_h *g, epoch_str = get_rpm_header_tag (g, value, valuelen, RPMTAG_EPOCH, 'i'); arch = get_rpm_header_tag (g, value, valuelen, RPMTAG_ARCH, 's'); url = get_rpm_header_tag (g, value, valuelen, RPMTAG_URL, 's'); - summary = get_rpm_header_tag (g, value, valuelen, RPMTAG_SUMMARY, 's'); - description = get_rpm_header_tag...
2012 Oct 15
1
[PATCH for discussion] lib: update inspect_list_applications to return app_arch
Here's a partially implemented fix for RHBZ#859949. Seeing as this is my first libguestfs patch, I'd like some other eyeballs on it to make sure I've not done anything completely crazy. If the rpm case looks ok, I'll update the deb and windows cases if/where applicable.
2017 Feb 23
2
[PATCH 1/3] inspect: add source and summary to internal add_application
This way source and summary can be specified for any package read from the guest. --- lib/inspect-apps.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/lib/inspect-apps.c b/lib/inspect-apps.c index 1216c52..eabe565 100644 --- a/lib/inspect-apps.c +++ b/lib/inspect-apps.c @@ -51,7 +51,7 @@ static struct guestfs_application2_list *list_applications_deb
2018 Feb 28
2
[PATCH v3 0/2] inspect: basic UTF-8 encoding for rpm
Diff to v2: * inlined local_string_to_utf8 Cédric Bosdonnat (2): common: extract UTF-8 conversion function inspector: rpm summary and description may not be utf-8 common/utils/guestfs-utils.h | 11 +++++ common/utils/libxml2-utils.c | 69 +-------------------------- common/utils/utils.c | 64 +++++++++++++++++++++++++
2017 Feb 24
3
[PATCH v2 1/3] inspect: add source and summary to internal add_application
This way source and summary can be specified for any package read from the guest. --- lib/inspect-apps.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/lib/inspect-apps.c b/lib/inspect-apps.c index 1216c52..eabe565 100644 --- a/lib/inspect-apps.c +++ b/lib/inspect-apps.c @@ -51,7 +51,7 @@ static struct guestfs_application2_list *list_applications_deb
2010 Dec 08
0
No subject
...ee(msg); + return 0; + } + return 1; +} + +/* + * Send a response back to the host. + */ + +static void +kvp_respond_to_host(char *key, char *value, int error) +{ + struct hv_kvp_msg *kvp_msg; + struct hv_kvp_msg_enumerate *kvp_data; + char *key_name; + struct icmsg_hdr *icmsghdrp; + int keylen, valuelen; + u8 *buf; + u32 buf_len; + struct vmbus_channel *channel; + u64 req_id; + + /* + * If a transaction is not active; log and return. + */ + + if (!kvp_transaction.active) { + /* + * This is a spurious call! + */ + printk(KERN_WARNING "KVP: Transaction not active\n"); + return; +...
2010 Dec 08
0
No subject
...ee(msg); + return 0; + } + return 1; +} + +/* + * Send a response back to the host. + */ + +static void +kvp_respond_to_host(char *key, char *value, int error) +{ + struct hv_kvp_msg *kvp_msg; + struct hv_kvp_msg_enumerate *kvp_data; + char *key_name; + struct icmsg_hdr *icmsghdrp; + int keylen, valuelen; + u8 *buf; + u32 buf_len; + struct vmbus_channel *channel; + u64 req_id; + + /* + * If a transaction is not active; log and return. + */ + + if (!kvp_transaction.active) { + /* + * This is a spurious call! + */ + printk(KERN_WARNING "KVP: Transaction not active\n"); + return; +...
2010 Dec 17
0
[PATCH 3/4] Staging: hv: Implement key/value pair (KVP)
...ee(msg); + return 0; + } + return 1; +} + +/* + * Send a response back to the host. + */ + +static void +kvp_respond_to_host(char *key, char *value, int error) +{ + struct hv_kvp_msg *kvp_msg; + struct hv_kvp_msg_enumerate *kvp_data; + char *key_name; + struct icmsg_hdr *icmsghdrp; + int keylen, valuelen; + u32 buf_len; + struct vmbus_channel *channel; + u64 req_id; + + /* + * If a transaction is not active; log and return. + */ + + if (!kvp_transaction.active) { + /* + * This is a spurious call! + */ + printk(KERN_WARNING "KVP: Transaction not active\n"); + return; + } + /* + *...
2010 Dec 17
0
[PATCH 3/4] Staging: hv: Implement key/value pair (KVP)
...ee(msg); + return 0; + } + return 1; +} + +/* + * Send a response back to the host. + */ + +static void +kvp_respond_to_host(char *key, char *value, int error) +{ + struct hv_kvp_msg *kvp_msg; + struct hv_kvp_msg_enumerate *kvp_data; + char *key_name; + struct icmsg_hdr *icmsghdrp; + int keylen, valuelen; + u32 buf_len; + struct vmbus_channel *channel; + u64 req_id; + + /* + * If a transaction is not active; log and return. + */ + + if (!kvp_transaction.active) { + /* + * This is a spurious call! + */ + printk(KERN_WARNING "KVP: Transaction not active\n"); + return; + } + /* + *...
2012 Nov 01
2
[PATCH 0/2] New inspect_list_applications2 API
Here's the new API method and update to virt-inspector. I still need to implement app_arch for debian and windows (if applicable), for now they just return empty strings.
2010 Nov 22
1
[PATCH 3/3]: An implementation of HyperV KVP functionality
An implementation of key/value pair feature (KVP) for Linux on HyperV. In this version of the patch I have addressed all the comments I have received to date. I have also included the code for the user-level daemon here for your reference. Signed-off-by: K. Y. Srinivasan <ksrinivasan at novell.com> -------------- next part -------------- An embedded and charset-unspecified text was
2010 Nov 22
1
[PATCH 3/3]: An implementation of HyperV KVP functionality
An implementation of key/value pair feature (KVP) for Linux on HyperV. In this version of the patch I have addressed all the comments I have received to date. I have also included the code for the user-level daemon here for your reference. Signed-off-by: K. Y. Srinivasan <ksrinivasan at novell.com> -------------- next part -------------- An embedded and charset-unspecified text was
2012 Nov 01
4
[PATCH v2 0/3] New inspect_list_applications2 API
Here's the new API method and update to virt-inspector. I still need to implement app_arch for debian and windows (if applicable), for now they just return empty strings. New in v2: incorporated feedback from v1, also added patch #3 which updates the documentation where it references the deprecated API. Take it or leave it.
2012 Oct 18
10
[PATCH 0/10] Add a mini-library for running external commands.
Inspired by libvirt's virCommand* internal mini-library, this adds some internal APIs for running commands. The first patch contains the new APIs. The subsequent patches change various parts of the library over to use it. Rich.