From mboxrd@z Thu Jan 1 00:00:00 1970 From: greg@kroah.com (Greg KH) Date: Mon, 29 May 2017 07:43:09 +0200 Subject: understanding of sysfs. In-Reply-To: References: <20170523063455.GA18346@kroah.com> <20170523092317.GC22923@kroah.com> Message-ID: <20170529054309.GB3701@kroah.com> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org On Mon, May 29, 2017 at 10:58:09AM +0530, Madhu K wrote: > > > On Tue, May 23, 2017 at 2:53 PM, Greg KH wrote: > > On Tue, May 23, 2017 at 12:58:07PM +0530, Madhu K wrote: > > Hi Greg, > > > > Thanks for your response. > > > > > > On Tue, May 23, 2017 at 12:04 PM, Greg KH wrote: > > > >? ? ?On Tue, May 23, 2017 at 11:58:31AM +0530, Madhu K wrote: > >? ? ?> Hi All, > >? ? ?> > >? ? ?> why there is no character device entry present in /sys/class? where > as > >? ? ?block > >? ? ?> and net device entries are present. > > > >? ? ?I see character devices there, but not the device nodes.? I don't see > >? ? ?block device nodes there either. > > > > > > If I am wrong please correct me, there is a folder called block in /sys/ > class. > > is block not containing block device nodes?? > > Nope, look closer :) > > > I checked the block folder, the entries which are present in /sys/class/block > are softlink to /sys/devices nodes. What do you exactly mean by "nodes"? /sys/class/block/ points to the block device "class devices" in the kernel device hierarchy, just like the other /sys/class/* entries point to other class devices. > what i understand from this is, all block net and char node entries > are present in /sys/devices. Am i correct? Again, what do you mean by a "node"? Did you read the documentation about sysfs and the driver model? thanks, greg k-h