diff options
Diffstat (limited to '')
-rw-r--r-- | utils/libsimple/CMakeLists.txt | 9 | ||||
-rw-r--r-- | utils/libsimple/README.md (renamed from utils/libtest/README.md) | 10 | ||||
-rw-r--r-- | utils/libsimple/include/libsimple/all.hpp (renamed from utils/libtest/include/libtest/all.hpp) | 0 | ||||
-rw-r--r-- | utils/libsimple/include/libsimple/device.hpp (renamed from utils/libtest/include/libtest/device.hpp) | 2 | ||||
-rw-r--r-- | utils/libsimple/src/device.cpp (renamed from utils/libtest/src/device.cpp) | 6 | ||||
-rw-r--r-- | utils/libsimple/utils/CMakeLists.txt (renamed from utils/libtest/utils/CMakeLists.txt) | 2 | ||||
-rw-r--r-- | utils/libsimple/utils/exchange_ints.cpp (renamed from utils/libtest/utils/exchange_ints.cpp) | 4 |
7 files changed, 21 insertions, 12 deletions
diff --git a/utils/libsimple/CMakeLists.txt b/utils/libsimple/CMakeLists.txt new file mode 100644 index 0000000..ff61bd7 --- /dev/null +++ b/utils/libsimple/CMakeLists.txt @@ -0,0 +1,9 @@ +file(GLOB_RECURSE libsimple_headers "include/*.hpp") +file(GLOB libsimple_sources "src/*.cpp") +add_library(libsimple + ${libsimple_sources} + ${libsimple_headers}) +target_link_libraries(libsimple libservice) +target_include_directories(libsimple PUBLIC include/) + +add_subdirectory(utils) diff --git a/utils/libtest/README.md b/utils/libsimple/README.md index 0257c71..1d9896a 100644 --- a/utils/libtest/README.md +++ b/utils/libsimple/README.md @@ -1,9 +1,9 @@ -test driver utilities -===================== +simple driver utilities +======================= -[test] driver usage examples. +[simple] driver usage examples. -[test]: ../../src/test +[simple]: ../../src/simple Usage ----- @@ -15,7 +15,7 @@ Usage: exchange_ints.exe N ``` Parses its argument as an `unsigned int` and exchanges it with the one stored -in [test] driver's memory. +in [simple] driver's memory. For example: ``` diff --git a/utils/libtest/include/libtest/all.hpp b/utils/libsimple/include/libsimple/all.hpp index 474b802..474b802 100644 --- a/utils/libtest/include/libtest/all.hpp +++ b/utils/libsimple/include/libsimple/all.hpp diff --git a/utils/libtest/include/libtest/device.hpp b/utils/libsimple/include/libsimple/device.hpp index 591d215..3318818 100644 --- a/utils/libtest/include/libtest/device.hpp +++ b/utils/libsimple/include/libsimple/device.hpp @@ -7,7 +7,7 @@ #include "libservice/all.hpp" -namespace libtest +namespace libsimple { class Device : libservice::Device { diff --git a/utils/libtest/src/device.cpp b/utils/libsimple/src/device.cpp index f06a22a..57e6963 100644 --- a/utils/libtest/src/device.cpp +++ b/utils/libsimple/src/device.cpp @@ -3,17 +3,17 @@ // For details, see https://github.com/egor-tensin/windows7-drivers. // Distributed under the MIT License. -#include "libtest/all.hpp" +#include "libsimple/all.hpp" #include "libservice/all.hpp" #include <Windows.h> -namespace libtest +namespace libsimple { namespace { - const char* const device_path = "\\\\.\\test_device1"; + const char* const device_path = "\\\\.\\simple_device1"; const auto exchange_ints_ctl_code = CTL_CODE(0x8001, 0x800, METHOD_BUFFERED, FILE_ANY_ACCESS); } diff --git a/utils/libtest/utils/CMakeLists.txt b/utils/libsimple/utils/CMakeLists.txt index 9b22ab2..8824e3e 100644 --- a/utils/libtest/utils/CMakeLists.txt +++ b/utils/libsimple/utils/CMakeLists.txt @@ -1,2 +1,2 @@ add_executable(exchange_ints exchange_ints.cpp) -target_link_libraries(exchange_ints libtest) +target_link_libraries(exchange_ints libsimple) diff --git a/utils/libtest/utils/exchange_ints.cpp b/utils/libsimple/utils/exchange_ints.cpp index f70badf..2935b2f 100644 --- a/utils/libtest/utils/exchange_ints.cpp +++ b/utils/libsimple/utils/exchange_ints.cpp @@ -3,7 +3,7 @@ // For details, see https://github.com/egor-tensin/windows7-drivers. // Distributed under the MIT License. -#include "libtest/all.hpp" +#include "libsimple/all.hpp" #include <exception> #include <iostream> @@ -32,7 +32,7 @@ int main(int argc, char* argv[]) return 1; } - std::cout << libtest::Device().exchange_ints(src) << "\n"; + std::cout << libsimple::Device().exchange_ints(src) << "\n"; } catch (const std::exception& e) { |