HALLELUJAH attempt to put flags for freebsd and openbsd
This commit is contained in:
1 parent
96c6a63b07
commit
ae6b6842a4
3 files changed
+6
-5
No files matched your search
Generated
+1
-1
@@ -1919,7 +1919,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "rs_machine_input_chirho"
|
||||
version = "0.1.1"
|
||||
version = "0.1.2"
|
||||
dependencies = [
|
||||
"chrono",
|
||||
"clap",
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
# For God so loved the world, that He gave His only begotten Son, that all who believe in Him should not perish but have everlasting life
|
||||
[package]
|
||||
name = "rs_machine_input_chirho"
|
||||
version = "0.1.1"
|
||||
version = "0.1.2"
|
||||
edition = "2021"
|
||||
authors = ["Love Jesus <[email protected]>"]
|
||||
description = "A command-line tool to synchronize computer resource information with a remote database"
|
||||
@@ -32,7 +32,7 @@ features = ["sqlx_sqlite"]
|
||||
[default.databases.sqlite_database_chirho]
|
||||
url = "sqlite:db_chirho.sqlite"
|
||||
|
||||
[target.'cfg(target_os = "linux")'.dependencies]
|
||||
[target.'cfg(any(target_os = "linux", target_os = "freebsd", target_os = "openbsd"))'.dependencies]
|
||||
sys-info = "0.9"
|
||||
|
||||
[target.'cfg(any(target_os = "windows", target_os = "macos"))'.dependencies]
|
||||
|
||||
@@ -53,7 +53,7 @@ fn collect_system_info_chirho() -> Result<SystemInfoChirho, Box<dyn Error>> {
|
||||
let hostname_chirho = hostname::get()?.into_string().unwrap();
|
||||
let os_chirho = std::env::consts::OS.to_string();
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
#[cfg(any(target_os = "linux", target_os = "freebsd", target_os = "openbsd"))]
|
||||
let (ram_mb_chirho, cpu_cores_chirho, storage_gb_chirho) = collect_linux_info_chirho()?;
|
||||
|
||||
#[cfg(target_os = "windows")]
|
||||
@@ -74,7 +74,8 @@ fn collect_system_info_chirho() -> Result<SystemInfoChirho, Box<dyn Error>> {
|
||||
})
|
||||
}
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
// target linux, freebsd or openbsd
|
||||
#[cfg(any(target_os = "linux", target_os = "freebsd", target_os = "openbsd"))]
|
||||
fn collect_linux_info_chirho() -> Result<(u64, u64, u64), Box<dyn Error>> {
|
||||
use sys_info::{mem_info, cpu_num, disk_info};
|
||||
|
||||
|
||||
Reference in new issue
Block a user