Skip to content
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

Task02: Implement hardware detector script #158

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

SlavaGolubnichiy
Copy link

Hardware detector script implemented.

The script detects the 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

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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
@alexposukhov
Copy link
Contributor

This pull request should base on commit db09a10
Target branch SHOULD NOT be main. You should merge your change to your branch.
You should create new branch for every new task.

@alexposukhov alexposukhov added Change requested change requested and removed Ready for review labels Jan 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Change requested change requested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants