diff options
Diffstat (limited to 'utils')
-rw-r--r-- | utils/CMakeLists.txt | 3 | ||||
-rw-r--r-- | utils/README.md | 6 | ||||
-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 | ||||
-rw-r--r-- | utils/libtest/CMakeLists.txt | 9 |
10 files changed, 26 insertions, 25 deletions
diff --git a/utils/CMakeLists.txt b/utils/CMakeLists.txt index 716c661..31c8511 100644 --- a/utils/CMakeLists.txt +++ b/utils/CMakeLists.txt @@ -1,5 +1,6 @@ project(windows7_drivers_utils) add_subdirectory(libservice) + add_subdirectory(libnt_path_converter) -add_subdirectory(libtest) +add_subdirectory(libsimple) diff --git a/utils/README.md b/utils/README.md index 5d03428..1579471 100644 --- a/utils/README.md +++ b/utils/README.md @@ -4,12 +4,12 @@ Driver utilities A couple of usage examples are included along with the drivers. * [libservice]: Utilities to load/unload the drivers. -* [libtest]: [test] driver usage examples. +* [libsimple]: [simple] driver usage examples. * [libnt_path_converter]: [nt_path_converter] driver usage examples. [libservice]: libservice/README.md -[libtest]: libtest/README.md -[test]: ../src/test +[libsimple]: libsimple/README.md +[simple]: ../src/simple [libnt_path_converter]: libnt_path_converter/README.md [nt_path_converter]: ../src/nt_path_converter 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) { diff --git a/utils/libtest/CMakeLists.txt b/utils/libtest/CMakeLists.txt deleted file mode 100644 index 8c64ba1..0000000 --- a/utils/libtest/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -file(GLOB_RECURSE libtest_headers "include/*.hpp") -file(GLOB libtest_sources "src/*.cpp") -add_library(libtest - ${libtest_sources} - ${libtest_headers}) -target_link_libraries(libtest libservice) -target_include_directories(libtest PUBLIC include/) - -add_subdirectory(utils) |