All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <amc96@srcf.net>
To: Juergen Gross <jgross@suse.com>,
	minios-devel@lists.xenproject.org,
	xen-devel@lists.xenproject.org
Cc: samuel.thibault@ens-lyon.org, wl@xen.org
Subject: Re: [PATCH v2 03/12] mini-os: use alloc_file_type() and get_file_from_fd() in xs
Date: Wed, 12 Jan 2022 08:12:46 +0000	[thread overview]
Message-ID: <3124ed39-ba23-ccd1-a036-67032f36c0b7@srcf.net> (raw)
In-Reply-To: <501262b0-510b-3add-35a6-2f2ad7452518@suse.com>

On 12/01/2022 07:52, Juergen Gross wrote:
> On 11.01.22 21:21, Andrew Cooper wrote:
>> On 11/01/2022 15:12, Juergen Gross wrote:
>>>   void xs_daemon_close(struct xs_handle *h)
>>>   {
>>> -    int fd = _xs_fileno(h);
>>> -    struct xenbus_event *event, *next;
>>> -    for (event = files[fd].dev; event; event = next)
>>> -    {
>>> -        next = event->next;
>>> -        free(event);
>>> -    }
>>> +    close(_xs_fileno(h));
>>>   }
>>
>> You've deleted the sole caller of xs_daemon_close() from the main
>> close() function.
>>
>> That said, I'm very confused, because nothing in minios declares it.
>> The declaration appears to come from xenstore.h, which is clearly
>> included unconditionally (when it ought not to be), but libxenstore also
>> defines the function too...
> I already thought of restructuring this mess.
>
> lib/xs.c is the Mini-OS variant of libxenstore, and as such it shares
> quite some code with libxenstore.
>
> So the correct thing to do would be to split libxenstore into a common
> part and a posix/Mini-OS part, drop lib/xs.c, and use the library in
> Mini-OS instead.
>
> But this should be done in a separate series.

Sounds like a plan.

~Andrew


  reply	other threads:[~2022-01-12  8:13 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-11 15:12 [PATCH v2 00/12] mini-os: remove device specific struct file members Juergen Gross
2022-01-11 15:12 ` [PATCH v2 01/12] mini-os: remove event channel specific struct file definitions Juergen Gross
2022-01-11 19:50   ` Samuel Thibault
2022-01-11 15:12 ` [PATCH v2 02/12] mini-os: remove gnttab specific member from struct file Juergen Gross
2022-01-11 19:55   ` Samuel Thibault
2022-01-11 20:12   ` Andrew Cooper
2022-01-12  7:44     ` Juergen Gross
2022-01-11 15:12 ` [PATCH v2 03/12] mini-os: use alloc_file_type() and get_file_from_fd() in xs Juergen Gross
2022-01-11 20:06   ` Samuel Thibault
2022-01-11 20:11     ` Samuel Thibault
2022-01-11 20:14       ` Andrew Cooper
2022-01-11 20:21   ` Andrew Cooper
2022-01-12  7:52     ` Juergen Gross
2022-01-12  8:12       ` Andrew Cooper [this message]
2022-01-11 15:12 ` [PATCH v2 04/12] mini-os: use alloc_file_type() and get_file_from_fd() in tpm_tis Juergen Gross
2022-01-11 20:13   ` Samuel Thibault
2022-01-11 20:29   ` Andrew Cooper
2022-01-11 20:58     ` Jason Andryuk
2022-01-12  7:54     ` Juergen Gross
2022-01-12  8:14       ` Andrew Cooper
2022-01-11 15:12 ` [PATCH v2 05/12] mini-os: use alloc_file_type() and get_file_from_fd() in tpmfront Juergen Gross
2022-01-11 20:15   ` Samuel Thibault
2022-01-11 15:12 ` [PATCH v2 06/12] mini-os: use alloc_file_type() and get_file_from_fd() in blkfront Juergen Gross
2022-01-11 20:20   ` Samuel Thibault
2022-01-11 15:12 ` [PATCH v2 07/12] mini-os: use get_file_from_fd() in netfront Juergen Gross
2022-01-11 20:22   ` Samuel Thibault
2022-01-11 15:12 ` [PATCH v2 08/12] mini-os: use alloc_file_type() and get_file_from_fd() in fbfront Juergen Gross
2022-01-11 20:26   ` Samuel Thibault
2022-01-12  7:52     ` Juergen Gross
2022-01-11 15:12 ` [PATCH v2 09/12] mini-os: use file_ops and get_file_from_fd() for console Juergen Gross
2022-01-11 20:35   ` Samuel Thibault
2022-01-12  7:57     ` Juergen Gross
2022-01-12 10:30       ` Samuel Thibault
2022-01-12 10:30   ` Samuel Thibault
2022-01-12 11:23   ` Andrew Cooper
2022-01-12 11:30     ` Juergen Gross
2022-01-11 15:12 ` [PATCH v2 10/12] mini-os: add struct file_ops for file type socket Juergen Gross
2022-01-11 20:38   ` Samuel Thibault
2022-01-12 10:30   ` Samuel Thibault
2022-01-12 11:25   ` Andrew Cooper
2022-01-12 11:31     ` Juergen Gross
2022-01-12 11:28   ` Andrew Cooper
2022-01-12 11:32     ` Juergen Gross
2022-01-12 11:33       ` Andrew Cooper
2022-01-11 15:12 ` [PATCH v2 11/12] mini-os: add struct file_ops for FTYPE_FILE Juergen Gross
2022-01-11 20:42   ` Samuel Thibault
2022-01-11 15:12 ` [PATCH v2 12/12] mini-os: make files array private to sys.c Juergen Gross
2022-01-11 20:42   ` Samuel Thibault

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3124ed39-ba23-ccd1-a036-67032f36c0b7@srcf.net \
    --to=amc96@srcf.net \
    --cc=jgross@suse.com \
    --cc=minios-devel@lists.xenproject.org \
    --cc=samuel.thibault@ens-lyon.org \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.