From bf4b2fec959985432effb1acac385cdb5ee6252a Mon Sep 17 00:00:00 2001 From: "Troy D. Hanson" Date: Fri, 6 Mar 2015 10:21:05 -0500 Subject: [PATCH] edit --- 109.inode/README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/109.inode/README.md b/109.inode/README.md index 7be3c45..6924a6e 100644 --- a/109.inode/README.md +++ b/109.inode/README.md @@ -16,21 +16,21 @@ a "key" to tell whether two processes opened the same device node. 1075684 dev ``` -We used ls -i to see the inode number of our device node above. Use cat -to open the device. Ignore the read failure. +We used ls -i to see the inode number of our device node above. We open +the device, without writing any bytes to it, to provoke its log message: ``` - % cat dev -cat: dev: Invalid argument + % cat /dev/null > dev % dmesg [38890.769944] open(): inode 1075684 on dev (8,1) ``` Notice our driver's log message includes the inode number of our device. It matches the one we expected. The log also says the device node inode -resides on device (8,1). We can compare that with the major and minor -of the device hosting the current directory: +resides on device (8,1). We can see that the current directory in which +the device node resides is on /dev/sda1 which is device (8,1) as shown: +``` % df . /dev/sda1 19478204 9067468 9398256 50% / % ls -l /dev/sda1