Conventions used
There are a number of text conventions used throughout this book.
Code in text
: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: “If we look at the sd*
devices in /dev
, notice that the file type is being shown as b
, for block devices.”
A block of code is set as follows:
struct block_device { sector_t bd_start_sect; sector_t bd_nr_sectors; struct disk_stats __percpu *bd_stats; unsigned long bd_stamp; bool bd_read_only; dev_t bd_dev; atomic_t bd_openers; struct inode * bd_inode; [……..]
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
struct block_device { sector_t bd_start_sect; sector_t bd_nr_sectors; struct disk_stats __percpu *bd_stats; unsigned long bd_stamp; bool bd_read_only; dev_t bd_dev; atomic_t bd_openers; struct inode * bd_inode; [……..]
Any command-line input or output is written as follows:
[root@linuxbox ~]# find / -inum 67118958 -exec ls -l {} \; -rw-r--r-- 1 root root 220 Jun 15 22:30 /etc/hosts [root@linuxbox ~]#
Bold: Indicates a new term, an important word, or words that you see onscreen. For instance, words in menus or dialog boxes appear in bold. Here is an example: “In the case of a directory, the type field in an inode is a directory.”
Tips or important notes
Appear like this.