doc(book): wip
This commit is contained in:
parent
2d05773902
commit
1454a739d0
|
@ -3,13 +3,40 @@
|
||||||
\usepackage[utf8]{inputenc}
|
\usepackage[utf8]{inputenc}
|
||||||
\usepackage[T1]{fontenc}
|
\usepackage[T1]{fontenc}
|
||||||
\usepackage{babel}
|
\usepackage{babel}
|
||||||
\usepackage{ lmodern}
|
\usepackage{lmodern}
|
||||||
|
\usepackage{listings}
|
||||||
|
\usepackage{xcolor}
|
||||||
\usepackage[
|
\usepackage[
|
||||||
pdftitle={StupidFS},
|
pdftitle={StupidFS},
|
||||||
pdfauthor={\@author},
|
pdfauthor={\@author},
|
||||||
]{hyperref}
|
]{hyperref}
|
||||||
|
|
||||||
|
\definecolor{codegreen}{rgb}{0,0.6,0}
|
||||||
|
\definecolor{codegray}{rgb}{0.5,0.5,0.5}
|
||||||
|
\definecolor{codepurple}{rgb}{0.58,0,0.82}
|
||||||
|
\definecolor{backcolour}{rgb}{0.95,0.95,0.92}
|
||||||
|
|
||||||
|
\lstdefinestyle{mystyle}{
|
||||||
|
backgroundcolor=\color{backcolour},
|
||||||
|
commentstyle=\color{codegreen},
|
||||||
|
keywordstyle=\color{magenta},
|
||||||
|
numberstyle=\tiny\color{codegray},
|
||||||
|
stringstyle=\color{codepurple},
|
||||||
|
basicstyle=\ttfamily\footnotesize,
|
||||||
|
breakatwhitespace=false,
|
||||||
|
breaklines=true,
|
||||||
|
captionpos=b,
|
||||||
|
keepspaces=true,
|
||||||
|
numbers=left,
|
||||||
|
numbersep=5pt,
|
||||||
|
showspaces=false,
|
||||||
|
showstringspaces=false,
|
||||||
|
showtabs=false,
|
||||||
|
tabsize=2
|
||||||
|
}
|
||||||
|
|
||||||
|
\lstset{style=mystyle}
|
||||||
|
|
||||||
\date{\today}
|
\date{\today}
|
||||||
\title{%
|
\title{%
|
||||||
StupidFS Algorithm \& Data Structure \\
|
StupidFS Algorithm \& Data Structure \\
|
||||||
|
@ -42,7 +69,7 @@
|
||||||
\hline
|
\hline
|
||||||
\textbf{Flag} & \textbf{Hexadecimal} & \textbf{ASCII} & \textbf{Data structure} \\
|
\textbf{Flag} & \textbf{Hexadecimal} & \textbf{ASCII} & \textbf{Data structure} \\
|
||||||
\hline
|
\hline
|
||||||
STPDFS\_SB\_MAGIC & 0x44505453 & STPD & TODO \\
|
STPDFS\_SB\_MAGIC & 0x44505453 & STPD & Superblock \\
|
||||||
\hline
|
\hline
|
||||||
\end{tabular}
|
\end{tabular}
|
||||||
\end{center}
|
\end{center}
|
||||||
|
@ -51,8 +78,34 @@
|
||||||
|
|
||||||
\section{Superblocks}
|
\section{Superblocks}
|
||||||
|
|
||||||
|
\begin{lstlisting}[language=C]
|
||||||
|
struct stpdfs_sb {
|
||||||
|
uint32_t magic;
|
||||||
|
uint32_t isize;
|
||||||
|
uint32_t fsize;
|
||||||
|
uint32_t free[100];
|
||||||
|
uint8_t nfree;
|
||||||
|
uint8_t flock;
|
||||||
|
uint8_t ilock;
|
||||||
|
uint8_t fmod;
|
||||||
|
uint32_t time[2];
|
||||||
|
};
|
||||||
|
\end{lstlisting}
|
||||||
|
|
||||||
|
\section{INodes}
|
||||||
|
|
||||||
|
\begin{lstlisting}[language=C]
|
||||||
|
struct inode {
|
||||||
|
uint16_t mode;
|
||||||
|
uint8_t nlink;
|
||||||
|
uint8_t uid;
|
||||||
|
uint8_t gid;
|
||||||
|
uint32_t size;
|
||||||
|
uint16_t addr[8];
|
||||||
|
uint32_t actime[2];
|
||||||
|
uint32_t modtime[2];
|
||||||
|
};
|
||||||
|
\end{lstlisting}
|
||||||
\appendix
|
\appendix
|
||||||
|
|
||||||
\end{document}
|
\end{document}
|
||||||
|
|
Loading…
Reference in a new issue