diff --git a/system/core/devmgr/devhost/core.cpp b/system/core/devmgr/devhost/core.cpp index 952eb360999a4ca8b4a6ea1b317a74e57e73f21c..415fc98fc21930f7caf7ded7264f0da74610fcf1 100644 --- a/system/core/devmgr/devhost/core.cpp +++ b/system/core/devmgr/devhost/core.cpp @@ -26,7 +26,6 @@ #include <zircon/types.h> #include <fbl/auto_lock.h> -#include <lib/fdio/remoteio.h> namespace devmgr { diff --git a/system/core/devmgr/devhost/devhost.cpp b/system/core/devmgr/devhost/devhost.cpp index 8953cf5af422693bb194ed25147e0bcc35d11d36..bb14d76083c3e63ffe81746eb12ec320c814224f 100644 --- a/system/core/devmgr/devhost/devhost.cpp +++ b/system/core/devmgr/devhost/devhost.cpp @@ -32,7 +32,6 @@ #include <lib/async/cpp/receiver.h> #include <lib/async/cpp/wait.h> #include <lib/fdio/util.h> -#include <lib/fdio/remoteio.h> #include <lib/fidl/coding.h> #include <lib/zx/debuglog.h> #include <lib/zx/resource.h> diff --git a/system/core/devmgr/devhost/devhost.h b/system/core/devmgr/devhost/devhost.h index 6591257eaf34dc40067da4a49b71037fa8a4277b..d53eac53baeea83ec6e645ff79ead49e3bbce2c2 100644 --- a/system/core/devmgr/devhost/devhost.h +++ b/system/core/devmgr/devhost/devhost.h @@ -18,7 +18,6 @@ #include <fbl/string.h> #include <fbl/unique_ptr.h> #include <lib/async/cpp/wait.h> -#include <lib/fdio/remoteio.h> #include <lib/zx/channel.h> #include <zircon/compiler.h> #include <zircon/fidl.h> diff --git a/system/core/devmgr/devhost/rpc-server.cpp b/system/core/devmgr/devhost/rpc-server.cpp index 5dbe802293bc16f8c359263bd284ec0d4317aca2..a24f96297f5d3464f56e3f8c4de094e0452c339b 100644 --- a/system/core/devmgr/devhost/rpc-server.cpp +++ b/system/core/devmgr/devhost/rpc-server.cpp @@ -26,6 +26,7 @@ #include <zircon/syscalls.h> #include <zircon/types.h> +#include <fs/connection.h> #include <fs/handler.h> #include <fuchsia/io/c/fidl.h> #include <lib/fdio/debug.h> @@ -49,7 +50,8 @@ void describe_error(zx::channel h, zx_status_t status) { h.write(0, &msg, sizeof(msg), nullptr, 0); } -static zx_status_t create_description(const fbl::RefPtr<zx_device_t>& dev, zxfidl_on_open_t* msg, +static zx_status_t create_description(const fbl::RefPtr<zx_device_t>& dev, + fs::OnOpenMsg* msg, zx::eventpair* handle) { memset(msg, 0, sizeof(*msg)); msg->primary.hdr.ordinal = fuchsia_io_NodeOnOpenOrdinal; @@ -100,7 +102,7 @@ static zx_status_t devhost_get_handles(zx::channel rh, const fbl::RefPtr<zx_devi newconn->dev = new_dev; if (describe) { - zxfidl_on_open_t info; + fs::OnOpenMsg info; zx::eventpair handle; if ((r = create_description(new_dev, &info, &handle)) != ZX_OK) { goto fail_open; diff --git a/system/core/devmgr/devmgr/devfs.cpp b/system/core/devmgr/devmgr/devfs.cpp index dc54946724f8a2e3bef4af17c2378bbf1d2d4715..26ef424d1919e0737750268621c7ed2b1ad2d70a 100644 --- a/system/core/devmgr/devmgr/devfs.cpp +++ b/system/core/devmgr/devmgr/devfs.cpp @@ -15,10 +15,10 @@ #include <fbl/intrusive_double_list.h> #include <fbl/string.h> +#include <fs/connection.h> #include <fs/handler.h> #include <fuchsia/io/c/fidl.h> #include <lib/async/cpp/wait.h> -#include <lib/fdio/remoteio.h> #include <lib/fdio/util.h> #include <lib/fidl/coding.h> #include <lib/memfs/cpp/vnode.h> @@ -594,7 +594,7 @@ static void devfs_open(Devnode* dirdn, zx_handle_t h, char* path, uint32_t flags return; } if (describe) { - zxfidl_on_open_t msg; + fs::OnOpenMsg msg; memset(&msg, 0, sizeof(msg)); msg.primary.hdr.ordinal = fuchsia_io_NodeOnOpenOrdinal; msg.primary.s = ZX_OK; diff --git a/system/core/devmgr/fshost/fshost.h b/system/core/devmgr/fshost/fshost.h index bd37a8625ae9551185a1ce18520c161bc298ff02..27fc429ba1316b05dd06f107fbf506d47680b20d 100644 --- a/system/core/devmgr/fshost/fshost.h +++ b/system/core/devmgr/fshost/fshost.h @@ -7,7 +7,6 @@ #include <lib/async-loop/cpp/loop.h> #include <lib/async/cpp/wait.h> #include <lib/fdio/io.h> -#include <lib/fdio/remoteio.h> #include <lib/fdio/vfs.h> #include <lib/memfs/cpp/vnode.h> #include <lib/zx/channel.h> diff --git a/system/core/devmgr/fshost/vfs-rpc.cpp b/system/core/devmgr/fshost/vfs-rpc.cpp index 2c8a2fcf996371e2496aea9e2ab388102546f481..279d605898e5b8405d72a8bd6ba5e392cb7fb00a 100644 --- a/system/core/devmgr/fshost/vfs-rpc.cpp +++ b/system/core/devmgr/fshost/vfs-rpc.cpp @@ -19,7 +19,6 @@ #include <zircon/thread_annotations.h> #include <lib/fdio/debug.h> #include <lib/fdio/io.h> -#include <lib/fdio/remoteio.h> #include <fbl/algorithm.h> #include <fbl/alloc_checker.h> #include <fbl/auto_lock.h> diff --git a/system/ulib/blobfs/rpc.cpp b/system/ulib/blobfs/rpc.cpp index f4e9556660632f98c7996cc4b89f6be8e130a906..0fd301d5c269bff430788f83cefa35209b97feb1 100644 --- a/system/ulib/blobfs/rpc.cpp +++ b/system/ulib/blobfs/rpc.cpp @@ -12,7 +12,6 @@ #include <fs/vfs.h> #include <fuchsia/io/c/fidl.h> #include <lib/fdio/io.h> -#include <lib/fdio/remoteio.h> #include <lib/fdio/util.h> #include <lib/fdio/vfs.h> #include <zircon/device/vfs.h> diff --git a/system/ulib/fdio/bsdsocket.c b/system/ulib/fdio/bsdsocket.c index 99a065a5be8c1b9a846590f127d8d2f2e24d04b5..bde8431c9ebb6294ddb730523ba951c746cb015d 100644 --- a/system/ulib/fdio/bsdsocket.c +++ b/system/ulib/fdio/bsdsocket.c @@ -20,7 +20,6 @@ #include <lib/fdio/debug.h> #include <lib/fdio/io.h> -#include <lib/fdio/remoteio.h> #include <lib/fdio/util.h> #include <lib/zxs/zxs.h> diff --git a/system/ulib/fdio/get-vmo.c b/system/ulib/fdio/get-vmo.c index 62544370c84dec7a0ce478869919af5b63c38f8b..44e9982cf5d87601e8d715c191c4242f32c1531e 100644 --- a/system/ulib/fdio/get-vmo.c +++ b/system/ulib/fdio/get-vmo.c @@ -5,12 +5,11 @@ #include "private.h" #include "unistd.h" -#include <zircon/process.h> -#include <zircon/syscalls.h> - +#include <fuchsia/io/c/fidl.h> #include <lib/fdio/io.h> -#include <lib/fdio/remoteio.h> #include <lib/fdio/vfs.h> +#include <zircon/process.h> +#include <zircon/syscalls.h> #define MIN_WINDOW (PAGE_SIZE * 4) #define MAX_WINDOW ((size_t)64 << 20) diff --git a/system/ulib/fdio/include/lib/fdio/remoteio.h b/system/ulib/fdio/include/lib/fdio/remoteio.h deleted file mode 100644 index e8e06ef261bb7f878ef59e16316212ca98bd73bb..0000000000000000000000000000000000000000 --- a/system/ulib/fdio/include/lib/fdio/remoteio.h +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2016 The Fuchsia Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#pragma once - -#include <fuchsia/io/c/fidl.h> -#include <zircon/compiler.h> - -__BEGIN_CDECLS - -// A one-way message which may be emitted by the server without an -// accompanying request. Optionally used as a part of the Open handshake. -typedef struct { - fuchsia_io_NodeOnOpenEvent primary; - fuchsia_io_NodeInfo extra; -} zxfidl_on_open_t; - -__END_CDECLS diff --git a/system/ulib/fdio/namespace.c b/system/ulib/fdio/namespace.c index 4431ecab05f7fa04de97e1a2f0441f9cb16033b5..5852826f55acd58694c237a8810b3d08c2bbb8c0 100644 --- a/system/ulib/fdio/namespace.c +++ b/system/ulib/fdio/namespace.c @@ -16,7 +16,6 @@ #include <fuchsia/io/c/fidl.h> #include <lib/fdio/namespace.h> -#include <lib/fdio/remoteio.h> #include <lib/fdio/util.h> #include <lib/fdio/vfs.h> diff --git a/system/ulib/fdio/private.h b/system/ulib/fdio/private.h index 7d51b1c5dc807f571cf4fcf0e851c4d307994181..0d2a4390b2e655f34d91f0181027f2d3acc0aab7 100644 --- a/system/ulib/fdio/private.h +++ b/system/ulib/fdio/private.h @@ -6,7 +6,6 @@ #include <zircon/types.h> #include <lib/fdio/limits.h> -#include <lib/fdio/remoteio.h> #include <lib/fdio/vfs.h> #include <stdarg.h> #include <stdatomic.h> diff --git a/system/ulib/fdio/remoteio.c b/system/ulib/fdio/remoteio.c index e227a1ccfbd2d33d218704efa1f76af587bbc1ea..439443ef01d0dc3f1405f99b7136e5597063265f 100644 --- a/system/ulib/fdio/remoteio.c +++ b/system/ulib/fdio/remoteio.c @@ -25,7 +25,6 @@ #include <lib/fdio/debug.h> #include <lib/fdio/io.h> #include <lib/fdio/namespace.h> -#include <lib/fdio/remoteio.h> #include <lib/fdio/util.h> #include <lib/fdio/vfs.h> @@ -122,11 +121,18 @@ static zx_status_t zxrio_connect(zx_handle_t svc, zx_handle_t cnxn, return r; } +// A one-way message which may be emitted by the server without an +// accompanying request. Optionally used as a part of the Open handshake. +typedef struct { + fuchsia_io_NodeOnOpenEvent primary; + fuchsia_io_NodeInfo extra; +} fdio_on_open_msg_t; + // Takes ownership of the optional |extra_handle|. // // Decodes the handle into |info|, if it exists and should // be decoded. -static zx_status_t zxrio_decode_describe_handle(zxfidl_on_open_t* info, +static zx_status_t zxrio_decode_describe_handle(fdio_on_open_msg_t* info, zx_handle_t extra_handle) { bool have_handle = (extra_handle != ZX_HANDLE_INVALID); bool want_handle = false; @@ -187,7 +193,7 @@ fail: // message is aligned. // // Does not close |h|, even on error. -static zx_status_t zxrio_process_open_response(zx_handle_t h, zxfidl_on_open_t* info) { +static zx_status_t zxrio_process_open_response(zx_handle_t h, fdio_on_open_msg_t* info) { zx_object_wait_one(h, ZX_CHANNEL_READABLE | ZX_CHANNEL_PEER_CLOSED, ZX_TIME_INFINITE, NULL); @@ -207,7 +213,7 @@ static zx_status_t zxrio_process_open_response(zx_handle_t h, zxfidl_on_open_t* r = info->primary.s; } - if (dsize != sizeof(zxfidl_on_open_t)) { + if (dsize != sizeof(fdio_on_open_msg_t)) { r = (r != ZX_OK) ? r : ZX_ERR_IO; } @@ -218,13 +224,13 @@ static zx_status_t zxrio_process_open_response(zx_handle_t h, zxfidl_on_open_t* return r; } - // Confirm that the objects "zxfidl_on_open_t" and "fuchsia_io_NodeOnOpenEvent" + // Confirm that the objects "fdio_on_open_msg_t" and "fuchsia_io_NodeOnOpenEvent" // are aligned enough to be compatible. // // This is somewhat complicated by the fact that the "fuchsia_io_NodeOnOpenEvent" // object has an optional "fuchsia_io_NodeInfo" secondary which exists immediately // following the struct. - static_assert(__builtin_offsetof(zxfidl_on_open_t, extra) == + static_assert(__builtin_offsetof(fdio_on_open_msg_t, extra) == FIDL_ALIGN(sizeof(fuchsia_io_NodeOnOpenEvent)), "RIO Description message doesn't align with FIDL response secondary"); // Connection::NodeDescribe also relies on these static_asserts. @@ -526,7 +532,8 @@ fail: static zx_status_t zxrio_sync_open_connection(zx_handle_t svc, uint32_t op, uint32_t flags, uint32_t mode, const char* path, size_t pathlen, - zxfidl_on_open_t* info, zx_handle_t* out) { + fdio_on_open_msg_t* info, + zx_handle_t* out) { if (!(flags & ZX_FS_FLAG_DESCRIBE)) { return ZX_ERR_INVALID_ARGS; } @@ -571,7 +578,7 @@ static zx_status_t zxrio_sync_open_connection(zx_handle_t svc, uint32_t op, // |info| may contain an additional handle. static zx_status_t zxrio_getobject(zx_handle_t rio_h, uint32_t op, const char* name, uint32_t flags, uint32_t mode, - zxfidl_on_open_t* info, zx_handle_t* out) { + fdio_on_open_msg_t* info, zx_handle_t* out) { if (name == NULL) { return ZX_ERR_INVALID_ARGS; } @@ -604,7 +611,7 @@ static zx_status_t zxrio_getobject(zx_handle_t rio_h, uint32_t op, const char* n zx_status_t zxrio_open_handle(zx_handle_t h, const char* path, uint32_t flags, uint32_t mode, fdio_t** out) { zx_handle_t control_channel = ZX_HANDLE_INVALID; - zxfidl_on_open_t info; + fdio_on_open_msg_t info; zx_status_t r = zxrio_getobject(h, fuchsia_io_DirectoryOpenOrdinal, path, flags, mode, &info, &control_channel); if (r < 0) { return r; diff --git a/system/ulib/fdio/socket.c b/system/ulib/fdio/socket.c index 4695646eefb418a8162aa89617ec00c749a8fdbb..5095431b437378b55b8f4854104a7239c4520a31 100644 --- a/system/ulib/fdio/socket.c +++ b/system/ulib/fdio/socket.c @@ -13,7 +13,6 @@ #include <zircon/syscalls.h> #include <lib/fdio/io.h> -#include <lib/fdio/remoteio.h> #include <lib/fdio/util.h> #include <lib/zxs/protocol.h> diff --git a/system/ulib/fdio/unistd.c b/system/ulib/fdio/unistd.c index 5c3ac1c06ee8d336cf6482e618980f7a7d38adb9..a45f5fdf9b2eeaf225814ed387626f1ffe2f4861 100644 --- a/system/ulib/fdio/unistd.c +++ b/system/ulib/fdio/unistd.c @@ -36,7 +36,6 @@ #include <lib/fdio/io.h> #include <lib/fdio/namespace.h> #include <lib/fdio/private.h> -#include <lib/fdio/remoteio.h> #include <lib/fdio/unsafe.h> #include <lib/fdio/util.h> #include <lib/fdio/vfs.h> diff --git a/system/ulib/fdio/vmofile.c b/system/ulib/fdio/vmofile.c index 8c415858286dff1948cfe03df9e2581571be058c..0f5a3ee5d7dbfe87ea57040bbb7f678db0ce1a1d 100644 --- a/system/ulib/fdio/vmofile.c +++ b/system/ulib/fdio/vmofile.c @@ -11,7 +11,6 @@ #include <fuchsia/io/c/fidl.h> #include <lib/fdio/io.h> -#include <lib/fdio/remoteio.h> #include <lib/fdio/util.h> #include <lib/fdio/vfs.h> #include <zircon/device/vfs.h> diff --git a/system/ulib/fs/connection.cpp b/system/ulib/fs/connection.cpp index 4326bbadb0f299599e1f652eacfc55840b228ebb..2a20505d2adb114d33c2360182dbdc17a30d4e24 100644 --- a/system/ulib/fs/connection.cpp +++ b/system/ulib/fs/connection.cpp @@ -17,7 +17,6 @@ #include <fuchsia/io/c/fidl.h> #include <lib/fdio/debug.h> #include <lib/fdio/io.h> -#include <lib/fdio/remoteio.h> #include <lib/fdio/vfs.h> #include <lib/zx/handle.h> #include <zircon/assert.h> @@ -47,7 +46,7 @@ zx_status_t GetNodeInfo(const fbl::RefPtr<Vnode>& vn, uint32_t flags, } void Describe(const fbl::RefPtr<Vnode>& vn, uint32_t flags, - zxfidl_on_open_t* response, zx_handle_t* handle) { + OnOpenMsg* response, zx_handle_t* handle) { response->primary.hdr.ordinal = fuchsia_io_NodeOnOpenOrdinal; response->extra.file.event = ZX_HANDLE_INVALID; zx_status_t r = GetNodeInfo(vn, flags, &response->extra); @@ -136,12 +135,12 @@ void OpenAt(Vfs* vfs, fbl::RefPtr<Vnode> parent, zx::channel channel, return; } - zxfidl_on_open_t response; + OnOpenMsg response; memset(&response, 0, sizeof(response)); zx_handle_t extra = ZX_HANDLE_INVALID; Describe(vnode, flags, &response, &extra); uint32_t hcount = (extra != ZX_HANDLE_INVALID) ? 1 : 0; - channel.write(0, &response, sizeof(zxfidl_on_open_t), &extra, hcount); + channel.write(0, &response, sizeof(OnOpenMsg), &extra, hcount); } else if (r != ZX_OK) { return; } @@ -414,7 +413,7 @@ zx_status_t Connection::NodeClone(uint32_t flags, zx_handle_t object) { status = OpenVnode(open_flags, &vn); } if (describe) { - zxfidl_on_open_t response; + OnOpenMsg response; memset(&response, 0, sizeof(response)); response.primary.s = status; zx_handle_t extra = ZX_HANDLE_INVALID; @@ -422,7 +421,7 @@ zx_status_t Connection::NodeClone(uint32_t flags, zx_handle_t object) { Describe(vnode_, open_flags, &response, &extra); } uint32_t hcount = (extra != ZX_HANDLE_INVALID) ? 1 : 0; - channel.write(0, &response, sizeof(zxfidl_on_open_t), &extra, hcount); + channel.write(0, &response, sizeof(OnOpenMsg), &extra, hcount); } if (status == ZX_OK) { diff --git a/system/ulib/fs/include/fs/client.h b/system/ulib/fs/include/fs/client.h index 8d5425e5c7b839d7b8a6d46eb478544d29cc74f2..b313c5fb619addd1e4b1ebe41dfc1c37fc663d62 100644 --- a/system/ulib/fs/include/fs/client.h +++ b/system/ulib/fs/include/fs/client.h @@ -12,7 +12,6 @@ #include <stdint.h> #include <sys/types.h> -#include <lib/fdio/remoteio.h> #include <lib/fdio/vfs.h> #include <zircon/assert.h> #include <zircon/types.h> diff --git a/system/ulib/fs/include/fs/connection.h b/system/ulib/fs/include/fs/connection.h index 39e1a4d55a18417bcec2ee43116e13b606acea2c..0ad540f9a2526155c6d73748cb4515454676f43c 100644 --- a/system/ulib/fs/include/fs/connection.h +++ b/system/ulib/fs/include/fs/connection.h @@ -23,6 +23,13 @@ namespace fs { constexpr zx_signals_t kLocalTeardownSignal = ZX_USER_SIGNAL_1; +// A one-way message which may be emitted by the server without an +// accompanying request. Optionally used as a part of the Open handshake. +struct OnOpenMsg { + fuchsia_io_NodeOnOpenEvent primary; + fuchsia_io_NodeInfo extra; +}; + // Connection represents an open connection to a Vnode (the server-side // component of a file descriptor). The Vnode's methods will be invoked // in response to RIO protocol messages received over the channel. diff --git a/system/ulib/fs/include/fs/handler.h b/system/ulib/fs/include/fs/handler.h index 66ff7c979e653aedf43a2272f11fe4b15f02cddf..57c52048b1cf584cd29e33d0f9f67244095fb3d2 100644 --- a/system/ulib/fs/include/fs/handler.h +++ b/system/ulib/fs/include/fs/handler.h @@ -42,10 +42,8 @@ __BEGIN_CDECLS // - otherwise, the return value is treated as the status to send // in the rpc response, and msg.len indicates how much valid data // to send. On error return msg.len will be set to 0. -typedef zx_status_t (*vfs_cb_t)(fidl_msg_t* msg, fidl_txn_t* txn, - void* cookie); +typedef zx_status_t (*vfs_cb_t)(fidl_msg_t* msg, fidl_txn_t* txn, void* cookie); -//TODO: this really should be private to fidl.c, but is used by libfs typedef struct vfs_connection { fidl_txn_t txn; zx_handle_t channel; diff --git a/system/ulib/fs/include/fs/vfs.h b/system/ulib/fs/include/fs/vfs.h index 891cd0eb27c4ffa1532f14fc6d966074dbde9406..97830928c1ca680d12c6a656a3df3f50781cb27c 100644 --- a/system/ulib/fs/include/fs/vfs.h +++ b/system/ulib/fs/include/fs/vfs.h @@ -19,7 +19,6 @@ #ifdef __Fuchsia__ #include <lib/async/dispatcher.h> #include <lib/fdio/io.h> -#include <lib/fdio/remoteio.h> #include <lib/zx/channel.h> #include <lib/zx/event.h> #include <lib/zx/vmo.h> diff --git a/system/ulib/fs/include/fs/vnode.h b/system/ulib/fs/include/fs/vnode.h index 1d52e91fa199dece82584fa302f37e4fd5bae0e3..a4b30dc55048244cde60a5140365d7eeab7440d5 100644 --- a/system/ulib/fs/include/fs/vnode.h +++ b/system/ulib/fs/include/fs/vnode.h @@ -26,7 +26,6 @@ #ifdef __Fuchsia__ #include <fuchsia/io/c/fidl.h> -#include <lib/fdio/remoteio.h> #include <lib/zx/channel.h> #include <utility> diff --git a/system/ulib/fs/mount.cpp b/system/ulib/fs/mount.cpp index 7129ae29accc2a2e77b167f27860bd2f7a3c0f1a..337850bd394177a39f880047d0d7a783d6909327 100644 --- a/system/ulib/fs/mount.cpp +++ b/system/ulib/fs/mount.cpp @@ -16,7 +16,6 @@ #include <fs/vnode.h> #include <fuchsia/io/c/fidl.h> #include <lib/fdio/debug.h> -#include <lib/fdio/remoteio.h> #include <lib/fdio/vfs.h> #include <utility> diff --git a/system/ulib/fs/unmount.cpp b/system/ulib/fs/unmount.cpp index a3d5777ab6300ecc836cd3268325616b99ebd6b6..aaa155b87d5ecb633cffa77fdd6975a84381b2d1 100644 --- a/system/ulib/fs/unmount.cpp +++ b/system/ulib/fs/unmount.cpp @@ -5,7 +5,6 @@ #include <fs/vfs.h> #include <fuchsia/io/c/fidl.h> #include <lib/fdio/debug.h> -#include <lib/fdio/remoteio.h> #include <lib/fdio/vfs.h> #include <stdlib.h> diff --git a/system/ulib/fs/vfs.cpp b/system/ulib/fs/vfs.cpp index 7c57229d723b01d1169942fe5f2aa2283e488f87..48282ba38621fa8e08ccb6cefa4a6928445331dc 100644 --- a/system/ulib/fs/vfs.cpp +++ b/system/ulib/fs/vfs.cpp @@ -20,7 +20,6 @@ #include <fbl/ref_ptr.h> #include <fs/connection.h> #include <fs/remote.h> -#include <lib/fdio/remoteio.h> #include <lib/zx/event.h> #include <lib/zx/process.h> #include <zircon/assert.h> diff --git a/system/ulib/memfs/include/lib/memfs/cpp/vnode.h b/system/ulib/memfs/include/lib/memfs/cpp/vnode.h index 3e885f650045f99e37de6d4b16bbb38298064d10..90c424099a359dd667fdb26c8de7dc114f29d266 100644 --- a/system/ulib/memfs/include/lib/memfs/cpp/vnode.h +++ b/system/ulib/memfs/include/lib/memfs/cpp/vnode.h @@ -9,7 +9,6 @@ #include <zircon/compiler.h> #include <zircon/types.h> #include <lib/fdio/io.h> -#include <lib/fdio/remoteio.h> #include <lib/fdio/vfs.h> #ifdef __cplusplus diff --git a/system/utest/devfs/fidl-tests.cpp b/system/utest/devfs/fidl-tests.cpp index 8773698447d9019283212528e413338bf6cb8c0a..a59db22b8f4e3df0f223891c4b7fd3c1875449cf 100644 --- a/system/utest/devfs/fidl-tests.cpp +++ b/system/utest/devfs/fidl-tests.cpp @@ -3,9 +3,9 @@ // found in the LICENSE file. #include <fbl/algorithm.h> +#include <fs/connection.h> #include <fuchsia/io/c/fidl.h> #include <lib/fdio/namespace.h> -#include <lib/fdio/remoteio.h> #include <lib/fdio/util.h> #include <lib/zx/channel.h> #include <unittest/unittest.h> @@ -49,9 +49,9 @@ bool FidlOpenValidator(const zx::channel& directory, const char* path, uint32_t actual_handles; ASSERT_EQ(client.read(0, buf, sizeof(buf), &actual_bytes, handles, fbl::count_of(handles), &actual_handles), ZX_OK); - ASSERT_EQ(actual_bytes, sizeof(zxfidl_on_open_t)); + ASSERT_EQ(actual_bytes, sizeof(fs::OnOpenMsg)); ASSERT_EQ(actual_handles, expected_handles); - auto response = reinterpret_cast<zxfidl_on_open_t*>(buf); + auto response = reinterpret_cast<fs::OnOpenMsg*>(buf); ASSERT_EQ(response->primary.hdr.ordinal, fuchsia_io_NodeOnOpenOrdinal); ASSERT_EQ(response->primary.s, ZX_OK); ASSERT_EQ(response->extra.tag, expected_tag); diff --git a/system/utest/devfs/rules.mk b/system/utest/devfs/rules.mk index 7235b032519e60a9fec17e081570e11a10681554..6e1e346beaa577df4a6967e282d32f67310032e5 100644 --- a/system/utest/devfs/rules.mk +++ b/system/utest/devfs/rules.mk @@ -21,9 +21,11 @@ MODULE_FIDL_LIBS := \ system/fidl/fuchsia-io \ MODULE_STATIC_LIBS := \ + system/ulib/async \ system/ulib/zx \ system/ulib/zxcpp \ - system/ulib/fbl + system/ulib/fbl \ + system/ulib/fs \ MODULE_LIBS := \ system/ulib/c \