-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Wire up viona params from illumos#16738
- Loading branch information
Showing
16 changed files
with
807 additions
and
6 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[package] | ||
name = "nvpair" | ||
version = "0.0.0" | ||
license = "MPL-2.0" | ||
edition = "2021" | ||
|
||
[lib] | ||
doctest = false | ||
|
||
[dependencies] | ||
nvpair_sys.workspace = true | ||
libc.workspace = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
[package] | ||
name = "nvpair-hdrchk" | ||
version = "0.0.0" | ||
license = "MPL-2.0" | ||
edition = "2021" | ||
build = "build.rs" | ||
publish = false | ||
|
||
[dependencies] | ||
nvpair_sys = { path = "../sys" } | ||
libc = "0.2" | ||
|
||
[build-dependencies] | ||
cc = "1" | ||
ctest2 = "0.4.7" | ||
|
||
[[test]] | ||
name = "main" | ||
path = "test/main.rs" | ||
harness = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// 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)] | ||
|
||
fn main() { | ||
let mut cfg = ctest2::TestGenerator::new(); | ||
|
||
cfg.header("libnvpair.h"); | ||
|
||
cfg.type_name(|ty, is_struct, is_union| match ty { | ||
t if t.ends_with("_t") => t.to_string(), | ||
t if is_struct => format!("struct {t}"), | ||
t if is_union => format!("union {t}"), | ||
t => t.to_string(), | ||
}); | ||
|
||
cfg.skip_const(move |name| match name { | ||
_ => false, | ||
}); | ||
|
||
cfg.skip_struct(|name| match name { | ||
_ => false, | ||
}); | ||
|
||
cfg.skip_field_type(|ty, field| match (ty, field) { | ||
_ => false, | ||
}); | ||
|
||
cfg.generate("../sys/src/lib.rs", "main.rs"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +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 nvpair_sys::*; | ||
|
||
include!(concat!(env!("OUT_DIR"), "/main.rs")); |
Oops, something went wrong.