diff --git a/.gitignore b/.gitignore index 697edcb..b4508a3 100644 --- a/.gitignore +++ b/.gitignore @@ -23,7 +23,7 @@ # *.pdf ## Generated if empty string is given at "Please type another file name for output:" -.pdf +*.pdf ## Bibliography auxiliary files (bibtex/biblatex/biber): *.bbl diff --git a/LaTeX/Homework_Lesson_8.tex b/LaTeX/Homework_Lesson_8.tex new file mode 100644 index 0000000..a540d0c --- /dev/null +++ b/LaTeX/Homework_Lesson_8.tex @@ -0,0 +1,103 @@ +\documentclass[a4paper, 12pt, english]{article} + +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +\usepackage{listings} +\usepackage{xcolor} +\usepackage{hyperref} +\usepackage{multicol} +\usepackage{setspace} +\usepackage{graphicx} + + +\title{Advanced Operating Systems\\Assignment Week 8} +\author{Paul Lödige \\ Student ID: 37-229753} + +\makeatletter +\newcommand*{\toccontents}{\@starttoc{toc}} +\makeatother + +\begin{document} +\maketitle +\toccontents + +\section{Assignment}% +\label{sec:Assignment} +Create a virtual keyboard using the kernel module, +which simulates a key press on a virtual input device /dev/vinput0. +Echo some keycode to the virtual input device and get the key message on the standard output. +Compile and run the program. +Submit the source code and the screen shots of the standard output and the kernel log message, +respectively, when the keycode is echoed to the virtual input device. +\clearpage + +\section{Code}% +\label{sec:Code} + +\definecolor{mGreen}{rgb}{0,0.6,0} +\definecolor{mGray}{rgb}{0.5,0.5,0.5} +\definecolor{mPurple}{rgb}{0.58,0,0.82} +\definecolor{backgroundColour}{rgb}{0.95,0.95,0.92} +\lstset{ + language=C, + backgroundcolor=\color{backgroundColour}, + commentstyle=\color{mGreen}, + keywordstyle=\color{magenta}, + numberstyle=\tiny\color{mGray}, + stringstyle=\color{mPurple}, + basicstyle=\ttfamily\scriptsize, + breakatwhitespace=false, + breaklines=true, + captionpos=b, + keepspaces=true, + numbers=left, + firstnumber=0, + stepnumber=1, + numbersep=5pt, + showspaces=false, + showstringspaces=false, + showtabs=false, + tabsize=2, + literate={~}{{$\mathtt{\sim}$}}1 +} +\lstset{literate=% + {Ö}{{\"O}}1 + {Ä}{{\"A}}1 + {Ü}{{\"U}}1 + {ß}{{\ss}}2 + {ü}{{\"u}}1 + {ä}{{\"a}}1 + {ö}{{\"o}}1 +} + +\subsection{\texttt{vinput.c}}% +\label{sub:vinput_c} +\lstinputlisting{../Code/vinput.c} +\clearpage + +\subsection{\texttt{vinput.h}}% +\label{sub:vinput_h} +\lstinputlisting{../Code/vinput.h} +\clearpage + +\subsection{\texttt{vkbd.c}}% +\label{sub:vkbd} +\lstinputlisting{../Code/vkbd.c} +\clearpage + +\section{Output}% +\label{sec:Output} + +\subsection{Shell Script for compiling and running}% +\label{sub:Shell Script for compiling and running} +\includegraphics[width=\textwidth]{run_sh.png} + +\subsection{Terminal Screenshot}% +\label{sub:Terminal Screenshot} +\includegraphics[width=\textwidth]{executing_screenshot.png} + +\subsection{\texttt{output.txt}}% +\label{sub:output_txt} +\includegraphics[width=\textwidth]{output_txt.png} + +\end{document} diff --git a/LaTeX/executing_screenshot.png b/LaTeX/executing_screenshot.png new file mode 100644 index 0000000..e96f199 Binary files /dev/null and b/LaTeX/executing_screenshot.png differ diff --git a/LaTeX/output_txt.png b/LaTeX/output_txt.png new file mode 100644 index 0000000..daa5b75 Binary files /dev/null and b/LaTeX/output_txt.png differ diff --git a/LaTeX/run_sh.png b/LaTeX/run_sh.png new file mode 100644 index 0000000..daf3de7 Binary files /dev/null and b/LaTeX/run_sh.png differ