From nobody Sun Feb 8 23:26:50 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1562157720; cv=none; d=zoho.com; s=zohoarc; b=M7ft7ZpUACWndb1T4B/R/J8TQ0kekgQnRzeFf2VqPVGbNe8JBEi5R/K85lXGLnCKDx678EMxA2LFCugaj6d39vSb8Z+EfcBCSyVQa89yWqLj7dE0CIvOg/3/f31y3vDN8bMQZrzM9ABjTfsTUry4efHh1D7Fp7iGlA7Rjq8Z8Ak= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1562157720; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=Ulnt4k0hszRyBvk5WOG8GCd/4aXovETayo8ZTSAIpn4=; b=GEzxj23/wnbYCbLqKpCfc0QnZiPndjHG9SawWw7rOi+UnMSVh/nYHnVISSzMQQ/Ffitw4omss89viDmK07PY5pTWPNHlqFvtvsLEx4JPB2IwjWcsPzNpPIabdczi6fkJxH2NY7sk6vKwK5Jhs6hMbo6z1RXfAC/C3aEIemBJBJA= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1562157720890261.1225521791389; Wed, 3 Jul 2019 05:42:00 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 59EAF300194A; Wed, 3 Jul 2019 12:41:59 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3481683CDF; Wed, 3 Jul 2019 12:41:59 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id E0BA418433A1; Wed, 3 Jul 2019 12:41:58 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x63CcLdJ007965 for ; Wed, 3 Jul 2019 08:38:21 -0400 Received: by smtp.corp.redhat.com (Postfix) id 0958E17CEB; Wed, 3 Jul 2019 12:38:21 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8910F834EB for ; Wed, 3 Jul 2019 12:38:20 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Wed, 3 Jul 2019 14:38:05 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 13/14] util: Drop virsexpr module X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Wed, 03 Jul 2019 12:41:59 +0000 (UTC) Content-Type: text/plain; charset="utf-8" There are no users any more. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- po/POTFILES | 1 - src/libvirt_private.syms | 18 -- src/util/Makefile.inc.am | 2 - src/util/virsexpr.c | 608 --------------------------------------- src/util/virsexpr.h | 66 ----- 5 files changed, 695 deletions(-) delete mode 100644 src/util/virsexpr.c delete mode 100644 src/util/virsexpr.h diff --git a/po/POTFILES b/po/POTFILES index 8017712ff4..23f24ed76f 100644 --- a/po/POTFILES +++ b/po/POTFILES @@ -256,7 +256,6 @@ src/util/virscsi.c src/util/virscsihost.c src/util/virscsivhost.c src/util/virsecret.c -src/util/virsexpr.c src/util/virsocketaddr.c src/util/virstorageencryption.c src/util/virstoragefile.c diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index b8772d2895..0545c08428 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -2878,24 +2878,6 @@ virSecretLookupFormatSecret; virSecretLookupParseSecret; -# util/virsexpr.h -sexpr2string; -sexpr_append; -sexpr_cons; -sexpr_float; -sexpr_fmt_node; -sexpr_free; -sexpr_has; -sexpr_int; -sexpr_lookup; -sexpr_nil; -sexpr_node; -sexpr_node_copy; -sexpr_string; -sexpr_u64; -string2sexpr; - - # util/virsocketaddr.h virSocketAddrBroadcast; virSocketAddrBroadcastByPrefix; diff --git a/src/util/Makefile.inc.am b/src/util/Makefile.inc.am index c757f5a6ae..a47f333a98 100644 --- a/src/util/Makefile.inc.am +++ b/src/util/Makefile.inc.am @@ -179,8 +179,6 @@ UTIL_SOURCES =3D \ util/virseclabel.h \ util/virsecret.c \ util/virsecret.h \ - util/virsexpr.c \ - util/virsexpr.h \ util/virsocketaddr.c \ util/virsocketaddr.h \ util/virstorageencryption.c \ diff --git a/src/util/virsexpr.c b/src/util/virsexpr.c deleted file mode 100644 index bfac747f63..0000000000 --- a/src/util/virsexpr.c +++ /dev/null @@ -1,608 +0,0 @@ -/* - * virsexpr.c : S-Expression routines to communicate with the Xen Daemon - * - * Copyright (C) 2010-2011 Red Hat, Inc. - * Copyright (C) 2005 Anthony Liguori - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see - * . - * - */ - -#include - -#include "c-ctype.h" - -#include "virerror.h" -#include "virsexpr.h" -#include "viralloc.h" -#include "virstring.h" - -#define VIR_FROM_THIS VIR_FROM_SEXPR - - -/** - * sexpr_new: - * - * Create a new S-Expression - * - * Returns the new node or NULL in case of memory allocation error - */ -static struct sexpr * -sexpr_new(void) -{ - struct sexpr *ret; - - if (VIR_ALLOC(ret) < 0) - return NULL; - ret->kind =3D SEXPR_NIL; - return ret; -} - -/** - * sexpr_free: - * @sexpr: the S-Expression pointer - * - * Free an S-Expression - */ -void -sexpr_free(struct sexpr *sexpr) -{ - int serrno =3D errno; - - if (sexpr =3D=3D NULL) - return; - - switch (sexpr->kind) { - case SEXPR_CONS: - sexpr_free(sexpr->u.s.car); - sexpr_free(sexpr->u.s.cdr); - break; - case SEXPR_VALUE: - VIR_FREE(sexpr->u.value); - break; - case SEXPR_NIL: - break; - } - - VIR_FREE(sexpr); - - errno =3D serrno; -} - -/** - * sexpr_nil: - * - * Provide a NIL S-Expression (the pointer is not shared so NIL equality - * testing won't work at the pointer level). - * - * Returns a new NIL S-Expression of NULL in case of error. - */ -struct sexpr * -sexpr_nil(void) -{ - return sexpr_new(); -} - -/** - * sexpr_string: - * @str: the input string, assumed to be UTF-8 - * @len: the length in bytes of the input - * - * Parse the input S-Expression and return a pointer to the result - * - * Returns the S-Expression pointer or NULL in case of error - */ -struct sexpr * -sexpr_string(const char *str, ssize_t len) -{ - struct sexpr *ret =3D sexpr_new(); - - if (ret =3D=3D NULL) - return ret; - ret->kind =3D SEXPR_VALUE; - - if (VIR_STRNDUP(ret->u.value, str, len) < 0) - VIR_FREE(ret); - - return ret; -} - -/** - * sexpr_cons: - * @car: the left operand - * @cdr: the right operand - * - * Implement the CONS operation assembling 2 existing S-Expressions. - * Note that in case of error the input data are not freed. - * - * Returns the resulting S-Expression pointer or NULL in case of error. - */ -struct sexpr * -sexpr_cons(const struct sexpr *car, const struct sexpr *cdr) -{ - struct sexpr *ret =3D sexpr_new(); - - if (ret =3D=3D NULL) - return ret; - ret->kind =3D SEXPR_CONS; - ret->u.s.car =3D (struct sexpr *) car; - ret->u.s.cdr =3D (struct sexpr *) cdr; - - return ret; -} - -/** - * append: - * @lst: an existing list - * @value: the value - * - * Internal operation appending a value at the end of an existing list - */ -static int -append(struct sexpr *lst, const struct sexpr *value) -{ - struct sexpr *nil =3D sexpr_nil(); - - if (nil =3D=3D NULL) - return -1; - - while (lst->kind !=3D SEXPR_NIL) - lst =3D lst->u.s.cdr; - - lst->kind =3D SEXPR_CONS; - lst->u.s.car =3D (struct sexpr *) value; - lst->u.s.cdr =3D nil; - - return 0; -} - -/** - * @lst: an existing list - * @value: the value - * - * Append a value at the end of an existing list - * - * Returns lst or NULL in case of error - */ -struct sexpr * -sexpr_append(struct sexpr *lst, const struct sexpr *value) -{ - if (lst =3D=3D NULL) - return NULL; - if (value =3D=3D NULL) - return lst; - if (append(lst, value) < 0) - return NULL; - return lst; -} - -/** - * sexpr2string: - * @sexpr: an S-Expression pointer - * @buffer: the output buffer - * - * Serialize the S-Expression in the buffer. - * - * Returns 0 on success, -1 on error. - */ -int -sexpr2string(const struct sexpr *sexpr, virBufferPtr buffer) -{ - if ((sexpr =3D=3D NULL) || (buffer =3D=3D NULL)) - return -1; - - switch (sexpr->kind) { - case SEXPR_CONS: - virBufferAddChar(buffer, '('); - - if (sexpr2string(sexpr->u.s.car, buffer) < 0) - return -1; - - while (sexpr->u.s.cdr->kind !=3D SEXPR_NIL) { - sexpr =3D sexpr->u.s.cdr; - - virBufferAddChar(buffer, ' '); - - if (sexpr2string(sexpr->u.s.car, buffer) < 0) - return -1; - } - - virBufferAddChar(buffer, ')'); - break; - case SEXPR_VALUE: - if (strchr(sexpr->u.value, ' ') || - strchr(sexpr->u.value, ')') || - strchr(sexpr->u.value, '(')) - virBufferAsprintf(buffer, "'%s'", sexpr->u.value); - else - virBufferAdd(buffer, sexpr->u.value, -1); - - break; - case SEXPR_NIL: - virBufferAddLit(buffer, "()"); - break; - default: - virReportError(VIR_ERR_SEXPR_SERIAL, - _("unknown s-expression kind %d"), sexpr->kind); - return -1; - } - - return 0; -} - -#define IS_SPACE(c) ((c =3D=3D 0x20) || (c =3D=3D 0x9) || (c =3D=3D 0xD) |= | (c =3D=3D 0xA)) - -static const char * -trim(const char *string) -{ - while (IS_SPACE(*string)) - string++; - return string; -} - -/** - * _string2sexpr: - * @buffer: a zero terminated buffer containing an S-Expression in UTF-8 - * @end: pointer to an index in the buffer for the already parsed bytes - * - * Internal routine implementing the parse of S-Expression - * Note that failure in this function is catastrophic. If it returns - * NULL, you've leaked memory and you're currently OOM. It will always - * parse an SEXPR given a buffer - * - * Returns a pointer to the resulting parsed S-Expression, or NULL in case= of - * hard error. - */ -static struct sexpr * -_string2sexpr(const char *buffer, size_t * end) -{ - const char *ptr =3D buffer + *end; - struct sexpr *ret =3D sexpr_new(); - - if (ret =3D=3D NULL) - return NULL; - - ptr =3D trim(ptr); - - if (ptr[0] =3D=3D '(') { - ret->kind =3D SEXPR_NIL; - - ptr =3D trim(ptr + 1); - while (*ptr && *ptr !=3D ')') { - struct sexpr *tmp; - size_t tmp_len =3D 0; - - tmp =3D _string2sexpr(ptr, &tmp_len); - if (tmp =3D=3D NULL) - goto error; - if (append(ret, tmp) < 0) { - sexpr_free(tmp); - goto error; - } - ptr =3D trim(ptr + tmp_len); - } - - if (*ptr =3D=3D ')') - ptr++; - } else { - const char *start; - - if (*ptr =3D=3D '\'') { - ptr++; - start =3D ptr; - - while (*ptr && *ptr !=3D '\'') { - if (*ptr =3D=3D '\\' && ptr[1]) - ptr++; - ptr++; - } - - if (VIR_STRNDUP(ret->u.value, start, ptr - start) < 0) - goto error; - - if (*ptr =3D=3D '\'') - ptr++; - } else { - start =3D ptr; - - while (*ptr && !c_isspace(*ptr) - && *ptr !=3D ')' && *ptr !=3D '(') { - ptr++; - } - - if (VIR_STRNDUP(ret->u.value, start, ptr - start) < 0) - goto error; - } - - ret->kind =3D SEXPR_VALUE; - if (ret->u.value =3D=3D NULL) - goto error; - } - - *end =3D ptr - buffer; - - return ret; - - error: - sexpr_free(ret); - return NULL; -} - -/** - * string2sexpr: - * @buffer: a zero terminated buffer containing an S-Expression in UTF-8 - * - * Parse the S-Expression in the buffer. - * Note that failure in this function is catastrophic. If it returns - * NULL, you've leaked memory and you're currently OOM. It will always - * parse an SEXPR given a buffer - * - * Returns a pointer to the resulting parsed S-Expression, or NULL in case= of - * hard error. - */ -struct sexpr * -string2sexpr(const char *buffer) -{ - size_t dummy =3D 0; - - return _string2sexpr(buffer, &dummy); -} - - -/** - * sexpr_lookup_key: - * @sexpr: a pointer to a parsed S-Expression - * @node: a path for the sub expression to lookup in the S-Expression - * - * Search a sub expression in the S-Expression based on its path - * Returns the key node, rather than the data node. - * NOTE: path are limited to 4096 bytes. - * - * Returns the pointer to the sub expression or NULL if not found. - */ -static struct sexpr * -sexpr_lookup_key(const struct sexpr *sexpr, const char *node) -{ - struct sexpr *result =3D NULL; - char *buffer, *ptr, *token; - - if ((node =3D=3D NULL) || (sexpr =3D=3D NULL)) - return NULL; - - if (VIR_STRDUP(buffer, node) < 0) - return NULL; - - ptr =3D buffer; - token =3D strsep(&ptr, "/"); - - if (sexpr->kind !=3D SEXPR_CONS || sexpr->u.s.car->kind !=3D SEXPR_VAL= UE) - goto cleanup; - - if (STRNEQ(sexpr->u.s.car->u.value, token)) - goto cleanup; - - for (token =3D strsep(&ptr, "/"); token; token =3D strsep(&ptr, "/")) { - const struct sexpr *i; - - sexpr =3D sexpr->u.s.cdr; - for (i =3D sexpr; i->kind !=3D SEXPR_NIL; i =3D i->u.s.cdr) { - if (i->kind !=3D SEXPR_CONS || - i->u.s.car->kind !=3D SEXPR_CONS || - i->u.s.car->u.s.car->kind !=3D SEXPR_VALUE) { - continue; - } - - if (STREQ(i->u.s.car->u.s.car->u.value, token)) { - sexpr =3D i->u.s.car; - break; - } - } - - if (i->kind =3D=3D SEXPR_NIL) - break; - } - - if (token !=3D NULL) - goto cleanup; - - result =3D (struct sexpr *) sexpr; - - cleanup: - VIR_FREE(buffer); - - return result; -} - -/** - * sexpr_lookup: - * @sexpr: a pointer to a parsed S-Expression - * @node: a path for the sub expression to lookup in the S-Expression - * - * Search a sub expression in the S-Expression based on its path. - * NOTE: path are limited to 4096 bytes. - * - * Returns the pointer to the sub expression or NULL if not found. - */ -struct sexpr * -sexpr_lookup(const struct sexpr *sexpr, const char *node) -{ - struct sexpr *s =3D sexpr_lookup_key(sexpr, node); - - if (s =3D=3D NULL) - return NULL; - - if (s->kind !=3D SEXPR_CONS || s->u.s.cdr->kind !=3D SEXPR_CONS) - return NULL; - - return s->u.s.cdr; -} - -/** - * sexpr_has: - * @sexpr: a pointer to a parsed S-Expression - * @node: a path for the sub expression to lookup in the S-Expression - * - * Search a sub expression in the S-Expression based on its path. - * NOTE: path are limited to 4096 bytes. - * NB, even if the key was found sexpr_lookup may return NULL if - * the corresponding value was empty - * - * Returns true if the key was found, false otherwise - */ -int -sexpr_has(const struct sexpr *sexpr, const char *node) -{ - struct sexpr *s =3D sexpr_lookup_key(sexpr, node); - - if (s =3D=3D NULL) - return 0; - - if (s->kind !=3D SEXPR_CONS) - return 0; - - return 1; -} - -/** - * sexpr_node: - * @sexpr: a pointer to a parsed S-Expression - * @node: a path for the node to lookup in the S-Expression - * - * Search a node value in the S-Expression based on its path - * NOTE: path are limited to 4096 bytes. - * - * Returns the value of the node or NULL if not found. - */ -const char * -sexpr_node(const struct sexpr *sexpr, const char *node) -{ - struct sexpr *n =3D sexpr_lookup(sexpr, node); - - return (n && n->u.s.car->kind =3D=3D SEXPR_VALUE) ? n->u.s.car->u.valu= e : NULL; -} - -int sexpr_node_copy(const struct sexpr *sexpr, const char *node, char **ds= t) -{ - const char *val =3D sexpr_node(sexpr, node); - - if (val && *val) - return VIR_STRDUP(*dst, val) < 0 ? -1 : 0; - - *dst =3D NULL; - return 0; -} - - -/** - * sexpr_fmt_node: - * @sexpr: a pointer to a parsed S-Expression - * @fmt: a path for the node to lookup in the S-Expression - * @... extra data to build the path - * - * Search a node value in the S-Expression based on its path - * - * Returns the value of the node or NULL if not found. - */ -const char * -sexpr_fmt_node(const struct sexpr *sexpr, const char *fmt, ...) -{ - int result; - va_list ap; - char *node; - const char *value; - - va_start(ap, fmt); - result =3D virVasprintf(&node, fmt, ap); - va_end(ap); - - if (result < 0) - return NULL; - - value =3D sexpr_node(sexpr, node); - - VIR_FREE(node); - - return value; -} - -/** - * sexpr_int: - * @sexpr: an S-Expression - * @name: the name for the value - * - * convenience function to lookup an int value in the S-Expression - * - * Returns the value found or 0 if not found (but may not be an error). - * This function suffers from the flaw that zero is both a correct - * return value and an error indicator: careful! - */ -int -sexpr_int(const struct sexpr *sexpr, const char *name) -{ - const char *value =3D sexpr_node(sexpr, name); - - if (value) { - int val =3D 0; - ignore_value(virStrToLong_i(value, NULL, 0, &val)); - return val; - } - return 0; -} - - -/** - * sexpr_float: - * @sexpr: an S-Expression - * @name: the name for the value - * - * convenience function to lookup a float value in the S-Expression - * - * Returns the value found or 0 if not found (but may not be an error) - */ -double -sexpr_float(const struct sexpr *sexpr, const char *name) -{ - const char *value =3D sexpr_node(sexpr, name); - - if (value) { - double val =3D 0; - ignore_value(virStrToDouble(value, NULL, &val)); - return val; - } - return 0; -} - -/** - * sexpr_u64: - * @sexpr: an S-Expression - * @name: the name for the value - * - * convenience function to lookup a 64bits unsigned int value in the - * S-Expression - * - * Returns the value found or 0 if not found (but may not be an error) - */ -uint64_t -sexpr_u64(const struct sexpr *sexpr, const char *name) -{ - const char *value =3D sexpr_node(sexpr, name); - - if (value) { - unsigned long long val =3D 0; - ignore_value(virStrToLong_ull(value, NULL, 0, &val)); - return val; - } - return 0; -} diff --git a/src/util/virsexpr.h b/src/util/virsexpr.h deleted file mode 100644 index d140659722..0000000000 --- a/src/util/virsexpr.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - * virsexpr.h : S-Expression interfaces needed to communicate with the Xen= Daemon - * - * Copyright (C) 2012 Red Hat, Inc. - * Copyright (C) 2005 Anthony Liguori - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see - * . - * - */ - -#pragma once - -#include "internal.h" -#include "virbuffer.h" - -enum sexpr_type { - SEXPR_NIL, - SEXPR_CONS, - SEXPR_VALUE, -}; - -struct sexpr { - enum sexpr_type kind; - union { - struct { - struct sexpr *car; - struct sexpr *cdr; - } s; - char *value; - } u; -}; - -/* conversion to/from strings */ -int sexpr2string(const struct sexpr *sexpr, virBufferPtr buffer); -struct sexpr *string2sexpr(const char *buffer); - -/* constructors and destructors */ -struct sexpr *sexpr_nil(void); -struct sexpr *sexpr_string(const char *str, ssize_t len); -struct sexpr *sexpr_cons(const struct sexpr *car, const struct sexpr *cdr); -struct sexpr *sexpr_append(struct sexpr *lst, const struct sexpr *item); -void sexpr_free(struct sexpr *sexpr); - -/* lookup in S-Expressions */ -const char *sexpr_node(const struct sexpr *sexpr, const char *node); -int sexpr_node_copy(const struct sexpr *sexpr, const char *node, char **ds= t); -const char *sexpr_fmt_node(const struct sexpr *sexpr, const char *fmt, ...) - ATTRIBUTE_FMT_PRINTF(2,3); -struct sexpr *sexpr_lookup(const struct sexpr *sexpr, const char *node); -int sexpr_has(const struct sexpr *sexpr, const char *node); - -int sexpr_int(const struct sexpr *sexpr, const char *name); -double sexpr_float(const struct sexpr *sexpr, const char *name); -uint64_t sexpr_u64(const struct sexpr *sexpr, const char *name); --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list