diff --git a/cli/src/main.rs b/cli/src/main.rs index b1d9029e..12f12436 100644 --- a/cli/src/main.rs +++ b/cli/src/main.rs @@ -25,15 +25,18 @@ Fakehub server and storage. use clap::Parser; use log::{error, info}; +/// System calls. +pub mod sys; + use fakehub_server::Server; use crate::args::{Args, Command}; -use fakehub_server::sys::instance_os::instance_os; -use fakehub_server::sys::kill_unix::kill_unix; #[cfg(target_os = "windows")] use std::os::windows::process::CommandExt; -use fakehub_server::sys::current_port::current_port; +use fakehub_server::sys::instance_os::instance_os; use fakehub_server::sys::sys_info::sys_info; +use crate::sys::current_port::current_port; +use crate::sys::kill_unix::kill_unix; mod args; diff --git a/server/src/sys/current_port.rs b/cli/src/sys/current_port.rs similarity index 100% rename from server/src/sys/current_port.rs rename to cli/src/sys/current_port.rs diff --git a/server/src/sys/kill_unix.rs b/cli/src/sys/kill_unix.rs similarity index 100% rename from server/src/sys/kill_unix.rs rename to cli/src/sys/kill_unix.rs diff --git a/cli/src/sys/mod.rs b/cli/src/sys/mod.rs new file mode 100644 index 00000000..28ca0aa3 --- /dev/null +++ b/cli/src/sys/mod.rs @@ -0,0 +1,25 @@ +// The MIT License (MIT) +// +// Copyright (c) 2024 Aliaksei Bialiauski +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. +/// Kill UNIX port. +pub mod kill_unix; +/// Current fakehub port. +pub mod current_port; diff --git a/server/src/lib.rs b/server/src/lib.rs index 484f4e23..247cf405 100644 --- a/server/src/lib.rs +++ b/server/src/lib.rs @@ -42,7 +42,7 @@ pub mod handlers; pub mod objects; /// Reports. pub mod report; -/// System. +/// System information. pub mod sys; #[allow(unused_imports)] #[macro_use] diff --git a/server/src/sys/mod.rs b/server/src/sys/mod.rs index 414b1c4c..5a2a631d 100644 --- a/server/src/sys/mod.rs +++ b/server/src/sys/mod.rs @@ -21,9 +21,5 @@ // SOFTWARE. /// Instance OS. pub mod instance_os; -/// Kill UNIX port. -pub mod kill_unix; /// System information. pub mod sys_info; -/// Current fakehub port. -pub mod current_port;