-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TASK07: Update kenel module with procfs API #135
Open
istepanenko
wants to merge
14
commits into
Kernel-GL-HRK:Ivan.Stepanenko
Choose a base branch
from
istepanenko:07_procfs_task
base: Ivan.Stepanenko
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
TASK07: Update kenel module with procfs API #135
istepanenko
wants to merge
14
commits into
Kernel-GL-HRK:Ivan.Stepanenko
from
istepanenko:07_procfs_task
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The game logic is defined in "rock_paper_scissors" module. Additional task printing md5 checksum of computer's choice before human's move is added. $ make clean all && ./rock-paper-scissors /bin/rm -rf *.o a.out rock-paper-scissors gcc -c rock_paper_scissors.c -I. gcc -c main.c -I. gcc rock_paper_scissors.o main.o -o rock-paper-scissors -I. -lcrypto Random choice: s md5: 03c7c0ace395d80182db07ae2c30f034 Please choose: rock (r) - paper (p) - scissors (s) r You choose rock, I choose scissors You win: rock beats scissors Signed-off-by: Ivan Stepanenko <[email protected]>
It uses optional script arugment to define polling folder with default value "/dev". The script is polling that folder and uses "diff" utility to detect changes in the output. Here is the script run with current target folder and new 1, 2 files playing role of new devices. $ ./hwdetect.sh . Polling folder: . > ./1 2021-11-21 22:25:33.907655100 +0200 > ./2 2021-11-21 22:25:40.335717754 +0200 Signed-off-by: Ivan Stepanenko <[email protected]>
…r_scissors_solution TASK1: Add rock-paper-scissors game
…detector_solution TASK02 Add hot plugged hardware detector script
Add description for module task Signed-off-by: Serhii Perederii <[email protected]>
Add home task for lection Basic Data structures Signed-off-by: Oleksandr Posukhov <[email protected]>
On read from the “list” attr. it shows content of the linked list. On write to the “list” attr. it adds new string to the linked list. Since the list items separator is not specified - content is shown as it was inserted including line endings. This gives flexibility of using "echo" with "-n" argument and without. Signed-off-by: Ivan Stepanenko <[email protected]>
The module accepts two integer parameters n1 and n2 and provides: - A sum of parameters upon the module load - A substration of parameters upon the module unload Signed-off-by: Ivan Stepanenko <[email protected]>
Add descriptions of tasks for lesson 5. Signed-off-by: Yevgen Kovalyov <[email protected]>
First read of the "last_abs_time" attribute returns -1 next reads return epoch time of the previous read cat /sys/kernel/time_attr_presenter/last_abs_time -1 cat /sys/kernel/time_attr_presenter/last_abs_time 1639337982.183260522 First read of the "last_relative_time" attribute returns -1 next reads return time passed since previous read cat /sys/kernel/time_attr_presenter/last_relative_time -1 cat /sys/kernel/time_attr_presenter/last_relative_time 0.636000000 Signed-off-by: Ivan Stepanenko <[email protected]>
Useed clock_gettime() from time.h and different clock ids. Provided dump files with results. Signed-off-by: Ivan Stepanenko <[email protected]>
Add task for implementation of procFS API Signed-off-by: Oleksandr Posukhov <[email protected]>
Existing "wimbledone" module already has sysfs interface "/sys/kernel/wimbledon/list". By reading and wrinting this file "show" and "store" callbacks are called and counted. With this update the module creates a folder "wimbeldon" and child files: * "/proc/wimbeldon/nshow" Returns amount of show callbacks (cat /sys/kernel/wimbledon/list) * "/proc/wimbeldon/nstore" Returns amount of store callbacks (echo >> /sys/kernel/wimbledon/list) * "/proc/wimbeldon/auth_name" Returns module author name Output from the orange board is attached. Signed-off-by: Ivan Stepanenko <[email protected]>
488587a
to
1992b33
Compare
Please rebase this task to main branch |
Please fix all checkpatch isuues |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Existing "wimbledone" module already has sysfs interface
"/sys/kernel/wimbledon/list". By reading and wrinting this
file "show" and "store" callbacks are called and counted.
With this update the module creates a folder "wimbeldon" and
child files:
"/proc/wimbeldon/nshow"
Returns amount of show callbacks (cat /sys/kernel/wimbledon/list)
"/proc/wimbeldon/nstore"
Returns amount of store callbacks (echo >> /sys/kernel/wimbledon/list)
"/proc/wimbeldon/auth_name"
Returns module author name
Output from the orange board is attached.
Signed-off-by: Ivan Stepanenko [email protected]