From e920673ab8630f64b08f98d71f25b3e539573771 Mon Sep 17 00:00:00 2001 From: Adam Barth <abarth@chromium.org> Date: Wed, 21 Nov 2018 09:37:55 -0800 Subject: [PATCH] [fdio] Remove remoteio.h We no longer need this header. Test: No behavior change Change-Id: I03679671db7c478709c0f78f815c310cb238b3c5 --- system/core/devmgr/devhost/core.cpp | 1 - system/core/devmgr/devhost/devhost.cpp | 1 - system/core/devmgr/devhost/devhost.h | 1 - system/core/devmgr/devhost/rpc-server.cpp | 6 +++-- system/core/devmgr/devmgr/devfs.cpp | 4 +-- system/core/devmgr/fshost/fshost.h | 1 - system/core/devmgr/fshost/vfs-rpc.cpp | 1 - system/ulib/blobfs/rpc.cpp | 1 - system/ulib/fdio/bsdsocket.c | 1 - system/ulib/fdio/get-vmo.c | 7 +++--- system/ulib/fdio/include/lib/fdio/remoteio.h | 19 -------------- system/ulib/fdio/namespace.c | 1 - system/ulib/fdio/private.h | 1 - system/ulib/fdio/remoteio.c | 25 ++++++++++++------- system/ulib/fdio/socket.c | 1 - system/ulib/fdio/unistd.c | 1 - system/ulib/fdio/vmofile.c | 1 - system/ulib/fs/connection.cpp | 11 ++++---- system/ulib/fs/include/fs/client.h | 1 - system/ulib/fs/include/fs/connection.h | 7 ++++++ system/ulib/fs/include/fs/handler.h | 4 +-- system/ulib/fs/include/fs/vfs.h | 1 - system/ulib/fs/include/fs/vnode.h | 1 - system/ulib/fs/mount.cpp | 1 - system/ulib/fs/unmount.cpp | 1 - system/ulib/fs/vfs.cpp | 1 - .../ulib/memfs/include/lib/memfs/cpp/vnode.h | 1 - system/utest/devfs/fidl-tests.cpp | 6 ++--- system/utest/devfs/rules.mk | 4 ++- 29 files changed, 44 insertions(+), 68 deletions(-) delete mode 100644 system/ulib/fdio/include/lib/fdio/remoteio.h diff --git a/system/core/devmgr/devhost/core.cpp b/system/core/devmgr/devhost/core.cpp index 952eb360999..415fc98fc21 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 8953cf5af42..bb14d76083c 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 6591257eaf3..d53eac53bae 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 5dbe802293b..a24f96297f5 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 dc54946724f..26ef424d191 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 bd37a8625ae..27fc429ba13 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 2c8a2fcf996..279d605898e 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 f4e95566606..0fd301d5c26 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 99a065a5be8..bde8431c9eb 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 62544370c84..44e9982cf5d 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 e8e06ef261b..00000000000 --- 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 4431ecab05f..5852826f55a 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 7d51b1c5dc8..0d2a4390b2e 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 e227a1ccfbd..439443ef01d 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 4695646eefb..5095431b437 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 5c3ac1c06ee..a45f5fdf9b2 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 8c415858286..0f5a3ee5d7d 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 4326bbadb0f..2a20505d2ad 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 8d5425e5c7b..b313c5fb619 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 39e1a4d55a1..0ad540f9a25 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 66ff7c979e6..57c52048b1c 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 891cd0eb27c..97830928c1c 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 1d52e91fa19..a4b30dc5504 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 7129ae29acc..337850bd394 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 a3d5777ab63..aaa155b87d5 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 7c57229d723..48282ba3862 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 3e885f65004..90c424099a3 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 8773698447d..a59db22b8f4 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 7235b032519..6e1e346beaa 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 \ -- GitLab