Skip to content

Task02: Implement hardware detector script#160

Open
SlavaGolubnichiy wants to merge 3 commits intoKernel-GL-HRK:mainfrom
SlavaGolubnichiy:task02
Open

Task02: Implement hardware detector script#160
SlavaGolubnichiy wants to merge 3 commits intoKernel-GL-HRK:mainfrom
SlavaGolubnichiy:task02

Conversation

@SlavaGolubnichiy
Copy link

New branch for the task02 created;
Commit c8d01c2 is now on the task02 branch.

Added file RockPaperScissors.c with implemented functions:
	- randomize() which returns 32-bit pseudo-random number;
	- get_rps_id() which returns rps-object's id by it's symbol;
	- get_rps_symbol() which returns rps-object's symbol by it's id;
	- get_rps_string() which return rps-object's name by it's id;
	- rps_does_first_win() which implements rps-games rules;
	- main() which is program entry-point, contains program logic;

Signed-off-by: SlavaGolubnichiy <vyacheslav.golubnichiy@gmail.com>
Added file named Makefile, used to build an executable with gcc.
Scenarios, implemented in Makefile:
	- program (builds object-files and an executable);
	- RockPaperScissors.o (builds RockPaperScissors.o object file);
	- clean (removes object files and an executable);

Signed-off-by: SlavaGolubnichiy <vyacheslav.golubnichiy@gmail.com>
Script detects following plugged hardware:
- mounted devices using /dev/sd
	. location and type parameters
- USB-devices
	. id, name
- block devices
	. name, size, type, mountpoint
- SCSI
	. name, hctl, type, vendor, model, rev, tran
- bus devices
	. bus, device, class description
- PCI
	. id, type, name, rev
- I2C
	. bus, number of busses, their i2c devices

Signed-off-by: SlavaGolubnichiy <vyacheslav.golubnichiy@gmail.com>
@alexposukhov alexposukhov added the invalid This doesn't seem right label Jan 27, 2022
@alexposukhov
Copy link
Contributor

Target branch should NOT be Kernel-GL-HRK:main
Please change target branch to Kernel-GL-HRK:ViacheslavHolubnychyi

@alexposukhov
Copy link
Contributor

Rebase this commit to following commit db09a10

@alexposukhov alexposukhov added the Change requested change requested label Jan 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Change requested change requested invalid This doesn't seem right

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants