[fdf] Format the coordinator directory
Change-Id: I48930dd2f62e53d3a47c5fac27356f138ed480bf
diff --git a/src/devices/coordinator/async-loop-ref-counted-rpc-handler.h b/src/devices/coordinator/async-loop-ref-counted-rpc-handler.h
index 256db83..39790cd 100644
--- a/src/devices/coordinator/async-loop-ref-counted-rpc-handler.h
+++ b/src/devices/coordinator/async-loop-ref-counted-rpc-handler.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef SRC_DRIVER_FRAMEWORK_DEVCOORDINATOR_ASYNC_LOOP_REF_COUNTED_RPC_HANDLER_H_
-#define SRC_DRIVER_FRAMEWORK_DEVCOORDINATOR_ASYNC_LOOP_REF_COUNTED_RPC_HANDLER_H_
+#ifndef SRC_DEVICES_COORDINATOR_ASYNC_LOOP_REF_COUNTED_RPC_HANDLER_H_
+#define SRC_DEVICES_COORDINATOR_ASYNC_LOOP_REF_COUNTED_RPC_HANDLER_H_
#include <lib/async/cpp/wait.h>
#include <lib/zx/channel.h>
@@ -71,4 +71,4 @@
} // namespace devmgr
-#endif // SRC_DRIVER_FRAMEWORK_DEVCOORDINATOR_ASYNC_LOOP_REF_COUNTED_RPC_HANDLER_H_
+#endif // SRC_DEVICES_COORDINATOR_ASYNC_LOOP_REF_COUNTED_RPC_HANDLER_H_
diff --git a/src/devices/coordinator/binding-internal.h b/src/devices/coordinator/binding-internal.h
index 748b75e..0b34a00 100644
--- a/src/devices/coordinator/binding-internal.h
+++ b/src/devices/coordinator/binding-internal.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef SRC_DRIVER_FRAMEWORK_DEVCOORDINATOR_BINDING_INTERNAL_H_
-#define SRC_DRIVER_FRAMEWORK_DEVCOORDINATOR_BINDING_INTERNAL_H_
+#ifndef SRC_DEVICES_COORDINATOR_BINDING_INTERNAL_H_
+#define SRC_DEVICES_COORDINATOR_BINDING_INTERNAL_H_
#include <stdio.h>
@@ -272,4 +272,4 @@
} // namespace devmgr
-#endif // SRC_DRIVER_FRAMEWORK_DEVCOORDINATOR_BINDING_INTERNAL_H_
+#endif // SRC_DEVICES_COORDINATOR_BINDING_INTERNAL_H_
diff --git a/src/devices/coordinator/composite-device-tests.cc b/src/devices/coordinator/composite-device-tests.cc
index ce1750c..9158992 100644
--- a/src/devices/coordinator/composite-device-tests.cc
+++ b/src/devices/coordinator/composite-device-tests.cc
@@ -2,12 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <fuchsia/io/c/fidl.h>
+
#include <vector>
#include <ddk/binding.h>
#include <ddk/driver.h>
#include <fbl/vector.h>
-#include <fuchsia/io/c/fidl.h>
#include <zxtest/zxtest.h>
#include "multiple-device-test.h"
@@ -1120,19 +1121,18 @@
static_assert(fbl::count_of(protocol_id) == fbl::count_of(device_indexes));
const char* kCompositeDevName = "composite-dev";
- ASSERT_NO_FATAL_FAILURES(
- BindCompositeDefineComposite(platform_bus(), protocol_id, fbl::count_of(protocol_id),
- nullptr /* props */, 0, kCompositeDevName));
+ ASSERT_NO_FATAL_FAILURES(BindCompositeDefineComposite(platform_bus(), protocol_id,
+ fbl::count_of(protocol_id),
+ nullptr /* props */, 0, kCompositeDevName));
// Add the devices to construct the composite out of.
zx_txid_t txns[fbl::count_of(device_indexes)] = {};
for (size_t i = 0; i < fbl::count_of(device_indexes); ++i) {
char name[32];
snprintf(name, sizeof(name), "device-%zu", i);
- ASSERT_NO_FATAL_FAILURES(
- AddDevice(platform_bus(), name, protocol_id[i], "", false /* invisible */,
- true /* has_init */, false /* reply_to_init */, true /* always_init */,
- &device_indexes[i]));
+ ASSERT_NO_FATAL_FAILURES(AddDevice(
+ platform_bus(), name, protocol_id[i], "", false /* invisible */, true /* has_init */,
+ false /* reply_to_init */, true /* always_init */, &device_indexes[i]));
auto index = device_indexes[i];
ASSERT_FALSE(device(index)->device->is_visible());
ASSERT_NO_FATAL_FAILURES(CheckInitReceived(device(index)->controller_remote, &txns[i]));
diff --git a/src/devices/coordinator/composite-device.h b/src/devices/coordinator/composite-device.h
index 0ef0468..b7b8a01 100644
--- a/src/devices/coordinator/composite-device.h
+++ b/src/devices/coordinator/composite-device.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef SRC_DRIVER_FRAMEWORK_DEVCOORDINATOR_COMPOSITE_DEVICE_H_
-#define SRC_DRIVER_FRAMEWORK_DEVCOORDINATOR_COMPOSITE_DEVICE_H_
+#ifndef SRC_DEVICES_COORDINATOR_COMPOSITE_DEVICE_H_
+#define SRC_DEVICES_COORDINATOR_COMPOSITE_DEVICE_H_
#include <fuchsia/device/manager/c/fidl.h>
#include <fuchsia/device/manager/llcpp/fidl.h>
@@ -184,4 +184,4 @@
} // namespace devmgr
-#endif // SRC_DRIVER_FRAMEWORK_DEVCOORDINATOR_COMPOSITE_DEVICE_H_
+#endif // SRC_DEVICES_COORDINATOR_COMPOSITE_DEVICE_H_
diff --git a/src/devices/coordinator/coordinator-test-utils.h b/src/devices/coordinator/coordinator-test-utils.h
index 0f09447..35c1a85 100644
--- a/src/devices/coordinator/coordinator-test-utils.h
+++ b/src/devices/coordinator/coordinator-test-utils.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef SRC_DRIVER_FRAMEWORK_COORDINATOR_TEST_H_
-#define SRC_DRIVER_FRAMEWORK_COORDINATOR_TEST_H_
+#ifndef SRC_DEVICES_COORDINATOR_COORDINATOR_TEST_UTILS_H_
+#define SRC_DEVICES_COORDINATOR_COORDINATOR_TEST_UTILS_H_
#include <fuchsia/driver/test/c/fidl.h>
#include <fuchsia/hardware/power/statecontrol/llcpp/fidl.h>
@@ -40,4 +40,4 @@
void CheckBindDriverReceived(const zx::channel& remote, const char* expected_driver);
-#endif // SRC_DRIVER_FRAMEWORK_COORDINATOR_TEST_H_
+#endif // SRC_DEVICES_COORDINATOR_COORDINATOR_TEST_UTILS_H_
diff --git a/src/devices/coordinator/coordinator-test.h b/src/devices/coordinator/coordinator-test.h
index 36790f9..1a0f02a 100644
--- a/src/devices/coordinator/coordinator-test.h
+++ b/src/devices/coordinator/coordinator-test.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef SRC_DRIVER_FRAMEWORK_COORDINATOR_TEST_H_
-#define SRC_DRIVER_FRAMEWORK_COORDINATOR_TEST_H_
+#ifndef SRC_DEVICES_COORDINATOR_COORDINATOR_TEST_H_
+#define SRC_DEVICES_COORDINATOR_COORDINATOR_TEST_H_
#include <fuchsia/device/manager/c/fidl.h>
#include <fuchsia/driver/test/c/fidl.h>
@@ -39,4 +39,4 @@
void CheckBindDriverReceived(const zx::channel& remote, const char* expected_driver);
-#endif // SRC_DRIVER_FRAMEWORK_COORDINATOR_TEST_H_
+#endif // SRC_DEVICES_COORDINATOR_COORDINATOR_TEST_H_
diff --git a/src/devices/coordinator/coordinator.h b/src/devices/coordinator/coordinator.h
index 28b0c03..d75ee98 100644
--- a/src/devices/coordinator/coordinator.h
+++ b/src/devices/coordinator/coordinator.h
@@ -308,7 +308,8 @@
const fbl::RefPtr<Device>& test_device() { return test_device_; }
void Suspend(uint32_t flags);
- void Resume(SystemPowerState target_state, ResumeCallback callback = [](zx_status_t) {});
+ void Resume(
+ SystemPowerState target_state, ResumeCallback callback = [](zx_status_t) {});
SuspendContext& suspend_context() { return suspend_context_; }
const SuspendContext& suspend_context() const { return suspend_context_; }
diff --git a/src/devices/coordinator/devfs.h b/src/devices/coordinator/devfs.h
index fabc69f..f41567e 100644
--- a/src/devices/coordinator/devfs.h
+++ b/src/devices/coordinator/devfs.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef SRC_DRIVER_FRAMEWORK_DEVCOORDINATOR_DEVFS_H_
-#define SRC_DRIVER_FRAMEWORK_DEVCOORDINATOR_DEVFS_H_
+#ifndef SRC_DEVICES_COORDINATOR_DEVFS_H_
+#define SRC_DEVICES_COORDINATOR_DEVFS_H_
#include <lib/async/dispatcher.h>
#include <lib/zx/channel.h>
@@ -42,4 +42,4 @@
} // namespace devmgr
-#endif // SRC_DRIVER_FRAMEWORK_DEVCOORDINATOR_DEVFS_H_
+#endif // SRC_DEVICES_COORDINATOR_DEVFS_H_
diff --git a/src/devices/coordinator/devhost.h b/src/devices/coordinator/devhost.h
index 4360a1e..d6bc719 100644
--- a/src/devices/coordinator/devhost.h
+++ b/src/devices/coordinator/devhost.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef SRC_DRIVER_FRAMEWORK_DEVCOORDINATOR_DEVHOST_H_
-#define SRC_DRIVER_FRAMEWORK_DEVCOORDINATOR_DEVHOST_H_
+#ifndef SRC_DEVICES_COORDINATOR_DEVHOST_H_
+#define SRC_DEVICES_COORDINATOR_DEVHOST_H_
#include <lib/async/cpp/wait.h>
#include <lib/zx/process.h>
@@ -91,4 +91,4 @@
} // namespace devmgr
-#endif // SRC_DRIVER_FRAMEWORK_DEVCOORDINATOR_DEVHOST_H_
+#endif // SRC_DEVICES_COORDINATOR_DEVHOST_H_
diff --git a/src/devices/coordinator/device.cc b/src/devices/coordinator/device.cc
index e19465e..58efecb 100644
--- a/src/devices/coordinator/device.cc
+++ b/src/devices/coordinator/device.cc
@@ -27,7 +27,7 @@
namespace devmgr {
- // TODO(fxb/43370): remove this once init tasks can be enabled for all devices.
+// TODO(fxb/43370): remove this once init tasks can be enabled for all devices.
static constexpr bool kEnableAlwaysInit = false;
Device::Device(Coordinator* coord, fbl::String name, fbl::String libname, fbl::String args,
@@ -90,8 +90,7 @@
auto dev = fbl::MakeRefCounted<Device>(coordinator, std::move(name), std::move(driver_path),
std::move(args), real_parent, protocol_id,
- std::move(client_remote),
- wait_make_visible);
+ std::move(client_remote), wait_make_visible);
if (!dev) {
return ZX_ERR_NO_MEMORY;
}
@@ -789,8 +788,8 @@
fbl::RefPtr<Device> device;
zx_status_t status = parent->coordinator->AddDevice(
parent, std::move(device_controller_client), std::move(coordinator), props.data(),
- props.count(), name, protocol_id, driver_path, args, false /* invisible */,
- has_init, kEnableAlwaysInit, std::move(client_remote), &device);
+ props.count(), name, protocol_id, driver_path, args, false /* invisible */, has_init,
+ kEnableAlwaysInit, std::move(client_remote), &device);
if (device != nullptr &&
(device_add_config &
llcpp::fuchsia::device::manager::AddDeviceConfig::ALLOW_MULTI_COMPOSITE)) {
@@ -802,8 +801,8 @@
response.set_err(&status);
completer.Reply(std::move(response));
} else {
- llcpp::fuchsia::device::manager::Coordinator_AddDevice_Response resp{
- .local_device_id = local_id};
+ llcpp::fuchsia::device::manager::Coordinator_AddDevice_Response resp{.local_device_id =
+ local_id};
response.set_response(&resp);
completer.Reply(std::move(response));
}
@@ -843,16 +842,16 @@
fbl::RefPtr<Device> device;
zx_status_t status = parent->coordinator->AddDevice(
parent, std::move(device_controller_client), std::move(coordinator), props.data(),
- props.count(), name, protocol_id, driver_path, args, true /* invisible */,
- has_init, kEnableAlwaysInit, std::move(client_remote), &device);
+ props.count(), name, protocol_id, driver_path, args, true /* invisible */, has_init,
+ kEnableAlwaysInit, std::move(client_remote), &device);
uint64_t local_id = device != nullptr ? device->local_id() : 0;
llcpp::fuchsia::device::manager::Coordinator_AddDeviceInvisible_Result response;
if (status != ZX_OK) {
response.set_err(&status);
completer.Reply(std::move(response));
} else {
- llcpp::fuchsia::device::manager::Coordinator_AddDeviceInvisible_Response resp{
- .local_device_id = local_id};
+ llcpp::fuchsia::device::manager::Coordinator_AddDeviceInvisible_Response resp{.local_device_id =
+ local_id};
response.set_response(&resp);
completer.Reply(std::move(response));
}
diff --git a/src/devices/coordinator/driver-test-reporter.h b/src/devices/coordinator/driver-test-reporter.h
index 8dc9d15..c27a566 100644
--- a/src/devices/coordinator/driver-test-reporter.h
+++ b/src/devices/coordinator/driver-test-reporter.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef SRC_DRIVER_FRAMEWORK_DEVCOORDINATOR_DRIVER_TEST_REPORTER_H_
-#define SRC_DRIVER_FRAMEWORK_DEVCOORDINATOR_DRIVER_TEST_REPORTER_H_
+#ifndef SRC_DEVICES_COORDINATOR_DRIVER_TEST_REPORTER_H_
+#define SRC_DEVICES_COORDINATOR_DRIVER_TEST_REPORTER_H_
#include <fuchsia/driver/test/c/fidl.h>
@@ -34,4 +34,4 @@
} // namespace devmgr
-#endif // SRC_DRIVER_FRAMEWORK_DEVCOORDINATOR_DRIVER_TEST_REPORTER_H_
+#endif // SRC_DEVICES_COORDINATOR_DRIVER_TEST_REPORTER_H_
diff --git a/src/devices/coordinator/env.h b/src/devices/coordinator/env.h
index 51a84288..ea3a6cdcb 100644
--- a/src/devices/coordinator/env.h
+++ b/src/devices/coordinator/env.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef SRC_DRIVER_FRAMEWORK_DEVCOORDINATOR_ENV_H_
-#define SRC_DRIVER_FRAMEWORK_DEVCOORDINATOR_ENV_H_
+#ifndef SRC_DEVICES_COORDINATOR_ENV_H_
+#define SRC_DEVICES_COORDINATOR_ENV_H_
namespace devmgr {
@@ -14,4 +14,4 @@
} // namespace devmgr
-#endif // SRC_DRIVER_FRAMEWORK_DEVCOORDINATOR_ENV_H_
+#endif // SRC_DEVICES_COORDINATOR_ENV_H_
diff --git a/src/devices/coordinator/fidl.cc b/src/devices/coordinator/fidl.cc
index ad8fe6e..9531f8e 100644
--- a/src/devices/coordinator/fidl.cc
+++ b/src/devices/coordinator/fidl.cc
@@ -100,9 +100,9 @@
zx_status_t dh_send_init(Device* dev_ptr) {
auto dev = fbl::RefPtr(dev_ptr);
dev->device_controller()->Init([dev](zx_status_t status) {
- log(ERROR, "devcoordinator: init done '%s'\n", dev->name().data());
- dev->CompleteInit(status);
- });
+ log(ERROR, "devcoordinator: init done '%s'\n", dev->name().data());
+ dev->CompleteInit(status);
+ });
return ZX_OK;
}
diff --git a/src/devices/coordinator/fidl_txn.h b/src/devices/coordinator/fidl_txn.h
index d096292..ec6320a 100644
--- a/src/devices/coordinator/fidl_txn.h
+++ b/src/devices/coordinator/fidl_txn.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef SRC_DRIVER_FRAMEWORK_DEVCOORDINATOR_FIDL_TXN_H_
-#define SRC_DRIVER_FRAMEWORK_DEVCOORDINATOR_FIDL_TXN_H_
+#ifndef SRC_DEVICES_COORDINATOR_FIDL_TXN_H_
+#define SRC_DEVICES_COORDINATOR_FIDL_TXN_H_
#include <lib/fidl/epitaph.h>
#include <lib/fidl/llcpp/transaction.h>
@@ -117,4 +117,4 @@
} // namespace devmgr
-#endif // SRC_DRIVER_FRAMEWORK_DEVCOORDINATOR_FIDL_TXN_H_
+#endif // SRC_DEVICES_COORDINATOR_FIDL_TXN_H_
diff --git a/src/devices/coordinator/init-task.cc b/src/devices/coordinator/init-task.cc
index c7fb825..ca38d19 100644
--- a/src/devices/coordinator/init-task.cc
+++ b/src/devices/coordinator/init-task.cc
@@ -10,8 +10,7 @@
namespace devmgr {
InitTask::InitTask(fbl::RefPtr<Device> device, Completion completion)
- : Task(device->coordinator->dispatcher(), std::move(completion)),
- device_(std::move(device)) {}
+ : Task(device->coordinator->dispatcher(), std::move(completion)), device_(std::move(device)) {}
InitTask::~InitTask() = default;
diff --git a/src/devices/coordinator/init-task.h b/src/devices/coordinator/init-task.h
index 9708d88..7bcbf66 100644
--- a/src/devices/coordinator/init-task.h
+++ b/src/devices/coordinator/init-task.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef SRC_DRIVER_FRAMEWORK_DEVCOORDINATOR_INIT_TASK_H_
-#define SRC_DRIVER_FRAMEWORK_DEVCOORDINATOR_INIT_TASK_H_
+#ifndef SRC_DEVICES_COORDINATOR_INIT_TASK_H_
+#define SRC_DEVICES_COORDINATOR_INIT_TASK_H_
#include "device.h"
#include "task.h"
@@ -28,4 +28,4 @@
} // namespace devmgr
-#endif // SRC_DRIVER_FRAMEWORK_DEVCOORDINATOR_INIT_TASK_H_
+#endif // SRC_DEVICES_COORDINATOR_INIT_TASK_H_
diff --git a/src/devices/coordinator/init-tests.cc b/src/devices/coordinator/init-tests.cc
index de34408..6b9e7d7 100644
--- a/src/devices/coordinator/init-tests.cc
+++ b/src/devices/coordinator/init-tests.cc
@@ -10,7 +10,7 @@
size_t index;
ASSERT_NO_FATAL_FAILURES(AddDevice(platform_bus(), "device", 0 /* protocol id */, "",
false /* invisible */, true /* has_init */,
- false /* reply_to_init */, true /* always_init */, &index));
+ false /* reply_to_init */, true /* always_init */, &index));
ASSERT_FALSE(device(index)->device->is_visible());
@@ -26,7 +26,7 @@
size_t index;
ASSERT_NO_FATAL_FAILURES(AddDevice(platform_bus(), "device", 0 /* protocol id */, "",
true /* invisible */, true /* has_init */,
- false /* reply_to_init */, true /* always_init */, &index));
+ false /* reply_to_init */, true /* always_init */, &index));
ASSERT_FALSE(device(index)->device->is_visible());
@@ -87,8 +87,8 @@
zx_txid_t txid;
ASSERT_NO_FATAL_FAILURES(CheckInitReceived(device(index)->controller_remote, &txid));
- ASSERT_NO_FATAL_FAILURES(coordinator_.ScheduleDevhostRequestedRemove(device(index)->device,
- true /* do_unbind */));
+ ASSERT_NO_FATAL_FAILURES(
+ coordinator_.ScheduleDevhostRequestedRemove(device(index)->device, true /* do_unbind */));
coordinator_loop()->RunUntilIdle();
// We should not get the unbind request until we reply to the init.
@@ -193,10 +193,9 @@
// Tests that a child init task will not run until the parent's init task completes.
TEST_F(InitTestCase, InitParentThenChild) {
size_t parent_index;
- ASSERT_NO_FATAL_FAILURES(AddDevice(platform_bus(), "parent-device", 0 /* protocol id */, "",
- false /* invisible */, true /* has_init */,
- false /* reply_to_init */, true /* always_init */,
- &parent_index));
+ ASSERT_NO_FATAL_FAILURES(AddDevice(
+ platform_bus(), "parent-device", 0 /* protocol id */, "", false /* invisible */,
+ true /* has_init */, false /* reply_to_init */, true /* always_init */, &parent_index));
// Don't reply to init yet.
zx_txid_t txid;
@@ -204,10 +203,9 @@
coordinator_loop()->RunUntilIdle();
size_t child_index;
- ASSERT_NO_FATAL_FAILURES(AddDevice(device(parent_index)->device, "child-device",
- 0 /* protocol id */, "", false /* invisible */,
- true /* has_init */, false /* reply_to_init */,
- true /* always_init */, &child_index));
+ ASSERT_NO_FATAL_FAILURES(AddDevice(
+ device(parent_index)->device, "child-device", 0 /* protocol id */, "", false /* invisible */,
+ true /* has_init */, false /* reply_to_init */, true /* always_init */, &child_index));
// Child init should not run until parent init task completes.
ASSERT_FALSE(DeviceHasPendingMessages(device(child_index)->controller_remote));
@@ -221,10 +219,9 @@
TEST_F(InitTestCase, InitParentFail) {
size_t parent_index;
- ASSERT_NO_FATAL_FAILURES(AddDevice(platform_bus(), "parent-device", 0 /* protocol id */, "",
- false /* invisible */, true /* has_init */,
- false /* reply_to_init */, true /* always_init */,
- &parent_index));
+ ASSERT_NO_FATAL_FAILURES(AddDevice(
+ platform_bus(), "parent-device", 0 /* protocol id */, "", false /* invisible */,
+ true /* has_init */, false /* reply_to_init */, true /* always_init */, &parent_index));
// Don't reply to init yet.
zx_txid_t txid;
@@ -232,10 +229,9 @@
coordinator_loop()->RunUntilIdle();
size_t child_index;
- ASSERT_NO_FATAL_FAILURES(AddDevice(device(parent_index)->device, "child-device",
- 0 /* protocol id */, "", false /* invisible */,
- true /* has_init */, false /* reply_to_init */,
- true /* always_init */, &child_index));
+ ASSERT_NO_FATAL_FAILURES(AddDevice(
+ device(parent_index)->device, "child-device", 0 /* protocol id */, "", false /* invisible */,
+ true /* has_init */, false /* reply_to_init */, true /* always_init */, &child_index));
ASSERT_FALSE(DeviceHasPendingMessages(device(child_index)->controller_remote));
@@ -268,7 +264,7 @@
size_t index;
ASSERT_NO_FATAL_FAILURES(AddDevice(platform_bus(), "device", 0 /* protocol id */, "",
false /* invisible */, false /* has_init */,
- false /* reply_to_init */, false /* always_init */, &index));
+ false /* reply_to_init */, false /* always_init */, &index));
ASSERT_TRUE(device(index)->device->is_visible());
ASSERT_EQ(devmgr::Device::State::kActive, device(index)->device->state());
}
@@ -277,7 +273,7 @@
size_t index;
ASSERT_NO_FATAL_FAILURES(AddDevice(platform_bus(), "device", 0 /* protocol id */, "",
false /* invisible */, true /* has_init */,
- false /* reply_to_init */, false /* always_init */, &index));
+ false /* reply_to_init */, false /* always_init */, &index));
ASSERT_FALSE(device(index)->device->is_visible());
@@ -293,7 +289,7 @@
size_t index;
ASSERT_NO_FATAL_FAILURES(AddDevice(platform_bus(), "device", 0 /* protocol id */, "",
true /* invisible */, true /* has_init */,
- false /* reply_to_init */, false /* always_init */, &index));
+ false /* reply_to_init */, false /* always_init */, &index));
ASSERT_FALSE(device(index)->device->is_visible());
diff --git a/src/devices/coordinator/log.h b/src/devices/coordinator/log.h
index dacd296..19d9ff1 100644
--- a/src/devices/coordinator/log.h
+++ b/src/devices/coordinator/log.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef SRC_DRIVER_FRAMEWORK_DEVCOORDINATOR_LOG_H_
-#define SRC_DRIVER_FRAMEWORK_DEVCOORDINATOR_LOG_H_
+#ifndef SRC_DEVICES_COORDINATOR_LOG_H_
+#define SRC_DEVICES_COORDINATOR_LOG_H_
#include <stdint.h>
#include <stdio.h>
@@ -36,4 +36,4 @@
} // namespace devmgr
-#endif // SRC_DRIVER_FRAMEWORK_DEVCOORDINATOR_LOG_H_
+#endif // SRC_DEVICES_COORDINATOR_LOG_H_
diff --git a/src/devices/coordinator/misc-tests.cc b/src/devices/coordinator/misc-tests.cc
index 7c6b697..669c2a8 100644
--- a/src/devices/coordinator/misc-tests.cc
+++ b/src/devices/coordinator/misc-tests.cc
@@ -59,7 +59,8 @@
// Write the BindDriver response.
memset(bytes, 0, sizeof(bytes));
auto resp = reinterpret_cast<fuchsia_device_manager_DeviceControllerBindDriverResponse*>(bytes);
- fidl_init_txn_header(&resp->hdr, txid, fuchsia_device_manager_DeviceControllerBindDriverGenOrdinal);
+ fidl_init_txn_header(&resp->hdr, txid,
+ fuchsia_device_manager_DeviceControllerBindDriverGenOrdinal);
resp->status = ZX_OK;
resp->test_output = test_output.release();
status = fidl_encode(&fuchsia_device_manager_DeviceControllerBindDriverResponseTable, bytes,
@@ -152,7 +153,8 @@
// Write the BindDriver response.
memset(bytes, 0, sizeof(bytes));
auto resp = reinterpret_cast<fuchsia_device_manager_DeviceControllerBindDriverResponse*>(bytes);
- fidl_init_txn_header(&resp->hdr, txid, fuchsia_device_manager_DeviceControllerBindDriverGenOrdinal);
+ fidl_init_txn_header(&resp->hdr, txid,
+ fuchsia_device_manager_DeviceControllerBindDriverGenOrdinal);
resp->status = ZX_OK;
status = fidl_encode(&fuchsia_device_manager_DeviceControllerBindDriverResponseTable, bytes,
sizeof(*resp), handles, fbl::count_of(handles), &actual_handles, nullptr);
@@ -375,13 +377,11 @@
ASSERT_OK(status);
fbl::RefPtr<devmgr::Device> device;
- status = coordinator.AddDevice(coordinator.test_device(), std::move(controller_local),
- std::move(coordinator_local), nullptr /* props_data */,
- 0 /* props_count */, "mock-device", ZX_PROTOCOL_TEST,
- nullptr /* driver_path */, nullptr /* args */,
- false /* invisible */, false /* has_init */,
- true /* always_init */, zx::channel() /* client_remote */,
- &device);
+ status = coordinator.AddDevice(
+ coordinator.test_device(), std::move(controller_local), std::move(coordinator_local),
+ nullptr /* props_data */, 0 /* props_count */, "mock-device", ZX_PROTOCOL_TEST,
+ nullptr /* driver_path */, nullptr /* args */, false /* invisible */, false /* has_init */,
+ true /* always_init */, zx::channel() /* client_remote */, &device);
ASSERT_OK(status);
ASSERT_EQ(1, coordinator.devices().size_slow());
@@ -430,13 +430,11 @@
ASSERT_OK(status);
fbl::RefPtr<devmgr::Device> device;
- status = coordinator.AddDevice(coordinator.test_device(), std::move(controller_local),
- std::move(coordinator_local), nullptr /* props_data */,
- 0 /* props_count */, "mock-device", ZX_PROTOCOL_TEST,
- nullptr /* driver_path */, nullptr /* args */,
- false /* invisible */, false /* has_init */,
- true /* always_init */, zx::channel() /* client_remote */,
- &device);
+ status = coordinator.AddDevice(
+ coordinator.test_device(), std::move(controller_local), std::move(coordinator_local),
+ nullptr /* props_data */, 0 /* props_count */, "mock-device", ZX_PROTOCOL_TEST,
+ nullptr /* driver_path */, nullptr /* args */, false /* invisible */, false /* has_init */,
+ true /* always_init */, zx::channel() /* client_remote */, &device);
device->AddRef(); // refcount starts at zero, so bump it up to keep us from being cleaned up
ASSERT_OK(status);
ASSERT_EQ(1, coordinator.devices().size_slow());
diff --git a/src/devices/coordinator/resume-task.h b/src/devices/coordinator/resume-task.h
index 9a0aaf2..9ad75bb 100644
--- a/src/devices/coordinator/resume-task.h
+++ b/src/devices/coordinator/resume-task.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef ZIRCON_SYSTEM_CORE_DEVMGR_DEVCOORDINATOR_RESUME_TASK_H_
-#define ZIRCON_SYSTEM_CORE_DEVMGR_DEVCOORDINATOR_RESUME_TASK_H_
+#ifndef SRC_DEVICES_COORDINATOR_RESUME_TASK_H_
+#define SRC_DEVICES_COORDINATOR_RESUME_TASK_H_
#include "device.h"
#include "task.h"
@@ -37,4 +37,4 @@
} // namespace devmgr
-#endif // ZIRCON_SYSTEM_CORE_DEVMGR_DEVCOORDINATOR_RESUME_TASK_H_
+#endif // SRC_DEVICES_COORDINATOR_RESUME_TASK_H_
diff --git a/src/devices/coordinator/suspend-task.h b/src/devices/coordinator/suspend-task.h
index b742d2e..3f42621 100644
--- a/src/devices/coordinator/suspend-task.h
+++ b/src/devices/coordinator/suspend-task.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef SRC_DRIVER_FRAMEWORK_DEVCOORDINATOR_SUSPEND_TASK_H_
-#define SRC_DRIVER_FRAMEWORK_DEVCOORDINATOR_SUSPEND_TASK_H_
+#ifndef SRC_DEVICES_COORDINATOR_SUSPEND_TASK_H_
+#define SRC_DEVICES_COORDINATOR_SUSPEND_TASK_H_
#include "device.h"
#include "task.h"
@@ -35,4 +35,4 @@
} // namespace devmgr
-#endif // SRC_DRIVER_FRAMEWORK_DEVCOORDINATOR_SUSPEND_TASK_H_
+#endif // SRC_DEVICES_COORDINATOR_SUSPEND_TASK_H_
diff --git a/src/devices/coordinator/task.h b/src/devices/coordinator/task.h
index 44b19ff..2ea7867 100644
--- a/src/devices/coordinator/task.h
+++ b/src/devices/coordinator/task.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef SRC_DRIVER_FRAMEWORK_DEVCOORDINATOR_TASK_H_
-#define SRC_DRIVER_FRAMEWORK_DEVCOORDINATOR_TASK_H_
+#ifndef SRC_DEVICES_COORDINATOR_TASK_H_
+#define SRC_DEVICES_COORDINATOR_TASK_H_
#include <lib/async/cpp/task.h>
#include <lib/fit/function.h>
@@ -100,4 +100,4 @@
} // namespace devmgr
-#endif // SRC_DRIVER_FRAMEWORK_DEVCOORDINATOR_TASK_H_
+#endif // SRC_DEVICES_COORDINATOR_TASK_H_
diff --git a/src/devices/coordinator/unbind-task.h b/src/devices/coordinator/unbind-task.h
index 78db367..04d39b2 100644
--- a/src/devices/coordinator/unbind-task.h
+++ b/src/devices/coordinator/unbind-task.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef SRC_DRIVER_FRAMEWORK_DEVCOORDINATOR_UNBIND_TASK_H_
-#define SRC_DRIVER_FRAMEWORK_DEVCOORDINATOR_UNBIND_TASK_H_
+#ifndef SRC_DEVICES_COORDINATOR_UNBIND_TASK_H_
+#define SRC_DEVICES_COORDINATOR_UNBIND_TASK_H_
#include "device.h"
#include "task.h"
@@ -74,4 +74,4 @@
} // namespace devmgr
-#endif // SRC_DRIVER_FRAMEWORK_DEVCOORDINATOR_UNBIND_TASK_H_
+#endif // SRC_DEVICES_COORDINATOR_UNBIND_TASK_H_
diff --git a/src/devices/coordinator/unbind-tests.cc b/src/devices/coordinator/unbind-tests.cc
index f3c1ce65..1418b44 100644
--- a/src/devices/coordinator/unbind-tests.cc
+++ b/src/devices/coordinator/unbind-tests.cc
@@ -324,13 +324,11 @@
ASSERT_OK(status);
fbl::RefPtr<devmgr::Device> device;
- status = coordinator_.AddDevice(parent_device->device, std::move(controller_local),
- std::move(coordinator_local), nullptr /* props_data */,
- 0 /* props_count */, "child", 0 /* protocol_id */,
- nullptr /* driver_path */, nullptr /* args */,
- false /* invisible */, false /* has_init */,
- true /* always_init */, zx::channel() /* client_remote */,
- &child);
+ status = coordinator_.AddDevice(
+ parent_device->device, std::move(controller_local), std::move(coordinator_local),
+ nullptr /* props_data */, 0 /* props_count */, "child", 0 /* protocol_id */,
+ nullptr /* driver_path */, nullptr /* args */, false /* invisible */, false /* has_init */,
+ true /* always_init */, zx::channel() /* client_remote */, &child);
ASSERT_NOT_OK(status);
coordinator_loop()->RunUntilIdle();
diff --git a/src/devices/coordinator/vmo-writer.h b/src/devices/coordinator/vmo-writer.h
index 6dbe13c..1640871 100644
--- a/src/devices/coordinator/vmo-writer.h
+++ b/src/devices/coordinator/vmo-writer.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef SRC_DRIVER_FRAMEWORK_DEVCOORDINATOR_VMO_WRITER_H_
-#define SRC_DRIVER_FRAMEWORK_DEVCOORDINATOR_VMO_WRITER_H_
+#ifndef SRC_DEVICES_COORDINATOR_VMO_WRITER_H_
+#define SRC_DEVICES_COORDINATOR_VMO_WRITER_H_
#include <lib/zx/vmo.h>
@@ -34,4 +34,4 @@
} // namespace devmgr
-#endif // SRC_DRIVER_FRAMEWORK_DEVCOORDINATOR_VMO_WRITER_H_
+#endif // SRC_DEVICES_COORDINATOR_VMO_WRITER_H_