[SOLVED] How to read the file system type of a partition in kernel space

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below. ** If you are logged in, most ads will not be displayed. **

How to read the file system type of a partition in kernel space

There's some ways to read the types of file system in each partition in user space, like blkid. Now I want to transplant it under kernel space. By reading the source codes of blkid I found that it reads the partition information from the file "/etc/blkid/blkid.tab", but who writes the information in it and how does it get these information? Any help would be appreciated