Skip to content

Commit 19711cd

Browse files
committed
Update libkflow to 2.6.0
Updating to a new version of libkflow that is using a newer version of go lang.
1 parent 4f1200f commit 19711cd

5 files changed

Lines changed: 26 additions & 19 deletions

File tree

libs/aarch64/linux/musl/libkflow.a

4.88 MB
Binary file not shown.

libs/arm/linux/musl/libkflow.a

3.66 MB
Binary file not shown.

libs/x86_64/linux/musl/libkflow.a

4.42 MB
Binary file not shown.

src/bin/kprobe.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;
2222
fn main() -> Result<()> {
2323
let args = arguments()?;
2424

25+
2526
let (email, token, proxy) = args.http_config()?;
2627
let device = args.capture.device()?;
2728
let interface = args.capture.interface()?;

src/version.rs

Lines changed: 25 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,51 @@
1+
use crate::libkflow;
2+
13
#[derive(Clone, Debug)]
24
pub struct Version {
3-
pub name: String,
5+
pub name: String,
46
pub version: String,
5-
pub arch: String,
6-
pub system: String,
7-
pub commit: String,
8-
pub detail: String,
7+
pub arch: String,
8+
pub system: String,
9+
pub commit: String,
10+
pub detail: String,
911
}
1012

1113
impl Version {
1214
pub fn new() -> Self {
1315
let version = version();
14-
let commit = commit();
15-
let detail = format!("{} ({})", version, commit);
16+
let commit = commit();
17+
let detail = format!("{} ({})", version, commit);
1618
Self {
17-
name: env!("CARGO_PKG_NAME").to_owned(),
19+
name: env!("CARGO_PKG_NAME").to_owned(),
1820
version: version,
19-
arch: arch(),
20-
system: system(),
21-
commit: commit,
22-
detail: detail,
21+
arch: arch(),
22+
system: system(),
23+
commit: commit,
24+
detail: detail,
2325
}
24-
2526
}
2627
}
2728

2829
fn version() -> String {
29-
match option_env!("BUILD_VERSION") {
30-
Some(version) => version,
31-
None => env!("CARGO_PKG_VERSION"),
32-
}.to_owned()
30+
let kprobe_version = option_env!("BUILD_VERSION")
31+
.unwrap_or_else(|| env!("CARGO_PKG_VERSION"))
32+
.to_owned();
33+
let libkflow_version = libkflow::version();
34+
format!("{} (libkflow {})", kprobe_version, libkflow_version)
3335
}
3436

3537
fn commit() -> String {
36-
option_env!("BUILD_COMMIT").unwrap_or("<unknown>").to_owned()
38+
option_env!("BUILD_COMMIT")
39+
.unwrap_or("<unknown>")
40+
.to_owned()
3741
}
3842

3943
fn arch() -> String {
4044
option_env!("BUILD_ARCH").unwrap_or("<unknown>").to_owned()
4145
}
4246

4347
fn system() -> String {
44-
option_env!("BUILD_SYSTEM").unwrap_or("<unknown>").to_owned()
48+
option_env!("BUILD_SYSTEM")
49+
.unwrap_or("<unknown>")
50+
.to_owned()
4551
}

0 commit comments

Comments
 (0)