From 414508343ea0510a0c8b77692a668231d21b7161 Mon Sep 17 00:00:00 2001 From: Patrick Mooney Date: Mon, 17 Jul 2023 19:12:04 -0500 Subject: [PATCH] Make license headers consistent (and checked) --- .github/workflows/rust.yml | 6 ++++++ .licenserc.yaml | 12 ++++++++++++ bin/propolis-cli/src/main.rs | 4 ++++ bin/propolis-server/src/lib/config.rs | 4 ++++ bin/propolis-server/src/lib/initializer.rs | 4 ++++ bin/propolis-server/src/lib/lib.rs | 4 ++++ bin/propolis-server/src/lib/migrate/codec.rs | 6 ++++-- bin/propolis-server/src/lib/migrate/destination.rs | 4 ++++ bin/propolis-server/src/lib/migrate/memx.rs | 4 ++++ bin/propolis-server/src/lib/migrate/mod.rs | 4 ++++ bin/propolis-server/src/lib/migrate/preamble.rs | 4 ++++ bin/propolis-server/src/lib/migrate/protocol.rs | 4 ++++ bin/propolis-server/src/lib/migrate/source.rs | 4 ++++ bin/propolis-server/src/lib/mock_server.rs | 4 ++++ bin/propolis-server/src/lib/serial/mod.rs | 4 ++++ bin/propolis-server/src/lib/server.rs | 4 ++++ bin/propolis-server/src/lib/spec.rs | 4 ++++ bin/propolis-server/src/lib/stats.rs | 6 ++++-- bin/propolis-server/src/lib/vcpu_tasks.rs | 4 ++++ bin/propolis-server/src/lib/vm/mod.rs | 4 ++++ bin/propolis-server/src/lib/vm/request_queue.rs | 4 ++++ bin/propolis-server/src/lib/vm/state_driver.rs | 4 ++++ bin/propolis-server/src/lib/vnc.rs | 4 ++++ bin/propolis-server/src/main.rs | 4 ++++ bin/propolis-standalone/src/config.rs | 4 ++++ bin/propolis-standalone/src/main.rs | 4 ++++ bin/propolis-standalone/src/snapshot.rs | 4 ++++ bin/propolis-utils/src/bin/cpuid-gen.rs | 4 ++++ bin/propolis-utils/src/bin/rsrvrctl.rs | 4 ++++ bin/propolis-utils/src/bin/savex.rs | 4 ++++ crates/bhyve-api/header-check/build.rs | 4 ++++ crates/bhyve-api/header-check/test/main.rs | 4 ++++ crates/bhyve-api/src/lib.rs | 4 ++++ crates/bhyve-api/sys/src/enums.rs | 4 ++++ crates/bhyve-api/sys/src/ioctls.rs | 4 ++++ crates/bhyve-api/sys/src/lib.rs | 4 ++++ crates/bhyve-api/sys/src/structs.rs | 4 ++++ crates/bhyve-api/sys/src/vmm_data.rs | 4 ++++ crates/dladm/src/lib.rs | 4 ++++ crates/dladm/src/sys.rs | 4 ++++ crates/propolis-server-config/src/lib.rs | 4 ++++ crates/propolis-standalone-config/src/lib.rs | 4 ++++ crates/propolis-types/src/lib.rs | 4 ++++ crates/viona-api/header-check/build.rs | 4 ++++ crates/viona-api/header-check/test/main.rs | 4 ++++ crates/viona-api/src/lib.rs | 4 ++++ crates/viona-api/sys/src/lib.rs | 4 ++++ lib/propolis-client/src/generated.rs | 5 ++++- lib/propolis-client/src/handmade/api.rs | 4 ++++ lib/propolis-client/src/handmade/mod.rs | 4 ++++ lib/propolis-client/src/instance_spec/backends.rs | 4 ++++ lib/propolis-client/src/instance_spec/builder.rs | 4 ++++ lib/propolis-client/src/instance_spec/devices.rs | 4 ++++ lib/propolis-client/src/instance_spec/mod.rs | 4 ++++ .../src/instance_spec/openapi_impls.rs | 4 ++++ lib/propolis-client/src/lib.rs | 5 ++++- lib/propolis/src/accessors.rs | 4 ++++ lib/propolis/src/api_version.rs | 4 ++++ lib/propolis/src/block/crucible.rs | 4 ++++ lib/propolis/src/block/file.rs | 4 ++++ lib/propolis/src/block/in_memory.rs | 4 ++++ lib/propolis/src/block/mod.rs | 4 ++++ lib/propolis/src/chardev/file_out.rs | 4 ++++ lib/propolis/src/chardev/mod.rs | 4 ++++ lib/propolis/src/chardev/pollers.rs | 4 ++++ lib/propolis/src/chardev/sock.rs | 4 ++++ lib/propolis/src/common.rs | 4 ++++ lib/propolis/src/exits.rs | 4 ++++ lib/propolis/src/hw/bhyve/atpic.rs | 4 ++++ lib/propolis/src/hw/bhyve/atpit.rs | 4 ++++ lib/propolis/src/hw/bhyve/hpet.rs | 4 ++++ lib/propolis/src/hw/bhyve/ioapic.rs | 4 ++++ lib/propolis/src/hw/bhyve/mod.rs | 4 ++++ lib/propolis/src/hw/bhyve/pmtimer.rs | 4 ++++ lib/propolis/src/hw/bhyve/rtc.rs | 4 ++++ lib/propolis/src/hw/chipset/i440fx.rs | 4 ++++ lib/propolis/src/hw/chipset/mod.rs | 4 ++++ lib/propolis/src/hw/ibmpc.rs | 4 ++++ lib/propolis/src/hw/ids.rs | 4 ++++ lib/propolis/src/hw/mod.rs | 4 ++++ lib/propolis/src/hw/nvme/admin.rs | 4 ++++ lib/propolis/src/hw/nvme/bits.rs | 4 ++++ lib/propolis/src/hw/nvme/cmds.rs | 4 ++++ lib/propolis/src/hw/nvme/mod.rs | 4 ++++ lib/propolis/src/hw/nvme/queue.rs | 4 ++++ lib/propolis/src/hw/nvme/requests.rs | 4 ++++ lib/propolis/src/hw/pci/bar.rs | 4 ++++ lib/propolis/src/hw/pci/bits.rs | 4 ++++ lib/propolis/src/hw/pci/bridge.rs | 4 ++++ lib/propolis/src/hw/pci/bus.rs | 4 ++++ lib/propolis/src/hw/pci/cfgspace.rs | 4 ++++ lib/propolis/src/hw/pci/device.rs | 4 ++++ lib/propolis/src/hw/pci/mod.rs | 4 ++++ lib/propolis/src/hw/pci/topology.rs | 4 ++++ lib/propolis/src/hw/ps2/ctrl.rs | 4 ++++ lib/propolis/src/hw/ps2/keyboard/mod.rs | 4 ++++ lib/propolis/src/hw/ps2/keyboard/scan_code_1.rs | 4 ++++ lib/propolis/src/hw/ps2/keyboard/scan_code_2.rs | 4 ++++ lib/propolis/src/hw/ps2/mod.rs | 4 ++++ lib/propolis/src/hw/qemu/debug.rs | 4 ++++ lib/propolis/src/hw/qemu/fwcfg.rs | 4 ++++ lib/propolis/src/hw/qemu/mod.rs | 4 ++++ lib/propolis/src/hw/qemu/ramfb.rs | 4 ++++ lib/propolis/src/hw/uart/lpc.rs | 4 ++++ lib/propolis/src/hw/uart/mod.rs | 4 ++++ lib/propolis/src/hw/uart/uart16550.rs | 4 ++++ lib/propolis/src/hw/virtio/bits.rs | 4 ++++ lib/propolis/src/hw/virtio/block.rs | 4 ++++ lib/propolis/src/hw/virtio/mod.rs | 4 ++++ lib/propolis/src/hw/virtio/p9fs.rs | 4 ++++ lib/propolis/src/hw/virtio/pci.rs | 4 ++++ lib/propolis/src/hw/virtio/queue.rs | 4 ++++ lib/propolis/src/hw/virtio/softnpu.rs | 4 ++++ lib/propolis/src/hw/virtio/viona.rs | 4 ++++ lib/propolis/src/instance.rs | 4 ++++ lib/propolis/src/intr_pins.rs | 4 ++++ lib/propolis/src/inventory.rs | 4 ++++ lib/propolis/src/lib.rs | 4 ++++ lib/propolis/src/migrate.rs | 4 ++++ lib/propolis/src/mmio.rs | 4 ++++ lib/propolis/src/pio.rs | 4 ++++ lib/propolis/src/tasks.rs | 4 ++++ lib/propolis/src/util/aspace.rs | 4 ++++ lib/propolis/src/util/mod.rs | 4 ++++ lib/propolis/src/util/regmap.rs | 4 ++++ lib/propolis/src/vcpu.rs | 4 ++++ lib/propolis/src/vmm/hdl.rs | 4 ++++ lib/propolis/src/vmm/machine.rs | 4 ++++ lib/propolis/src/vmm/mem.rs | 4 ++++ lib/propolis/src/vmm/mod.rs | 4 ++++ lib/propolis/src/vmm/time.rs | 4 ++++ packaging/propolis-package/src/main.rs | 4 +++- phd-tests/framework/src/artifacts.rs | 4 ++++ phd-tests/framework/src/disk/crucible.rs | 4 ++++ phd-tests/framework/src/disk/file.rs | 4 ++++ phd-tests/framework/src/disk/mod.rs | 4 ++++ phd-tests/framework/src/guest_os/alpine.rs | 4 ++++ phd-tests/framework/src/guest_os/debian11_nocloud.rs | 4 ++++ phd-tests/framework/src/guest_os/mod.rs | 4 ++++ phd-tests/framework/src/guest_os/ubuntu22_04.rs | 4 ++++ phd-tests/framework/src/host_api/kvm.rs | 4 ++++ phd-tests/framework/src/host_api/mod.rs | 4 ++++ phd-tests/framework/src/host_api/stubs.rs | 4 ++++ phd-tests/framework/src/lib.rs | 4 ++++ phd-tests/framework/src/port_allocator.rs | 4 ++++ phd-tests/framework/src/serial/mod.rs | 4 ++++ phd-tests/framework/src/serial/vt100.rs | 4 ++++ phd-tests/framework/src/server_log_mode.rs | 4 ++++ phd-tests/framework/src/test_vm/factory.rs | 4 ++++ phd-tests/framework/src/test_vm/mod.rs | 4 ++++ phd-tests/framework/src/test_vm/server.rs | 4 ++++ phd-tests/framework/src/test_vm/vm_config.rs | 4 ++++ phd-tests/runner/src/config.rs | 4 ++++ phd-tests/runner/src/execute.rs | 4 ++++ phd-tests/runner/src/fixtures.rs | 4 ++++ phd-tests/runner/src/main.rs | 4 ++++ phd-tests/testcase/src/lib.rs | 4 ++++ phd-tests/testcase_macro/src/lib.rs | 4 ++++ phd-tests/tests/src/crucible/migrate.rs | 4 ++++ phd-tests/tests/src/crucible/mod.rs | 4 ++++ phd-tests/tests/src/crucible/smoke.rs | 4 ++++ phd-tests/tests/src/lib.rs | 4 ++++ phd-tests/tests/src/migrate.rs | 4 ++++ phd-tests/tests/src/server_state_machine.rs | 4 ++++ phd-tests/tests/src/smoke.rs | 4 ++++ xtask/src/main.rs | 4 ++++ 166 files changed, 673 insertions(+), 7 deletions(-) create mode 100644 .licenserc.yaml diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 5f261b186..58c7ae0af 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -26,6 +26,12 @@ jobs: run: cargo clippy -- --version - name: Check clippy run: cargo xtask clippy --strict + check-license: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Check license headers + uses: apache/skywalking-eyes/header@501a28d2fb4a9b962661987e50cf0219631b32ff build-docs: runs-on: ubuntu-latest steps: diff --git a/.licenserc.yaml b/.licenserc.yaml new file mode 100644 index 000000000..0b7b14f6a --- /dev/null +++ b/.licenserc.yaml @@ -0,0 +1,12 @@ +header: + license: + spdx-id: MPL-2.0 + + content: | + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at https://mozilla.org/MPL/2.0/. + paths: + - '**/*.rs' + + comment: on-failure diff --git a/bin/propolis-cli/src/main.rs b/bin/propolis-cli/src/main.rs index bc1805737..6b94a52d3 100644 --- a/bin/propolis-cli/src/main.rs +++ b/bin/propolis-cli/src/main.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use std::fs::File; use std::io::BufReader; use std::path::{Path, PathBuf}; diff --git a/bin/propolis-server/src/lib/config.rs b/bin/propolis-server/src/lib/config.rs index 8cecc1231..81c15ee70 100644 --- a/bin/propolis-server/src/lib/config.rs +++ b/bin/propolis-server/src/lib/config.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! Describes a server config which may be parsed from a TOML file. use std::num::NonZeroUsize; diff --git a/bin/propolis-server/src/lib/initializer.rs b/bin/propolis-server/src/lib/initializer.rs index ef33cc07e..cc5dc2fd5 100644 --- a/bin/propolis-server/src/lib/initializer.rs +++ b/bin/propolis-server/src/lib/initializer.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use std::convert::TryInto; use std::fs::File; use std::io::{Error, ErrorKind}; diff --git a/bin/propolis-server/src/lib/lib.rs b/bin/propolis-server/src/lib/lib.rs index 599579d2f..fe5e77b18 100644 --- a/bin/propolis-server/src/lib/lib.rs +++ b/bin/propolis-server/src/lib/lib.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + // always present pub mod config; #[cfg(any(test, feature = "mock-only"))] diff --git a/bin/propolis-server/src/lib/migrate/codec.rs b/bin/propolis-server/src/lib/migrate/codec.rs index 8325cb459..f4bc319ab 100644 --- a/bin/propolis-server/src/lib/migrate/codec.rs +++ b/bin/propolis-server/src/lib/migrate/codec.rs @@ -1,5 +1,7 @@ -//! Copyright 2021 Oxide Computer Company -//! +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! Support for encoding messages in the propolis/bhyve live //! migration protocol. Messages are serialized to binary and //! wrapped in Binary websocket frames with a trailing byte diff --git a/bin/propolis-server/src/lib/migrate/destination.rs b/bin/propolis-server/src/lib/migrate/destination.rs index ceadbed1f..633cb6812 100644 --- a/bin/propolis-server/src/lib/migrate/destination.rs +++ b/bin/propolis-server/src/lib/migrate/destination.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use bitvec::prelude as bv; use futures::{SinkExt, StreamExt}; use propolis::common::{GuestAddr, PAGE_SIZE}; diff --git a/bin/propolis-server/src/lib/migrate/memx.rs b/bin/propolis-server/src/lib/migrate/memx.rs index 42f21a5a7..bc157c679 100644 --- a/bin/propolis-server/src/lib/migrate/memx.rs +++ b/bin/propolis-server/src/lib/migrate/memx.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use crate::migrate::codec; // The bitmap data structure uses a single bit to represent diff --git a/bin/propolis-server/src/lib/migrate/mod.rs b/bin/propolis-server/src/lib/migrate/mod.rs index a9466390d..8441d1df2 100644 --- a/bin/propolis-server/src/lib/migrate/mod.rs +++ b/bin/propolis-server/src/lib/migrate/mod.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use std::sync::Arc; use bit_field::BitField; diff --git a/bin/propolis-server/src/lib/migrate/preamble.rs b/bin/propolis-server/src/lib/migrate/preamble.rs index 4ac0e35ba..9cc29c64d 100644 --- a/bin/propolis-server/src/lib/migrate/preamble.rs +++ b/bin/propolis-server/src/lib/migrate/preamble.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use propolis_client::instance_spec::{ BackendNames, DeviceSpec, InstanceSpec, MigrationCompatibilityError, }; diff --git a/bin/propolis-server/src/lib/migrate/protocol.rs b/bin/propolis-server/src/lib/migrate/protocol.rs index bd03adbc3..b98df5791 100644 --- a/bin/propolis-server/src/lib/migrate/protocol.rs +++ b/bin/propolis-server/src/lib/migrate/protocol.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! Functions for dealing with protocol negotiation. //! //! Protocols are identified by strings of the form diff --git a/bin/propolis-server/src/lib/migrate/source.rs b/bin/propolis-server/src/lib/migrate/source.rs index 7009dd8fd..c8de20fe1 100644 --- a/bin/propolis-server/src/lib/migrate/source.rs +++ b/bin/propolis-server/src/lib/migrate/source.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use futures::{SinkExt, StreamExt}; use propolis::common::{GuestAddr, PAGE_SIZE}; use propolis::inventory::Order; diff --git a/bin/propolis-server/src/lib/mock_server.rs b/bin/propolis-server/src/lib/mock_server.rs index fd03b2701..040675011 100644 --- a/bin/propolis-server/src/lib/mock_server.rs +++ b/bin/propolis-server/src/lib/mock_server.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! Implementation of a mock Propolis server use base64::Engine; diff --git a/bin/propolis-server/src/lib/serial/mod.rs b/bin/propolis-server/src/lib/serial/mod.rs index 2a6a84340..018da3159 100644 --- a/bin/propolis-server/src/lib/serial/mod.rs +++ b/bin/propolis-server/src/lib/serial/mod.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! Routines to expose a connection to an instance's serial port. #![cfg_attr(feature = "mock-only", allow(unused))] diff --git a/bin/propolis-server/src/lib/server.rs b/bin/propolis-server/src/lib/server.rs index d139279cf..60d6ecdcd 100644 --- a/bin/propolis-server/src/lib/server.rs +++ b/bin/propolis-server/src/lib/server.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! HTTP server callback functions. //! //! Functions in this module verify parameters and convert between types (API diff --git a/bin/propolis-server/src/lib/spec.rs b/bin/propolis-server/src/lib/spec.rs index f115e3dd9..34b3cabb1 100644 --- a/bin/propolis-server/src/lib/spec.rs +++ b/bin/propolis-server/src/lib/spec.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! Helper functions for building instance specs from server parameters. use std::str::FromStr; diff --git a/bin/propolis-server/src/lib/stats.rs b/bin/propolis-server/src/lib/stats.rs index 956c4012c..07d4e3458 100644 --- a/bin/propolis-server/src/lib/stats.rs +++ b/bin/propolis-server/src/lib/stats.rs @@ -1,6 +1,8 @@ -//! Methods for starting an Oximeter endpoint and gathering server-level stats. +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. -// Copyright 2022 Oxide Computer Company +//! Methods for starting an Oximeter endpoint and gathering server-level stats. use anyhow::anyhow; use dropshot::{ diff --git a/bin/propolis-server/src/lib/vcpu_tasks.rs b/bin/propolis-server/src/lib/vcpu_tasks.rs index cdfb6eb3a..a6384fd71 100644 --- a/bin/propolis-server/src/lib/vcpu_tasks.rs +++ b/bin/propolis-server/src/lib/vcpu_tasks.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! Tasks for vCPU backing threads and controls for them. use std::sync::{ diff --git a/bin/propolis-server/src/lib/vm/mod.rs b/bin/propolis-server/src/lib/vm/mod.rs index 574a836d9..2fb280a16 100644 --- a/bin/propolis-server/src/lib/vm/mod.rs +++ b/bin/propolis-server/src/lib/vm/mod.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! Implements the VM controller: the public interface to a single Propolis //! instance. //! diff --git a/bin/propolis-server/src/lib/vm/request_queue.rs b/bin/propolis-server/src/lib/vm/request_queue.rs index b05ed4ea4..c29819d7d 100644 --- a/bin/propolis-server/src/lib/vm/request_queue.rs +++ b/bin/propolis-server/src/lib/vm/request_queue.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! Handles requests to change a Propolis server's state via the external API. //! //! An instance accepts or rejects requests to change state based on a diff --git a/bin/propolis-server/src/lib/vm/state_driver.rs b/bin/propolis-server/src/lib/vm/state_driver.rs index 50fe6457e..4b33a047e 100644 --- a/bin/propolis-server/src/lib/vm/state_driver.rs +++ b/bin/propolis-server/src/lib/vm/state_driver.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use std::sync::Arc; use crate::migrate::MigrateError; diff --git a/bin/propolis-server/src/lib/vnc.rs b/bin/propolis-server/src/lib/vnc.rs index 7f5d0e6d2..f91a1acd1 100644 --- a/bin/propolis-server/src/lib/vnc.rs +++ b/bin/propolis-server/src/lib/vnc.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use async_trait::async_trait; use propolis::common::GuestAddr; use propolis::hw::ps2::ctrl::PS2Ctrl; diff --git a/bin/propolis-server/src/main.rs b/bin/propolis-server/src/main.rs index 873dbb983..3209dba33 100644 --- a/bin/propolis-server/src/main.rs +++ b/bin/propolis-server/src/main.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + #![cfg_attr(feature = "mock-only", allow(unused))] use anyhow::{anyhow, Context}; diff --git a/bin/propolis-standalone/src/config.rs b/bin/propolis-standalone/src/config.rs index e04210843..bc0437139 100644 --- a/bin/propolis-standalone/src/config.rs +++ b/bin/propolis-standalone/src/config.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use std::num::NonZeroUsize; use std::str::FromStr; use std::sync::Arc; diff --git a/bin/propolis-standalone/src/main.rs b/bin/propolis-standalone/src/main.rs index 550a87c07..4d712e018 100644 --- a/bin/propolis-standalone/src/main.rs +++ b/bin/propolis-standalone/src/main.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use std::collections::VecDeque; use std::fs::File; use std::io::{Error, ErrorKind, Result}; diff --git a/bin/propolis-standalone/src/snapshot.rs b/bin/propolis-standalone/src/snapshot.rs index e76468b0e..659a09e1b 100644 --- a/bin/propolis-standalone/src/snapshot.rs +++ b/bin/propolis-standalone/src/snapshot.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! Routines and types for saving and restoring a snapshot of a VM. //! //! TODO(luqmana) do this in a more structed way, it's a fun mess of diff --git a/bin/propolis-utils/src/bin/cpuid-gen.rs b/bin/propolis-utils/src/bin/cpuid-gen.rs index d5f59fc17..5d2fcce73 100644 --- a/bin/propolis-utils/src/bin/cpuid-gen.rs +++ b/bin/propolis-utils/src/bin/cpuid-gen.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use std::cmp::{Ord, Ordering}; use std::collections::BTreeMap; diff --git a/bin/propolis-utils/src/bin/rsrvrctl.rs b/bin/propolis-utils/src/bin/rsrvrctl.rs index 0ab8e2047..c3a4b4513 100644 --- a/bin/propolis-utils/src/bin/rsrvrctl.rs +++ b/bin/propolis-utils/src/bin/rsrvrctl.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use bhyve_api::{ReservoirError, VmmCtlFd}; use clap::Parser; diff --git a/bin/propolis-utils/src/bin/savex.rs b/bin/propolis-utils/src/bin/savex.rs index 457a09e85..2e338f878 100644 --- a/bin/propolis-utils/src/bin/savex.rs +++ b/bin/propolis-utils/src/bin/savex.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use std::convert::{TryFrom, TryInto}; use std::fs::File; use std::io::{Read, Seek, SeekFrom}; diff --git a/crates/bhyve-api/header-check/build.rs b/crates/bhyve-api/header-check/build.rs index 6a8cdb467..bd70acc10 100644 --- a/crates/bhyve-api/header-check/build.rs +++ b/crates/bhyve-api/header-check/build.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + #![deny(warnings)] use std::convert::TryFrom; diff --git a/crates/bhyve-api/header-check/test/main.rs b/crates/bhyve-api/header-check/test/main.rs index 48ad5ecbc..4e0fd2177 100644 --- a/crates/bhyve-api/header-check/test/main.rs +++ b/crates/bhyve-api/header-check/test/main.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + extern crate bhyve_api_sys; extern crate libc; diff --git a/crates/bhyve-api/src/lib.rs b/crates/bhyve-api/src/lib.rs index c1a29e03e..9f4f72664 100644 --- a/crates/bhyve-api/src/lib.rs +++ b/crates/bhyve-api/src/lib.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use std::fs::{File, OpenOptions}; use std::io::{Error, ErrorKind, Result}; use std::mem::{size_of, size_of_val}; diff --git a/crates/bhyve-api/sys/src/enums.rs b/crates/bhyve-api/sys/src/enums.rs index 72699fc03..5dc295aaf 100644 --- a/crates/bhyve-api/sys/src/enums.rs +++ b/crates/bhyve-api/sys/src/enums.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use num_enum::TryFromPrimitive; #[repr(C)] diff --git a/crates/bhyve-api/sys/src/ioctls.rs b/crates/bhyve-api/sys/src/ioctls.rs index 0d6cb60d4..34b701f44 100644 --- a/crates/bhyve-api/sys/src/ioctls.rs +++ b/crates/bhyve-api/sys/src/ioctls.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + // Define constants from machine/vmm_dev.h const VMMCTL_IOC_BASE: i32 = ((b'V' as i32) << 16) | ((b'M' as i32) << 8); diff --git a/crates/bhyve-api/sys/src/lib.rs b/crates/bhyve-api/sys/src/lib.rs index 7005a39c1..61472bac7 100644 --- a/crates/bhyve-api/sys/src/lib.rs +++ b/crates/bhyve-api/sys/src/lib.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + mod enums; pub mod ioctls; mod structs; diff --git a/crates/bhyve-api/sys/src/structs.rs b/crates/bhyve-api/sys/src/structs.rs index e81cd9601..8805ae3ab 100644 --- a/crates/bhyve-api/sys/src/structs.rs +++ b/crates/bhyve-api/sys/src/structs.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use std::io::{Error, ErrorKind, Result}; use std::os::raw::{c_int, c_uint, c_void}; diff --git a/crates/bhyve-api/sys/src/vmm_data.rs b/crates/bhyve-api/sys/src/vmm_data.rs index dff7fe121..b9c7fe047 100644 --- a/crates/bhyve-api/sys/src/vmm_data.rs +++ b/crates/bhyve-api/sys/src/vmm_data.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + #![allow(non_camel_case_types)] // VMM Data Classes diff --git a/crates/dladm/src/lib.rs b/crates/dladm/src/lib.rs index f037be8f0..10ebacae8 100644 --- a/crates/dladm/src/lib.rs +++ b/crates/dladm/src/lib.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + extern crate libc; extern crate num_enum; diff --git a/crates/dladm/src/sys.rs b/crates/dladm/src/sys.rs index 8eac78851..185d66761 100644 --- a/crates/dladm/src/sys.rs +++ b/crates/dladm/src/sys.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use libc::c_int; use num_enum::TryFromPrimitive; diff --git a/crates/propolis-server-config/src/lib.rs b/crates/propolis-server-config/src/lib.rs index d21d2045b..6345f364a 100644 --- a/crates/propolis-server-config/src/lib.rs +++ b/crates/propolis-server-config/src/lib.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use std::collections::BTreeMap; use std::path::{Path, PathBuf}; use std::str::FromStr; diff --git a/crates/propolis-standalone-config/src/lib.rs b/crates/propolis-standalone-config/src/lib.rs index 0664b27e5..b72a76203 100644 --- a/crates/propolis-standalone-config/src/lib.rs +++ b/crates/propolis-standalone-config/src/lib.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use std::collections::BTreeMap; use num_enum::{IntoPrimitive, TryFromPrimitive}; diff --git a/crates/propolis-types/src/lib.rs b/crates/propolis-types/src/lib.rs index efe664fd1..f46093c73 100644 --- a/crates/propolis-types/src/lib.rs +++ b/crates/propolis-types/src/lib.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! Fundamental types shared by other Propolis crates. //! //! This crate defines some basic types that are shared by multiple other diff --git a/crates/viona-api/header-check/build.rs b/crates/viona-api/header-check/build.rs index 7f246552b..9d6be8467 100644 --- a/crates/viona-api/header-check/build.rs +++ b/crates/viona-api/header-check/build.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + #![deny(warnings)] use std::convert::TryFrom; diff --git a/crates/viona-api/header-check/test/main.rs b/crates/viona-api/header-check/test/main.rs index f66a74e74..6ec990ac8 100644 --- a/crates/viona-api/header-check/test/main.rs +++ b/crates/viona-api/header-check/test/main.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + extern crate viona_api_sys; extern crate libc; diff --git a/crates/viona-api/src/lib.rs b/crates/viona-api/src/lib.rs index c0c8cd435..351f7f96e 100644 --- a/crates/viona-api/src/lib.rs +++ b/crates/viona-api/src/lib.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use std::fs::{File, OpenOptions}; use std::io::{Error, ErrorKind, Result}; use std::os::fd::*; diff --git a/crates/viona-api/sys/src/lib.rs b/crates/viona-api/sys/src/lib.rs index afce98677..1d7ae997c 100644 --- a/crates/viona-api/sys/src/lib.rs +++ b/crates/viona-api/sys/src/lib.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + pub mod ioctls { const VNA_IOC: i32 = ((b'V' as i32) << 16) | ((b'C' as i32) << 8); diff --git a/lib/propolis-client/src/generated.rs b/lib/propolis-client/src/generated.rs index 8975d98a2..5be3ee8f8 100644 --- a/lib/propolis-client/src/generated.rs +++ b/lib/propolis-client/src/generated.rs @@ -1,4 +1,7 @@ -// Copyright 2022 Oxide Computer Company +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! Experimental progenitor-generated propolis-server API client. progenitor::generate_api!( diff --git a/lib/propolis-client/src/handmade/api.rs b/lib/propolis-client/src/handmade/api.rs index 85461295b..3bf1a47c3 100644 --- a/lib/propolis-client/src/handmade/api.rs +++ b/lib/propolis-client/src/handmade/api.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! Types used to communicate between the Sled Agent and Propolis. //! //! Although many of these types mirror the API between Nexus diff --git a/lib/propolis-client/src/handmade/mod.rs b/lib/propolis-client/src/handmade/mod.rs index 49d947f40..ddeae7767 100644 --- a/lib/propolis-client/src/handmade/mod.rs +++ b/lib/propolis-client/src/handmade/mod.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! Interface for making API requests to propolis. //! This should be replaced with a client generated from the OpenAPI spec. diff --git a/lib/propolis-client/src/instance_spec/backends.rs b/lib/propolis-client/src/instance_spec/backends.rs index 8bba94ffc..e32763000 100644 --- a/lib/propolis-client/src/instance_spec/backends.rs +++ b/lib/propolis-client/src/instance_spec/backends.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! Backend configuration data: the structs that tell Propolis how to configure //! its components to talk to other services supplied by the host OS or the //! larger rack. diff --git a/lib/propolis-client/src/instance_spec/builder.rs b/lib/propolis-client/src/instance_spec/builder.rs index f75ee805f..cc7de6ab8 100644 --- a/lib/propolis-client/src/instance_spec/builder.rs +++ b/lib/propolis-client/src/instance_spec/builder.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use std::collections::BTreeSet; use propolis_types::PciPath; diff --git a/lib/propolis-client/src/instance_spec/devices.rs b/lib/propolis-client/src/instance_spec/devices.rs index 7afa6a6ee..451bbef40 100644 --- a/lib/propolis-client/src/instance_spec/devices.rs +++ b/lib/propolis-client/src/instance_spec/devices.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! The "device" portions of an instance spec: the parts of the spec that define //! VM properties that are visible to guest software. //! diff --git a/lib/propolis-client/src/instance_spec/mod.rs b/lib/propolis-client/src/instance_spec/mod.rs index 940f0bc79..5f255d7d6 100644 --- a/lib/propolis-client/src/instance_spec/mod.rs +++ b/lib/propolis-client/src/instance_spec/mod.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! Instance specifications: abstract descriptions of a VM's devices and config. //! //! An instance spec describes a VM's virtual devices, backends, and other diff --git a/lib/propolis-client/src/instance_spec/openapi_impls.rs b/lib/propolis-client/src/instance_spec/openapi_impls.rs index ebfbb304c..fba913842 100644 --- a/lib/propolis-client/src/instance_spec/openapi_impls.rs +++ b/lib/propolis-client/src/instance_spec/openapi_impls.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! Conversions from native instance spec types to Progenitor-generated API //! types. diff --git a/lib/propolis-client/src/lib.rs b/lib/propolis-client/src/lib.rs index e3faebee0..3eabdceee 100644 --- a/lib/propolis-client/src/lib.rs +++ b/lib/propolis-client/src/lib.rs @@ -1,4 +1,7 @@ -// Copyright 2022 Oxide Computer Company +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! A client for the Propolis hypervisor frontend's server API. //! //! It is being experimentally migrated to `progenitor` for auto-generation, diff --git a/lib/propolis/src/accessors.rs b/lib/propolis/src/accessors.rs index 4f4333382..4c7f5a040 100644 --- a/lib/propolis/src/accessors.rs +++ b/lib/propolis/src/accessors.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use std::collections::{BTreeMap, BTreeSet, VecDeque}; use std::marker::PhantomData; use std::sync::{Arc, Mutex, MutexGuard, Weak}; diff --git a/lib/propolis/src/api_version.rs b/lib/propolis/src/api_version.rs index 142cc11c8..2d8d08ea2 100644 --- a/lib/propolis/src/api_version.rs +++ b/lib/propolis/src/api_version.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + #[derive(Debug, thiserror::Error)] pub enum Error { #[error("IO Error")] diff --git a/lib/propolis/src/block/crucible.rs b/lib/propolis/src/block/crucible.rs index 0f1f2a644..3623d5a54 100644 --- a/lib/propolis/src/block/crucible.rs +++ b/lib/propolis/src/block/crucible.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! Implement a virtual block device backed by Crucible use std::io; diff --git a/lib/propolis/src/block/file.rs b/lib/propolis/src/block/file.rs index 6f6185359..d9832a868 100644 --- a/lib/propolis/src/block/file.rs +++ b/lib/propolis/src/block/file.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use std::fs::{metadata, File, OpenOptions}; use std::io::{Error, ErrorKind, Result}; use std::num::NonZeroUsize; diff --git a/lib/propolis/src/block/in_memory.rs b/lib/propolis/src/block/in_memory.rs index 85aa865ce..79029a8a9 100644 --- a/lib/propolis/src/block/in_memory.rs +++ b/lib/propolis/src/block/in_memory.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use std::io::{Error, ErrorKind, Result}; use std::num::NonZeroUsize; use std::sync::{Arc, Mutex, Weak}; diff --git a/lib/propolis/src/block/mod.rs b/lib/propolis/src/block/mod.rs index 8e8a1d719..fc4105003 100644 --- a/lib/propolis/src/block/mod.rs +++ b/lib/propolis/src/block/mod.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! Implements an interface to virtualized block devices. use std::any::Any; diff --git a/lib/propolis/src/chardev/file_out.rs b/lib/propolis/src/chardev/file_out.rs index c32baed3c..29dc34182 100644 --- a/lib/propolis/src/chardev/file_out.rs +++ b/lib/propolis/src/chardev/file_out.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use std::fs::File as FsFile; use std::num::NonZeroUsize; use std::sync::{Arc, Mutex}; diff --git a/lib/propolis/src/chardev/mod.rs b/lib/propolis/src/chardev/mod.rs index 5df01aa98..d27689619 100644 --- a/lib/propolis/src/chardev/mod.rs +++ b/lib/propolis/src/chardev/mod.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::Mutex; diff --git a/lib/propolis/src/chardev/pollers.rs b/lib/propolis/src/chardev/pollers.rs index 421313631..4a6b3e61a 100644 --- a/lib/propolis/src/chardev/pollers.rs +++ b/lib/propolis/src/chardev/pollers.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use std::collections::VecDeque; use std::num::NonZeroUsize; use std::sync::atomic::{AtomicBool, Ordering}; diff --git a/lib/propolis/src/chardev/sock.rs b/lib/propolis/src/chardev/sock.rs index d7b3b696e..07dc806cf 100644 --- a/lib/propolis/src/chardev/sock.rs +++ b/lib/propolis/src/chardev/sock.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use std::fs; use std::io::{ErrorKind, Result}; use std::num::NonZeroUsize; diff --git a/lib/propolis/src/common.rs b/lib/propolis/src/common.rs index e81d1ece6..aee4e9c2a 100644 --- a/lib/propolis/src/common.rs +++ b/lib/propolis/src/common.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use std::ops::{Add, BitAnd}; use std::ops::{Bound::*, RangeBounds}; use std::slice::SliceIndex; diff --git a/lib/propolis/src/exits.rs b/lib/propolis/src/exits.rs index eb2f5240b..7505b8bdc 100644 --- a/lib/propolis/src/exits.rs +++ b/lib/propolis/src/exits.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! Describes transitions from VMs to the VMM. use std::convert::TryFrom; diff --git a/lib/propolis/src/hw/bhyve/atpic.rs b/lib/propolis/src/hw/bhyve/atpic.rs index a9a13fd91..e7b15c3f8 100644 --- a/lib/propolis/src/hw/bhyve/atpic.rs +++ b/lib/propolis/src/hw/bhyve/atpic.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use std::sync::Arc; use crate::inventory::Entity; diff --git a/lib/propolis/src/hw/bhyve/atpit.rs b/lib/propolis/src/hw/bhyve/atpit.rs index 8e9f8e906..cf15c8294 100644 --- a/lib/propolis/src/hw/bhyve/atpit.rs +++ b/lib/propolis/src/hw/bhyve/atpit.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use std::sync::Arc; use crate::inventory::Entity; diff --git a/lib/propolis/src/hw/bhyve/hpet.rs b/lib/propolis/src/hw/bhyve/hpet.rs index 109757d19..de379b41e 100644 --- a/lib/propolis/src/hw/bhyve/hpet.rs +++ b/lib/propolis/src/hw/bhyve/hpet.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use std::sync::Arc; use crate::inventory::Entity; diff --git a/lib/propolis/src/hw/bhyve/ioapic.rs b/lib/propolis/src/hw/bhyve/ioapic.rs index fc02d9993..54a8b0aa5 100644 --- a/lib/propolis/src/hw/bhyve/ioapic.rs +++ b/lib/propolis/src/hw/bhyve/ioapic.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use std::sync::Arc; use crate::inventory::Entity; diff --git a/lib/propolis/src/hw/bhyve/mod.rs b/lib/propolis/src/hw/bhyve/mod.rs index 7febc2dbe..c7287ff6a 100644 --- a/lib/propolis/src/hw/bhyve/mod.rs +++ b/lib/propolis/src/hw/bhyve/mod.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + mod atpic; mod atpit; mod hpet; diff --git a/lib/propolis/src/hw/bhyve/pmtimer.rs b/lib/propolis/src/hw/bhyve/pmtimer.rs index cac533598..0bdbc9c78 100644 --- a/lib/propolis/src/hw/bhyve/pmtimer.rs +++ b/lib/propolis/src/hw/bhyve/pmtimer.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use std::sync::{Arc, Mutex}; use crate::inventory::Entity; diff --git a/lib/propolis/src/hw/bhyve/rtc.rs b/lib/propolis/src/hw/bhyve/rtc.rs index 96aeb430d..ce2ad3114 100644 --- a/lib/propolis/src/hw/bhyve/rtc.rs +++ b/lib/propolis/src/hw/bhyve/rtc.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use std::io; use std::sync::Arc; use std::time::Duration; diff --git a/lib/propolis/src/hw/chipset/i440fx.rs b/lib/propolis/src/hw/chipset/i440fx.rs index 52ed641f6..909f1fd05 100644 --- a/lib/propolis/src/hw/chipset/i440fx.rs +++ b/lib/propolis/src/hw/chipset/i440fx.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use std::sync::atomic::{AtomicU8, Ordering}; use std::sync::{Arc, Mutex}; diff --git a/lib/propolis/src/hw/chipset/mod.rs b/lib/propolis/src/hw/chipset/mod.rs index 32d9c92e1..e37b89163 100644 --- a/lib/propolis/src/hw/chipset/mod.rs +++ b/lib/propolis/src/hw/chipset/mod.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use std::sync::Arc; use crate::hw::pci::{Bdf, Endpoint}; diff --git a/lib/propolis/src/hw/ibmpc.rs b/lib/propolis/src/hw/ibmpc.rs index 88fde575c..af88cdb1e 100644 --- a/lib/propolis/src/hw/ibmpc.rs +++ b/lib/propolis/src/hw/ibmpc.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + /// IO port and IRQ definitions for standard IBM PC hardware pub const PORT_COM1: u16 = 0x3f8; diff --git a/lib/propolis/src/hw/ids.rs b/lib/propolis/src/hw/ids.rs index 893bbfd95..6f0052a6d 100644 --- a/lib/propolis/src/hw/ids.rs +++ b/lib/propolis/src/hw/ids.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! Definitions of various IDs assigned to the devices we expose to guest instances. /// Oxide's IEE MA-L assignment. diff --git a/lib/propolis/src/hw/mod.rs b/lib/propolis/src/hw/mod.rs index 4c380aff6..401cd09c3 100644 --- a/lib/propolis/src/hw/mod.rs +++ b/lib/propolis/src/hw/mod.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + pub mod bhyve; pub mod chipset; pub mod ibmpc; diff --git a/lib/propolis/src/hw/nvme/admin.rs b/lib/propolis/src/hw/nvme/admin.rs index 0dad4492a..1c190c4ed 100644 --- a/lib/propolis/src/hw/nvme/admin.rs +++ b/lib/propolis/src/hw/nvme/admin.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use std::cmp::min; use std::mem::size_of; diff --git a/lib/propolis/src/hw/nvme/bits.rs b/lib/propolis/src/hw/nvme/bits.rs index 060b2d395..d6de6ac89 100644 --- a/lib/propolis/src/hw/nvme/bits.rs +++ b/lib/propolis/src/hw/nvme/bits.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + #![allow(dead_code)] use bitstruct::bitstruct; diff --git a/lib/propolis/src/hw/nvme/cmds.rs b/lib/propolis/src/hw/nvme/cmds.rs index 53fa9ea4f..961dea0c3 100644 --- a/lib/propolis/src/hw/nvme/cmds.rs +++ b/lib/propolis/src/hw/nvme/cmds.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use super::bits::{self, RawSubmission, StatusCodeType}; use super::queue::{QueueCreateErr, QueueId}; use crate::block; diff --git a/lib/propolis/src/hw/nvme/mod.rs b/lib/propolis/src/hw/nvme/mod.rs index 80d530626..1e0461826 100644 --- a/lib/propolis/src/hw/nvme/mod.rs +++ b/lib/propolis/src/hw/nvme/mod.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use std::convert::TryInto; use std::mem::size_of; use std::sync::{Arc, Mutex, MutexGuard}; diff --git a/lib/propolis/src/hw/nvme/queue.rs b/lib/propolis/src/hw/nvme/queue.rs index f1367b653..dec9c4425 100644 --- a/lib/propolis/src/hw/nvme/queue.rs +++ b/lib/propolis/src/hw/nvme/queue.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use std::collections::HashMap; use std::sync::{Arc, Mutex, Weak}; diff --git a/lib/propolis/src/hw/nvme/requests.rs b/lib/propolis/src/hw/nvme/requests.rs index 0c34194be..7811fb3f8 100644 --- a/lib/propolis/src/hw/nvme/requests.rs +++ b/lib/propolis/src/hw/nvme/requests.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use crate::{ accessors::{opt_guard, MemAccessor}, block::{self, BlockPayload, Operation, Request, Result as BlockResult}, diff --git a/lib/propolis/src/hw/pci/bar.rs b/lib/propolis/src/hw/pci/bar.rs index 9c7083eda..d01bdfb8d 100644 --- a/lib/propolis/src/hw/pci/bar.rs +++ b/lib/propolis/src/hw/pci/bar.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use std::convert::TryFrom; use std::convert::TryInto; diff --git a/lib/propolis/src/hw/pci/bits.rs b/lib/propolis/src/hw/pci/bits.rs index 76f3c84d6..5748fa378 100644 --- a/lib/propolis/src/hw/pci/bits.rs +++ b/lib/propolis/src/hw/pci/bits.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! PCI config registers. #![allow(unused)] diff --git a/lib/propolis/src/hw/pci/bridge.rs b/lib/propolis/src/hw/pci/bridge.rs index d2be28d7c..3ec980196 100644 --- a/lib/propolis/src/hw/pci/bridge.rs +++ b/lib/propolis/src/hw/pci/bridge.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! Support for PCI bridges. use std::num::NonZeroU8; diff --git a/lib/propolis/src/hw/pci/bus.rs b/lib/propolis/src/hw/pci/bus.rs index 3e02d0a0d..7a5adc882 100644 --- a/lib/propolis/src/hw/pci/bus.rs +++ b/lib/propolis/src/hw/pci/bus.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use std::collections::BTreeMap; use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::{Arc, Mutex, Weak}; diff --git a/lib/propolis/src/hw/pci/cfgspace.rs b/lib/propolis/src/hw/pci/cfgspace.rs index 89b97d4eb..697409df8 100644 --- a/lib/propolis/src/hw/pci/cfgspace.rs +++ b/lib/propolis/src/hw/pci/cfgspace.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! Helpers for dealing with configuration space. use crate::common::RWOp; diff --git a/lib/propolis/src/hw/pci/device.rs b/lib/propolis/src/hw/pci/device.rs index affc908b9..956786834 100644 --- a/lib/propolis/src/hw/pci/device.rs +++ b/lib/propolis/src/hw/pci/device.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use std::sync::{Arc, Condvar, Mutex, MutexGuard}; use super::bar::{BarDefine, Bars}; diff --git a/lib/propolis/src/hw/pci/mod.rs b/lib/propolis/src/hw/pci/mod.rs index ff96bf64f..e7c3ba23f 100644 --- a/lib/propolis/src/hw/pci/mod.rs +++ b/lib/propolis/src/hw/pci/mod.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use std::convert::TryFrom; use std::fmt::Result as FmtResult; use std::fmt::{Display, Formatter}; diff --git a/lib/propolis/src/hw/pci/topology.rs b/lib/propolis/src/hw/pci/topology.rs index 868471776..14c8972d1 100644 --- a/lib/propolis/src/hw/pci/topology.rs +++ b/lib/propolis/src/hw/pci/topology.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! A PCI topology containing one or more PCI buses. use std::collections::{BTreeMap, BTreeSet}; diff --git a/lib/propolis/src/hw/ps2/ctrl.rs b/lib/propolis/src/hw/ps2/ctrl.rs index d0d369827..ff81c1228 100644 --- a/lib/propolis/src/hw/ps2/ctrl.rs +++ b/lib/propolis/src/hw/ps2/ctrl.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use std::collections::VecDeque; use std::convert::TryFrom; use std::mem::replace; diff --git a/lib/propolis/src/hw/ps2/keyboard/mod.rs b/lib/propolis/src/hw/ps2/keyboard/mod.rs index 85380cd95..a88caa85d 100644 --- a/lib/propolis/src/hw/ps2/keyboard/mod.rs +++ b/lib/propolis/src/hw/ps2/keyboard/mod.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + mod scan_code_1; mod scan_code_2; diff --git a/lib/propolis/src/hw/ps2/keyboard/scan_code_1.rs b/lib/propolis/src/hw/ps2/keyboard/scan_code_1.rs index a048c954e..8c8ead70d 100644 --- a/lib/propolis/src/hw/ps2/keyboard/scan_code_1.rs +++ b/lib/propolis/src/hw/ps2/keyboard/scan_code_1.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + // Scan Code Set 1 codes pub const SC1_RELEASE_FLAG: u8 = 0x80; diff --git a/lib/propolis/src/hw/ps2/keyboard/scan_code_2.rs b/lib/propolis/src/hw/ps2/keyboard/scan_code_2.rs index 36e216fcb..ea2206418 100644 --- a/lib/propolis/src/hw/ps2/keyboard/scan_code_2.rs +++ b/lib/propolis/src/hw/ps2/keyboard/scan_code_2.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + // Scan Code Set 2 codes pub const SC2_RELEASE_CODE: u8 = 0xf0; diff --git a/lib/propolis/src/hw/ps2/mod.rs b/lib/propolis/src/hw/ps2/mod.rs index 4a11d4b6c..77bd586ea 100644 --- a/lib/propolis/src/hw/ps2/mod.rs +++ b/lib/propolis/src/hw/ps2/mod.rs @@ -1,2 +1,6 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + pub mod ctrl; mod keyboard; diff --git a/lib/propolis/src/hw/qemu/debug.rs b/lib/propolis/src/hw/qemu/debug.rs index bd422fea6..6260b7164 100644 --- a/lib/propolis/src/hw/qemu/debug.rs +++ b/lib/propolis/src/hw/qemu/debug.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use std::sync::Arc; use crate::chardev::{BlockingSource, BlockingSourceConsumer, ConsumerCell}; diff --git a/lib/propolis/src/hw/qemu/fwcfg.rs b/lib/propolis/src/hw/qemu/fwcfg.rs index fd41fe0a4..05a3c3496 100644 --- a/lib/propolis/src/hw/qemu/fwcfg.rs +++ b/lib/propolis/src/hw/qemu/fwcfg.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use std::collections::BTreeMap; use std::sync::{Arc, Mutex, MutexGuard}; diff --git a/lib/propolis/src/hw/qemu/mod.rs b/lib/propolis/src/hw/qemu/mod.rs index 17d4edab4..266da9899 100644 --- a/lib/propolis/src/hw/qemu/mod.rs +++ b/lib/propolis/src/hw/qemu/mod.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + pub mod debug; pub mod fwcfg; pub mod ramfb; diff --git a/lib/propolis/src/hw/qemu/ramfb.rs b/lib/propolis/src/hw/qemu/ramfb.rs index 753f84c79..91f39d5de 100644 --- a/lib/propolis/src/hw/qemu/ramfb.rs +++ b/lib/propolis/src/hw/qemu/ramfb.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use std::sync::{Arc, Mutex}; use crate::accessors::MemAccessor; diff --git a/lib/propolis/src/hw/uart/lpc.rs b/lib/propolis/src/hw/uart/lpc.rs index 2f656c863..f03f06713 100644 --- a/lib/propolis/src/hw/uart/lpc.rs +++ b/lib/propolis/src/hw/uart/lpc.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use std::sync::{Arc, Mutex}; use super::uart16550::{migrate, Uart}; diff --git a/lib/propolis/src/hw/uart/mod.rs b/lib/propolis/src/hw/uart/mod.rs index 562d79a6d..8f0586385 100644 --- a/lib/propolis/src/hw/uart/mod.rs +++ b/lib/propolis/src/hw/uart/mod.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + mod lpc; mod uart16550; diff --git a/lib/propolis/src/hw/uart/uart16550.rs b/lib/propolis/src/hw/uart/uart16550.rs index 71ac60e0a..f0a8df213 100644 --- a/lib/propolis/src/hw/uart/uart16550.rs +++ b/lib/propolis/src/hw/uart/uart16550.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use std::collections::VecDeque; use crate::migrate::MigrateStateError; diff --git a/lib/propolis/src/hw/virtio/bits.rs b/lib/propolis/src/hw/virtio/bits.rs index d88449aa4..7e3948f11 100644 --- a/lib/propolis/src/hw/virtio/bits.rs +++ b/lib/propolis/src/hw/virtio/bits.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + pub const VIRTIO_DEV_NET: u16 = 0x1000; pub const VIRTIO_DEV_BLOCK: u16 = 0x1001; pub const VIRTIO_DEV_9P: u16 = 0x1009; diff --git a/lib/propolis/src/hw/virtio/block.rs b/lib/propolis/src/hw/virtio/block.rs index a71969f22..8ccd46239 100644 --- a/lib/propolis/src/hw/virtio/block.rs +++ b/lib/propolis/src/hw/virtio/block.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use std::num::NonZeroU16; use std::sync::Arc; diff --git a/lib/propolis/src/hw/virtio/mod.rs b/lib/propolis/src/hw/virtio/mod.rs index 73ce82543..f102e87d0 100644 --- a/lib/propolis/src/hw/virtio/mod.rs +++ b/lib/propolis/src/hw/virtio/mod.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use std::sync::Arc; #[allow(unused)] diff --git a/lib/propolis/src/hw/virtio/p9fs.rs b/lib/propolis/src/hw/virtio/p9fs.rs index 30518f47f..21d309d3a 100644 --- a/lib/propolis/src/hw/virtio/p9fs.rs +++ b/lib/propolis/src/hw/virtio/p9fs.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use std::collections::HashMap; use std::convert::TryInto; use std::fs; diff --git a/lib/propolis/src/hw/virtio/pci.rs b/lib/propolis/src/hw/virtio/pci.rs index bcead5f4b..84cc3814c 100644 --- a/lib/propolis/src/hw/virtio/pci.rs +++ b/lib/propolis/src/hw/virtio/pci.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use std::ffi::c_void; use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::{Arc, Condvar, Mutex, MutexGuard, Weak}; diff --git a/lib/propolis/src/hw/virtio/queue.rs b/lib/propolis/src/hw/virtio/queue.rs index 559749dff..044096fe6 100644 --- a/lib/propolis/src/hw/virtio/queue.rs +++ b/lib/propolis/src/hw/virtio/queue.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use std::mem; use std::num::{NonZeroU16, Wrapping}; use std::ops::Index; diff --git a/lib/propolis/src/hw/virtio/softnpu.rs b/lib/propolis/src/hw/virtio/softnpu.rs index 920400734..91c7a963b 100644 --- a/lib/propolis/src/hw/virtio/softnpu.rs +++ b/lib/propolis/src/hw/virtio/softnpu.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use std::{ collections::BTreeMap, fs::{self, File, OpenOptions}, diff --git a/lib/propolis/src/hw/virtio/viona.rs b/lib/propolis/src/hw/virtio/viona.rs index e4a7af2b6..e048d9ca9 100644 --- a/lib/propolis/src/hw/virtio/viona.rs +++ b/lib/propolis/src/hw/virtio/viona.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + #![cfg_attr(not(target_os = "illumos"), allow(dead_code, unused_imports))] use std::io::{self, Error, ErrorKind}; diff --git a/lib/propolis/src/instance.rs b/lib/propolis/src/instance.rs index 0e32e61f7..523c7b35a 100644 --- a/lib/propolis/src/instance.rs +++ b/lib/propolis/src/instance.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! Structures related VM instances management. use std::sync::{Arc, Mutex, MutexGuard}; diff --git a/lib/propolis/src/intr_pins.rs b/lib/propolis/src/intr_pins.rs index 450b9a8ff..c1d8ae8e1 100644 --- a/lib/propolis/src/intr_pins.rs +++ b/lib/propolis/src/intr_pins.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + #![allow(clippy::mutex_atomic)] use std::sync::{Arc, Mutex, Weak}; diff --git a/lib/propolis/src/inventory.rs b/lib/propolis/src/inventory.rs index 1f30f240d..ad4f31405 100644 --- a/lib/propolis/src/inventory.rs +++ b/lib/propolis/src/inventory.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use futures::future::{self, BoxFuture}; use std::any::Any; use std::collections::{ diff --git a/lib/propolis/src/lib.rs b/lib/propolis/src/lib.rs index 0461e51fb..de3140d75 100644 --- a/lib/propolis/src/lib.rs +++ b/lib/propolis/src/lib.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + #![allow(clippy::style)] #![allow(clippy::drop_non_drop)] diff --git a/lib/propolis/src/migrate.rs b/lib/propolis/src/migrate.rs index a5791ff29..cd5aa1e45 100644 --- a/lib/propolis/src/migrate.rs +++ b/lib/propolis/src/migrate.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use crate::vmm::MemCtx; use serde::{Deserialize, Serialize}; diff --git a/lib/propolis/src/mmio.rs b/lib/propolis/src/mmio.rs index 338489df7..03c8f32a8 100644 --- a/lib/propolis/src/mmio.rs +++ b/lib/propolis/src/mmio.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use std::sync::{Arc, Mutex}; use crate::common::*; diff --git a/lib/propolis/src/pio.rs b/lib/propolis/src/pio.rs index 76fd4a616..72947f882 100644 --- a/lib/propolis/src/pio.rs +++ b/lib/propolis/src/pio.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use std::sync::{Arc, Mutex}; use crate::common::*; diff --git a/lib/propolis/src/tasks.rs b/lib/propolis/src/tasks.rs index 1c323ff51..9914ad26f 100644 --- a/lib/propolis/src/tasks.rs +++ b/lib/propolis/src/tasks.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use std::future::Future; use std::pin::Pin; use std::sync::{Arc, Condvar, Mutex, MutexGuard, Weak}; diff --git a/lib/propolis/src/util/aspace.rs b/lib/propolis/src/util/aspace.rs index b3f9ba78b..147f97959 100644 --- a/lib/propolis/src/util/aspace.rs +++ b/lib/propolis/src/util/aspace.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! Utilities to construct and manipulate an address space. use std::collections::{btree_map, BTreeMap}; diff --git a/lib/propolis/src/util/mod.rs b/lib/propolis/src/util/mod.rs index 3b22bfb88..fce154836 100644 --- a/lib/propolis/src/util/mod.rs +++ b/lib/propolis/src/util/mod.rs @@ -1,2 +1,6 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + pub mod aspace; pub mod regmap; diff --git a/lib/propolis/src/util/regmap.rs b/lib/propolis/src/util/regmap.rs index 78ac05e56..d0ee57743 100644 --- a/lib/propolis/src/util/regmap.rs +++ b/lib/propolis/src/util/regmap.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use std::cmp::Ordering; use std::ops::Bound::Included; diff --git a/lib/propolis/src/vcpu.rs b/lib/propolis/src/vcpu.rs index c5f6af895..f9b54b093 100644 --- a/lib/propolis/src/vcpu.rs +++ b/lib/propolis/src/vcpu.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! Virtual CPU functionality. use std::io::Result; diff --git a/lib/propolis/src/vmm/hdl.rs b/lib/propolis/src/vmm/hdl.rs index df7ca17d0..2b4699083 100644 --- a/lib/propolis/src/vmm/hdl.rs +++ b/lib/propolis/src/vmm/hdl.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! Module responsible for communicating with the kernel's VMM. //! //! Responsible for both issuing commands to the bhyve diff --git a/lib/propolis/src/vmm/machine.rs b/lib/propolis/src/vmm/machine.rs index b097358ae..05bc46d23 100644 --- a/lib/propolis/src/vmm/machine.rs +++ b/lib/propolis/src/vmm/machine.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! Representation of a virtual machine's hardware. use std::io::{Error, ErrorKind, Result}; diff --git a/lib/propolis/src/vmm/mem.rs b/lib/propolis/src/vmm/mem.rs index 89dc590ce..d4eca8715 100644 --- a/lib/propolis/src/vmm/mem.rs +++ b/lib/propolis/src/vmm/mem.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! Module for managing guest memory mappings. use std::io::{Error, ErrorKind, Result}; diff --git a/lib/propolis/src/vmm/mod.rs b/lib/propolis/src/vmm/mod.rs index eecb14384..44ee4c87c 100644 --- a/lib/propolis/src/vmm/mod.rs +++ b/lib/propolis/src/vmm/mod.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! Representation of a VM's hardware and kernel structures. pub mod hdl; diff --git a/lib/propolis/src/vmm/time.rs b/lib/propolis/src/vmm/time.rs index da6f7ac33..697a85f6e 100644 --- a/lib/propolis/src/vmm/time.rs +++ b/lib/propolis/src/vmm/time.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use serde::{Deserialize, Serialize}; use std::time::Duration; use thiserror::Error; diff --git a/packaging/propolis-package/src/main.rs b/packaging/propolis-package/src/main.rs index fb127ff21..428cbea1b 100644 --- a/packaging/propolis-package/src/main.rs +++ b/packaging/propolis-package/src/main.rs @@ -1,4 +1,6 @@ -// Copyright 2022 Oxide Computer Company +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. use anyhow::anyhow; use anyhow::Context; diff --git a/phd-tests/framework/src/artifacts.rs b/phd-tests/framework/src/artifacts.rs index cd514f756..e5b6f46ea 100644 --- a/phd-tests/framework/src/artifacts.rs +++ b/phd-tests/framework/src/artifacts.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! Management of artifacts: guest OS and guest firmware images that can be //! attached to guests. //! diff --git a/phd-tests/framework/src/disk/crucible.rs b/phd-tests/framework/src/disk/crucible.rs index 6b4eb1031..ed878d2e7 100644 --- a/phd-tests/framework/src/disk/crucible.rs +++ b/phd-tests/framework/src/disk/crucible.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! Abstractions for Crucible-backed disks. use std::{ diff --git a/phd-tests/framework/src/disk/file.rs b/phd-tests/framework/src/disk/file.rs index 6b80f65d6..a79f5ee56 100644 --- a/phd-tests/framework/src/disk/file.rs +++ b/phd-tests/framework/src/disk/file.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! Abstractions for disks with a raw file backend. use std::path::{Path, PathBuf}; diff --git a/phd-tests/framework/src/disk/mod.rs b/phd-tests/framework/src/disk/mod.rs index 5c927185a..08429b55f 100644 --- a/phd-tests/framework/src/disk/mod.rs +++ b/phd-tests/framework/src/disk/mod.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! Routines for creating and managing guest disks. //! //! Test cases create disks using the [`DiskFactory`] in their test contexts. diff --git a/phd-tests/framework/src/guest_os/alpine.rs b/phd-tests/framework/src/guest_os/alpine.rs index 68acb5685..00b226288 100644 --- a/phd-tests/framework/src/guest_os/alpine.rs +++ b/phd-tests/framework/src/guest_os/alpine.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! Guest OS adaptations for Alpine Linux's "virtual" image. use super::{CommandSequence, CommandSequenceEntry, GuestOs}; diff --git a/phd-tests/framework/src/guest_os/debian11_nocloud.rs b/phd-tests/framework/src/guest_os/debian11_nocloud.rs index 9733d4983..dceca4d42 100644 --- a/phd-tests/framework/src/guest_os/debian11_nocloud.rs +++ b/phd-tests/framework/src/guest_os/debian11_nocloud.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! Guest OS adaptations for Debian 11 nocloud images. use super::{CommandSequence, CommandSequenceEntry, GuestOs}; diff --git a/phd-tests/framework/src/guest_os/mod.rs b/phd-tests/framework/src/guest_os/mod.rs index 59f7bb9cc..1d2baf0d7 100644 --- a/phd-tests/framework/src/guest_os/mod.rs +++ b/phd-tests/framework/src/guest_os/mod.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! Traits and objects that abstract over differences between guest OS //! distributions. diff --git a/phd-tests/framework/src/guest_os/ubuntu22_04.rs b/phd-tests/framework/src/guest_os/ubuntu22_04.rs index 98fffbf02..1d3cc7143 100644 --- a/phd-tests/framework/src/guest_os/ubuntu22_04.rs +++ b/phd-tests/framework/src/guest_os/ubuntu22_04.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! Guest OS adaptations for Ubuntu 22.04 images. These must be prepped with //! a cloud-init disk that is configured with the appropriate user and password. diff --git a/phd-tests/framework/src/host_api/kvm.rs b/phd-tests/framework/src/host_api/kvm.rs index 08b7141d9..a89071f63 100644 --- a/phd-tests/framework/src/host_api/kvm.rs +++ b/phd-tests/framework/src/host_api/kvm.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use std::{ffi::CString, fmt::Display}; use anyhow::{anyhow, Result}; diff --git a/phd-tests/framework/src/host_api/mod.rs b/phd-tests/framework/src/host_api/mod.rs index 67e087c41..813c9bd28 100644 --- a/phd-tests/framework/src/host_api/mod.rs +++ b/phd-tests/framework/src/host_api/mod.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + cfg_if::cfg_if! { if #[cfg(target_os = "illumos")] { mod kvm; diff --git a/phd-tests/framework/src/host_api/stubs.rs b/phd-tests/framework/src/host_api/stubs.rs index 66f09b61b..20d6d8ff0 100644 --- a/phd-tests/framework/src/host_api/stubs.rs +++ b/phd-tests/framework/src/host_api/stubs.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use anyhow::{anyhow, Result}; pub struct VmmStateWriteGuard; diff --git a/phd-tests/framework/src/lib.rs b/phd-tests/framework/src/lib.rs index 20e3ade38..980e41ded 100644 --- a/phd-tests/framework/src/lib.rs +++ b/phd-tests/framework/src/lib.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! The Pheidippides framework: interfaces for creating and interacting with //! VMs. diff --git a/phd-tests/framework/src/port_allocator.rs b/phd-tests/framework/src/port_allocator.rs index b245b1559..725f9d7a4 100644 --- a/phd-tests/framework/src/port_allocator.rs +++ b/phd-tests/framework/src/port_allocator.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! A small allocator for selecting port numbers. use std::{ diff --git a/phd-tests/framework/src/serial/mod.rs b/phd-tests/framework/src/serial/mod.rs index d1e5c305d..43852763a 100644 --- a/phd-tests/framework/src/serial/mod.rs +++ b/phd-tests/framework/src/serial/mod.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use anyhow::Result; use futures::{SinkExt, StreamExt}; use reqwest::Upgraded; diff --git a/phd-tests/framework/src/serial/vt100.rs b/phd-tests/framework/src/serial/vt100.rs index 321dfa8c1..302e45b16 100644 --- a/phd-tests/framework/src/serial/vt100.rs +++ b/phd-tests/framework/src/serial/vt100.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use std::sync::Arc; use anyhow::Result; diff --git a/phd-tests/framework/src/server_log_mode.rs b/phd-tests/framework/src/server_log_mode.rs index 1495f781d..536672970 100644 --- a/phd-tests/framework/src/server_log_mode.rs +++ b/phd-tests/framework/src/server_log_mode.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! Types and helpers specifying where a server process's stdout/stderr should //! be recorded. diff --git a/phd-tests/framework/src/test_vm/factory.rs b/phd-tests/framework/src/test_vm/factory.rs index 96db97aa3..f2151b898 100644 --- a/phd-tests/framework/src/test_vm/factory.rs +++ b/phd-tests/framework/src/test_vm/factory.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! Helpers for configuring and starting new VMs. use std::{ diff --git a/phd-tests/framework/src/test_vm/mod.rs b/phd-tests/framework/src/test_vm/mod.rs index 1cd2a4d67..8d7ffc887 100644 --- a/phd-tests/framework/src/test_vm/mod.rs +++ b/phd-tests/framework/src/test_vm/mod.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! Routines for starting VMs, changing their states, and interacting with their //! guest OSes. diff --git a/phd-tests/framework/src/test_vm/server.rs b/phd-tests/framework/src/test_vm/server.rs index b4b2a41bc..87ae26ec1 100644 --- a/phd-tests/framework/src/test_vm/server.rs +++ b/phd-tests/framework/src/test_vm/server.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! Routines and data structures for working with Propolis server processes. use std::{fmt::Debug, net::SocketAddrV4, path::PathBuf, process::Stdio}; diff --git a/phd-tests/framework/src/test_vm/vm_config.rs b/phd-tests/framework/src/test_vm/vm_config.rs index df73f5a88..fd47513de 100644 --- a/phd-tests/framework/src/test_vm/vm_config.rs +++ b/phd-tests/framework/src/test_vm/vm_config.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! Structures that express how a VM should be configured. use std::{ diff --git a/phd-tests/runner/src/config.rs b/phd-tests/runner/src/config.rs index 5201f41d6..ebf74cd37 100644 --- a/phd-tests/runner/src/config.rs +++ b/phd-tests/runner/src/config.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use std::path::PathBuf; use clap::{Args, Parser, Subcommand}; diff --git a/phd-tests/runner/src/execute.rs b/phd-tests/runner/src/execute.rs index 39876d4f3..69f575f89 100644 --- a/phd-tests/runner/src/execute.rs +++ b/phd-tests/runner/src/execute.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use std::cell::RefCell; use std::time::{Duration, Instant}; diff --git a/phd-tests/runner/src/fixtures.rs b/phd-tests/runner/src/fixtures.rs index bf2d3bc90..69486cef7 100644 --- a/phd-tests/runner/src/fixtures.rs +++ b/phd-tests/runner/src/fixtures.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use anyhow::Result; use phd_framework::artifacts::ArtifactStore; use tracing::instrument; diff --git a/phd-tests/runner/src/main.rs b/phd-tests/runner/src/main.rs index 02e02c46f..02f5c1bda 100644 --- a/phd-tests/runner/src/main.rs +++ b/phd-tests/runner/src/main.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + mod config; mod execute; mod fixtures; diff --git a/phd-tests/testcase/src/lib.rs b/phd-tests/testcase/src/lib.rs index 767dc9973..2fe0a340f 100644 --- a/phd-tests/testcase/src/lib.rs +++ b/phd-tests/testcase/src/lib.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + pub use anyhow::Result; pub use inventory::submit as inventory_submit; pub use phd_framework; diff --git a/phd-tests/testcase_macro/src/lib.rs b/phd-tests/testcase_macro/src/lib.rs index a5f2bdf6d..54678dea4 100644 --- a/phd-tests/testcase_macro/src/lib.rs +++ b/phd-tests/testcase_macro/src/lib.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use proc_macro::TokenStream; use quote::quote; use syn::{parse_macro_input, ItemFn}; diff --git a/phd-tests/tests/src/crucible/migrate.rs b/phd-tests/tests/src/crucible/migrate.rs index c4294fff6..0932916d4 100644 --- a/phd-tests/tests/src/crucible/migrate.rs +++ b/phd-tests/tests/src/crucible/migrate.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use std::time::Duration; use phd_framework::test_vm::vm_config::DiskInterface; diff --git a/phd-tests/tests/src/crucible/mod.rs b/phd-tests/tests/src/crucible/mod.rs index 9ae9d2fb7..e69f1eb61 100644 --- a/phd-tests/tests/src/crucible/mod.rs +++ b/phd-tests/tests/src/crucible/mod.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use std::sync::Arc; use phd_testcase::{ diff --git a/phd-tests/tests/src/crucible/smoke.rs b/phd-tests/tests/src/crucible/smoke.rs index fe3cede05..d91fdfd92 100644 --- a/phd-tests/tests/src/crucible/smoke.rs +++ b/phd-tests/tests/src/crucible/smoke.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use std::time::Duration; use phd_testcase::{phd_framework::test_vm::vm_config::DiskInterface, *}; diff --git a/phd-tests/tests/src/lib.rs b/phd-tests/tests/src/lib.rs index b65914296..eff412d9c 100644 --- a/phd-tests/tests/src/lib.rs +++ b/phd-tests/tests/src/lib.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + pub use phd_testcase; mod crucible; diff --git a/phd-tests/tests/src/migrate.rs b/phd-tests/tests/src/migrate.rs index debc2daef..f80fcd015 100644 --- a/phd-tests/tests/src/migrate.rs +++ b/phd-tests/tests/src/migrate.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use std::time::Duration; use phd_testcase::*; diff --git a/phd-tests/tests/src/server_state_machine.rs b/phd-tests/tests/src/server_state_machine.rs index b578fb7b3..edb3fa66e 100644 --- a/phd-tests/tests/src/server_state_machine.rs +++ b/phd-tests/tests/src/server_state_machine.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + //! Tests verifying the server state machine. use std::time::Duration; diff --git a/phd-tests/tests/src/smoke.rs b/phd-tests/tests/src/smoke.rs index 15e8f8b6c..941799edc 100644 --- a/phd-tests/tests/src/smoke.rs +++ b/phd-tests/tests/src/smoke.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use phd_testcase::{ phd_framework::{disk::DiskSource, test_vm::vm_config::DiskInterface}, *, diff --git a/xtask/src/main.rs b/xtask/src/main.rs index c24962e38..6585836ef 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + use std::process::{Command, Stdio}; use anyhow::{bail, Result};