Description
In this assignment, you are required to write a system program
faked_uname.c in language C that partly
implements the functionalities of system program uname through using
the system call uname(). The program
should compile correctly on pyrite.cs.iastate.edu.
Requirements: Supposed “faked_uname.c” is compiled to get executable
file “faked_uname”. The functionalities of
faked_uname should be as follows:
(1) Comand
$ faked_uname –machine
prints out the machine hardware name.
(2) Command
$ faked_uname –operating-system
prints out the oprating system name.
(3) Command
$ faked_uname –kernel-release
prints out the kernel release of the operating system.
Hints: Before writing the program, you are suggested to do the
following preparations.
(i) run
$ uname –help
to know the functionalities of system program uname.
(ii) run
$ man 2 uname
to know how to use system call uname.
Page 1