Skip to content

Commit

Permalink
Use Rust conventional comment style for license headers
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Gunnerson <[email protected]>
  • Loading branch information
chenxiaolong committed Sep 22, 2024
1 parent 02ae9cd commit c974ab5
Show file tree
Hide file tree
Showing 56 changed files with 119 additions and 201 deletions.
6 changes: 2 additions & 4 deletions avbroot/build.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*
* SPDX-FileCopyrightText: 2023-2024 Andrew Gunnerson
* SPDX-License-Identifier: GPL-3.0-only
*/
// SPDX-FileCopyrightText: 2023-2024 Andrew Gunnerson
// SPDX-License-Identifier: GPL-3.0-only

use std::{env, ffi::OsStr, fs, io, path::Path};

Expand Down
6 changes: 2 additions & 4 deletions avbroot/src/cli/args.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*
* SPDX-FileCopyrightText: 2023-2024 Andrew Gunnerson
* SPDX-License-Identifier: GPL-3.0-only
*/
// SPDX-FileCopyrightText: 2023-2024 Andrew Gunnerson
// SPDX-License-Identifier: GPL-3.0-only

use std::{
fmt,
Expand Down
6 changes: 2 additions & 4 deletions avbroot/src/cli/avb.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*
* SPDX-FileCopyrightText: 2023-2024 Andrew Gunnerson
* SPDX-License-Identifier: GPL-3.0-only
*/
// SPDX-FileCopyrightText: 2023-2024 Andrew Gunnerson
// SPDX-License-Identifier: GPL-3.0-only

use std::{
collections::{HashMap, HashSet},
Expand Down
6 changes: 2 additions & 4 deletions avbroot/src/cli/boot.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*
* SPDX-FileCopyrightText: 2023 Andrew Gunnerson
* SPDX-License-Identifier: GPL-3.0-only
*/
// SPDX-FileCopyrightText: 2023 Andrew Gunnerson
// SPDX-License-Identifier: GPL-3.0-only

use std::{
fs::{self, File},
Expand Down
6 changes: 2 additions & 4 deletions avbroot/src/cli/completion.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*
* SPDX-FileCopyrightText: 2023 Andrew Gunnerson
* SPDX-License-Identifier: GPL-3.0-only
*/
// SPDX-FileCopyrightText: 2023 Andrew Gunnerson
// SPDX-License-Identifier: GPL-3.0-only

use std::io;

Expand Down
6 changes: 2 additions & 4 deletions avbroot/src/cli/cpio.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*
* SPDX-FileCopyrightText: 2023 Andrew Gunnerson
* SPDX-License-Identifier: GPL-3.0-only
*/
// SPDX-FileCopyrightText: 2023 Andrew Gunnerson
// SPDX-License-Identifier: GPL-3.0-only

use std::{
fs::{self, File},
Expand Down
6 changes: 2 additions & 4 deletions avbroot/src/cli/fec.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*
* SPDX-FileCopyrightText: 2023 Andrew Gunnerson
* SPDX-License-Identifier: GPL-3.0-only
*/
// SPDX-FileCopyrightText: 2023 Andrew Gunnerson
// SPDX-License-Identifier: GPL-3.0-only

use std::{
fs::{File, OpenOptions},
Expand Down
6 changes: 2 additions & 4 deletions avbroot/src/cli/hashtree.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*
* SPDX-FileCopyrightText: 2023 Andrew Gunnerson
* SPDX-License-Identifier: GPL-3.0-only
*/
// SPDX-FileCopyrightText: 2023 Andrew Gunnerson
// SPDX-License-Identifier: GPL-3.0-only

use std::{
fs::{File, OpenOptions},
Expand Down
6 changes: 2 additions & 4 deletions avbroot/src/cli/key.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*
* SPDX-FileCopyrightText: 2023 Andrew Gunnerson
* SPDX-License-Identifier: GPL-3.0-only
*/
// SPDX-FileCopyrightText: 2023 Andrew Gunnerson
// SPDX-License-Identifier: GPL-3.0-only

use std::{
ffi::OsString,
Expand Down
6 changes: 2 additions & 4 deletions avbroot/src/cli/lp.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*
* SPDX-FileCopyrightText: 2024 Andrew Gunnerson
* SPDX-License-Identifier: GPL-3.0-only
*/
// SPDX-FileCopyrightText: 2024 Andrew Gunnerson
// SPDX-License-Identifier: GPL-3.0-only

use std::{
ffi::OsStr,
Expand Down
6 changes: 2 additions & 4 deletions avbroot/src/cli/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*
* SPDX-FileCopyrightText: 2023-2024 Andrew Gunnerson
* SPDX-License-Identifier: GPL-3.0-only
*/
// SPDX-FileCopyrightText: 2023-2024 Andrew Gunnerson
// SPDX-License-Identifier: GPL-3.0-only

pub mod args;
pub mod avb;
Expand Down
6 changes: 2 additions & 4 deletions avbroot/src/cli/ota.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*
* SPDX-FileCopyrightText: 2022-2024 Andrew Gunnerson
* SPDX-License-Identifier: GPL-3.0-only
*/
// SPDX-FileCopyrightText: 2022-2024 Andrew Gunnerson
// SPDX-License-Identifier: GPL-3.0-only

use std::{
borrow::Cow,
Expand Down
6 changes: 2 additions & 4 deletions avbroot/src/cli/payload.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*
* SPDX-FileCopyrightText: 2024 Andrew Gunnerson
* SPDX-License-Identifier: GPL-3.0-only
*/
// SPDX-FileCopyrightText: 2024 Andrew Gunnerson
// SPDX-License-Identifier: GPL-3.0-only

use std::{
collections::HashMap,
Expand Down
6 changes: 2 additions & 4 deletions avbroot/src/cli/sparse.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*
* SPDX-FileCopyrightText: 2024 Andrew Gunnerson
* SPDX-License-Identifier: GPL-3.0-only
*/
// SPDX-FileCopyrightText: 2024 Andrew Gunnerson
// SPDX-License-Identifier: GPL-3.0-only

use std::{
fmt,
Expand Down
6 changes: 2 additions & 4 deletions avbroot/src/crypto.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*
* SPDX-FileCopyrightText: 2023-2024 Andrew Gunnerson
* SPDX-License-Identifier: GPL-3.0-only
*/
// SPDX-FileCopyrightText: 2023-2024 Andrew Gunnerson
// SPDX-License-Identifier: GPL-3.0-only

use std::{
env::{self, VarError},
Expand Down
6 changes: 2 additions & 4 deletions avbroot/src/escape.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*
* SPDX-FileCopyrightText: 2023 Andrew Gunnerson
* SPDX-License-Identifier: GPL-3.0-only
*/
// SPDX-FileCopyrightText: 2023 Andrew Gunnerson
// SPDX-License-Identifier: GPL-3.0-only

use std::{fmt, marker::PhantomData};

Expand Down
6 changes: 2 additions & 4 deletions avbroot/src/format/avb.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*
* SPDX-FileCopyrightText: 2023-2024 Andrew Gunnerson
* SPDX-License-Identifier: GPL-3.0-only
*/
// SPDX-FileCopyrightText: 2023-2024 Andrew Gunnerson
// SPDX-License-Identifier: GPL-3.0-only

use std::{
fmt,
Expand Down
6 changes: 2 additions & 4 deletions avbroot/src/format/bootimage.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*
* SPDX-FileCopyrightText: 2023-2024 Andrew Gunnerson
* SPDX-License-Identifier: GPL-3.0-only
*/
// SPDX-FileCopyrightText: 2023-2024 Andrew Gunnerson
// SPDX-License-Identifier: GPL-3.0-only

use std::{
fmt,
Expand Down
6 changes: 2 additions & 4 deletions avbroot/src/format/compression.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*
* SPDX-FileCopyrightText: 2023 Andrew Gunnerson
* SPDX-License-Identifier: GPL-3.0-only
*/
// SPDX-FileCopyrightText: 2023 Andrew Gunnerson
// SPDX-License-Identifier: GPL-3.0-only

use std::io::{self, Read, Seek, Write};

Expand Down
6 changes: 2 additions & 4 deletions avbroot/src/format/cpio.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*
* SPDX-FileCopyrightText: 2023 Andrew Gunnerson
* SPDX-License-Identifier: GPL-3.0-only
*/
// SPDX-FileCopyrightText: 2023 Andrew Gunnerson
// SPDX-License-Identifier: GPL-3.0-only

use std::{
collections::{HashMap, HashSet},
Expand Down
6 changes: 2 additions & 4 deletions avbroot/src/format/fec.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*
* SPDX-FileCopyrightText: 2023 Andrew Gunnerson
* SPDX-License-Identifier: GPL-3.0-only
*/
// SPDX-FileCopyrightText: 2023 Andrew Gunnerson
// SPDX-License-Identifier: GPL-3.0-only

use std::{
collections::HashSet,
Expand Down
6 changes: 2 additions & 4 deletions avbroot/src/format/hashtree.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*
* SPDX-FileCopyrightText: 2023 Andrew Gunnerson
* SPDX-License-Identifier: GPL-3.0-only
*/
// SPDX-FileCopyrightText: 2023 Andrew Gunnerson
// SPDX-License-Identifier: GPL-3.0-only

use std::{
fmt,
Expand Down
6 changes: 2 additions & 4 deletions avbroot/src/format/lp.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*
* SPDX-FileCopyrightText: 2024 Andrew Gunnerson
* SPDX-License-Identifier: GPL-3.0-only
*/
// SPDX-FileCopyrightText: 2024 Andrew Gunnerson
// SPDX-License-Identifier: GPL-3.0-only

use std::{
cmp::Ordering,
Expand Down
6 changes: 2 additions & 4 deletions avbroot/src/format/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*
* SPDX-FileCopyrightText: 2023 Andrew Gunnerson
* SPDX-License-Identifier: GPL-3.0-only
*/
// SPDX-FileCopyrightText: 2023 Andrew Gunnerson
// SPDX-License-Identifier: GPL-3.0-only

pub mod avb;
pub mod bootimage;
Expand Down
6 changes: 2 additions & 4 deletions avbroot/src/format/ota.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*
* SPDX-FileCopyrightText: 2022-2024 Andrew Gunnerson
* SPDX-License-Identifier: GPL-3.0-only
*/
// SPDX-FileCopyrightText: 2022-2024 Andrew Gunnerson
// SPDX-License-Identifier: GPL-3.0-only

use std::{
collections::BTreeMap,
Expand Down
6 changes: 2 additions & 4 deletions avbroot/src/format/padding.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*
* SPDX-FileCopyrightText: 2023 Andrew Gunnerson
* SPDX-License-Identifier: GPL-3.0-only
*/
// SPDX-FileCopyrightText: 2023 Andrew Gunnerson
// SPDX-License-Identifier: GPL-3.0-only

use std::io::{self, Read, Seek, Write};

Expand Down
6 changes: 2 additions & 4 deletions avbroot/src/format/payload.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*
* SPDX-FileCopyrightText: 2022-2024 Andrew Gunnerson
* SPDX-License-Identifier: GPL-3.0-only
*/
// SPDX-FileCopyrightText: 2022-2024 Andrew Gunnerson
// SPDX-License-Identifier: GPL-3.0-only

use std::{
collections::{HashMap, HashSet},
Expand Down
6 changes: 2 additions & 4 deletions avbroot/src/format/sparse.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*
* SPDX-FileCopyrightText: 2024 Andrew Gunnerson
* SPDX-License-Identifier: GPL-3.0-only
*/
// SPDX-FileCopyrightText: 2024 Andrew Gunnerson
// SPDX-License-Identifier: GPL-3.0-only

use std::{
fmt,
Expand Down
6 changes: 2 additions & 4 deletions avbroot/src/format/verityrs.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*
* SPDX-FileCopyrightText: 2023 Andrew Gunnerson
* SPDX-License-Identifier: GPL-3.0-only
*/
// SPDX-FileCopyrightText: 2023 Andrew Gunnerson
// SPDX-License-Identifier: GPL-3.0-only

// The gf256 library uses compile-time proc macro code generation. Since
// dm-verity supports RS(255, 231) through RS(255, 253), we'll generate RS
Expand Down
6 changes: 2 additions & 4 deletions avbroot/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*
* SPDX-FileCopyrightText: 2023 Andrew Gunnerson
* SPDX-License-Identifier: GPL-3.0-only
*/
// SPDX-FileCopyrightText: 2023 Andrew Gunnerson
// SPDX-License-Identifier: GPL-3.0-only

//! Since avbroot is primarily an application and not a library, the semver
//! versioning covers the CLI only. All Rust APIs can change at any time, even
Expand Down
6 changes: 2 additions & 4 deletions avbroot/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*
* SPDX-FileCopyrightText: 2023 Andrew Gunnerson
* SPDX-License-Identifier: GPL-3.0-only
*/
// SPDX-FileCopyrightText: 2023 Andrew Gunnerson
// SPDX-License-Identifier: GPL-3.0-only

use std::{
process::ExitCode,
Expand Down
6 changes: 2 additions & 4 deletions avbroot/src/octal.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*
* SPDX-FileCopyrightText: 2023 Andrew Gunnerson
* SPDX-License-Identifier: GPL-3.0-only
*/
// SPDX-FileCopyrightText: 2023 Andrew Gunnerson
// SPDX-License-Identifier: GPL-3.0-only

//! Hack to format an integer as an octal string because toml_edit can't output
//! octal-formatted integers and many other toml parsers can't parse it either.
Expand Down
6 changes: 2 additions & 4 deletions avbroot/src/patch/boot.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*
* SPDX-FileCopyrightText: 2022-2024 Andrew Gunnerson
* SPDX-License-Identifier: GPL-3.0-only
*/
// SPDX-FileCopyrightText: 2022-2024 Andrew Gunnerson
// SPDX-License-Identifier: GPL-3.0-only

use std::{
cmp::Ordering,
Expand Down
6 changes: 2 additions & 4 deletions avbroot/src/patch/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*
* SPDX-FileCopyrightText: 2023 Andrew Gunnerson
* SPDX-License-Identifier: GPL-3.0-only
*/
// SPDX-FileCopyrightText: 2023 Andrew Gunnerson
// SPDX-License-Identifier: GPL-3.0-only

pub mod boot;
pub mod otacert;
Expand Down
6 changes: 2 additions & 4 deletions avbroot/src/patch/otacert.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*
* SPDX-FileCopyrightText: 2023 Andrew Gunnerson
* SPDX-License-Identifier: GPL-3.0-only
*/
// SPDX-FileCopyrightText: 2023 Andrew Gunnerson
// SPDX-License-Identifier: GPL-3.0-only

use std::{borrow::Cow, cmp::Ordering, io::Cursor};

Expand Down
6 changes: 2 additions & 4 deletions avbroot/src/patch/system.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*
* SPDX-FileCopyrightText: 2023-2024 Andrew Gunnerson
* SPDX-License-Identifier: GPL-3.0-only
*/
// SPDX-FileCopyrightText: 2023-2024 Andrew Gunnerson
// SPDX-License-Identifier: GPL-3.0-only

use std::{
io::{self, Cursor, SeekFrom},
Expand Down
6 changes: 2 additions & 4 deletions avbroot/src/stream.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*
* SPDX-FileCopyrightText: 2023 Andrew Gunnerson
* SPDX-License-Identifier: GPL-3.0-only
*/
// SPDX-FileCopyrightText: 2023 Andrew Gunnerson
// SPDX-License-Identifier: GPL-3.0-only

use std::{
fs::File,
Expand Down
6 changes: 2 additions & 4 deletions avbroot/src/util.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*
* SPDX-FileCopyrightText: 2023 Andrew Gunnerson
* SPDX-License-Identifier: GPL-3.0-only
*/
// SPDX-FileCopyrightText: 2023 Andrew Gunnerson
// SPDX-License-Identifier: GPL-3.0-only

use std::{cmp::Ordering, fmt, ops::Range, path::Path};

Expand Down
6 changes: 2 additions & 4 deletions avbroot/tests/avb.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*
* SPDX-FileCopyrightText: 2023-2024 Andrew Gunnerson
* SPDX-License-Identifier: GPL-3.0-only
*/
// SPDX-FileCopyrightText: 2023-2024 Andrew Gunnerson
// SPDX-License-Identifier: GPL-3.0-only

use std::{
io::{Cursor, Read, Seek, Write},
Expand Down
6 changes: 2 additions & 4 deletions avbroot/tests/bootimage.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*
* SPDX-FileCopyrightText: 2023-2024 Andrew Gunnerson
* SPDX-License-Identifier: GPL-3.0-only
*/
// SPDX-FileCopyrightText: 2023-2024 Andrew Gunnerson
// SPDX-License-Identifier: GPL-3.0-only

use std::io::Cursor;

Expand Down
Loading

0 comments on commit c974ab5

Please sign in to comment.