[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH 03/11] tools/xenstore: let transaction_prepend() return the name for access
On 20.06.23 13:19, Julien Grall wrote: Hi Juergen, On 30/05/2023 10:13, Juergen Gross wrote:Instead of setting the TDB key for accessing the node in the data base, let transaction_prepend() return the associated name instead. This is in preparation to replace TDB with a more simple data storage. Signed-off-by: Juergen Gross <jgross@xxxxxxxx> --- tools/xenstore/xenstored_core.c | 4 +++- tools/xenstore/xenstored_transaction.c | 11 ++++------- tools/xenstore/xenstored_transaction.h | 3 +-- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/tools/xenstore/xenstored_core.c b/tools/xenstore/xenstored_core.c index a1d5d4a419..239f8c6bc4 100644 --- a/tools/xenstore/xenstored_core.c +++ b/tools/xenstore/xenstored_core.c@@ -694,6 +694,7 @@ struct node *read_node(struct connection *conn, const void *ctx,TDB_DATA key, data; struct xs_tdb_record_hdr *hdr; struct node *node; + const char *db_name;NIT: At the moment the local variable seems pointless given...int err; node = talloc(ctx, struct node);@@ -708,7 +709,8 @@ struct node *read_node(struct connection *conn, const void *ctx,return NULL; } - transaction_prepend(conn, name, &key); + db_name = transaction_prepend(conn, name); + set_tdb_key(db_name, &key);... you only use in one place. Will this change in follow-up patch? Yes. The additional use case will be added in patch 7. Anyway: Reviewed-by: Julien Grall <jgrall@xxxxxxxxxx> Thanks, Juergen Attachment:
OpenPGP_0xB0DE9DD628BF132F.asc Attachment:
OpenPGP_signature
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |