[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] rumpkernel dependencies
From: |
Samuel Thibault |
Subject: |
Re: [PATCH] rumpkernel dependencies |
Date: |
Sun, 29 Mar 2020 03:02:21 +0200 |
User-agent: |
NeoMutt/20170609 (1.8.3) |
> diff --git a/libmachdevrump/block.c b/libmachdevrump/block.c
> new file mode 100644
> index 000000000..e4b519bb8
> --- /dev/null
> +++ b/libmachdevrump/block.c
> +static io_return_t
> +device_open (mach_port_t reply_port, mach_msg_type_name_t reply_port_type,
> + dev_mode_t mode, char *name, device_t *devp,
> + mach_msg_type_name_t *devicePoly)
> +{
> + io_return_t err = D_SUCCESS;
> + struct block_data *bd = NULL;
> + char *dev_name;
> + off_t media_size;
> + uint32_t block_size;
> +
> + mach_print("device open\n");
> + dev_name = translate_name (name);
Are these mach_print calls still needed for your debugging? I'm fine
with committing some of them for now, but perhaps they are now useless
already?
> diff --git a/libmachdevrump/dev_hdr.h b/libmachdevrump/dev_hdr.h
> new file mode 100644
> index 000000000..79edc43a3
> --- /dev/null
> +++ b/libmachdevrump/dev_hdr.h
Most of this doesn't seem to be used? Only this:
+/* This structure is associated with each open device port.
+ * The port representing the device points to this structure. */
+struct emul_device
+{
+ struct device_emulation_ops *emul_ops;
+ void *emul_data;
+};
+
+typedef struct emul_device *emul_device_t;
+
+#define DEVICE_NULL ((device_t) 0)
+
+/*
+ * Generic device header. May be allocated with the device,
+ * or built when the device is opened.
+ */
+struct mach_device {
+ struct port_info port;
+ struct emul_device dev; /* the real device structure */
+};
+typedef struct mach_device *mach_device_t;
+#define MACH_DEVICE_NULL ((mach_device_t)0)
I see that most of the patch is actually coming from the incubator's
dde-based libmachdev. I'd rather avoid having two copies of that code in
different Hurd repos :)
I'd say what we want to do is:
- put the files common to dde-based and rump-based libmachdev to
libmachdev/. That includes basically all your files except disk.c,
machdevrump.c and Makefile. The only real discrepancy I see is in
ds_routines.c' call to l4dde26_process_from_ddekit, but we can make
libmachdevdde provide a function that does that call then call
ds_server(). AIUI the call to is_master_device() should indeed be made
like in the incubator? I don't think we should deallocate it at the
very least, was it really needed in your tests?
- move the dde-based files (for network) to a libmachdevdde/
- put your rump-based disk.c to a libmachdevrump/
and the rumpdisk daemon will just need to link in both libmachdev and
libmachdevrump.
Samuel
- Re: [PATCH] rumpkernel dependencies, (continued)
- Re: [PATCH] rumpkernel dependencies, Samuel Thibault, 2020/03/28
- Re: [PATCH] rumpkernel dependencies, Samuel Thibault, 2020/03/28
- Re: [PATCH] rumpkernel dependencies, Samuel Thibault, 2020/03/28
- Re: [PATCH] rumpkernel dependencies, Samuel Thibault, 2020/03/28
- Re: [PATCH] rumpkernel dependencies,
Samuel Thibault <=
- Re: [PATCH] rumpkernel dependencies, Damien Zammit, 2020/03/29
- Re: [PATCH] rumpkernel dependencies, Damien Zammit, 2020/03/29
- Re: [PATCH] rumpkernel dependencies, Samuel Thibault, 2020/03/29
- Re: [PATCH] rumpkernel dependencies, Samuel Thibault, 2020/03/29
- Re: [PATCH] rumpkernel dependencies, Samuel Thibault, 2020/03/29
- Re: [PATCH] rumpkernel dependencies, Damien Zammit, 2020/03/30
- Re: [PATCH] rumpkernel dependencies, Samuel Thibault, 2020/03/30
Re: [PATCH] rumpkernel dependencies, Samuel Thibault, 2020/03/29