mknod is also used by unified device management system for dynamic creation of special device files in /dev. Whenever new device is attached to system the plug and play framework calls this program to create device interface.
On Tue, Sep 21, 2010 at 3:52 PM, Manish Katiyar <mkati...@gmail.com> wrote: > On Tue, Sep 21, 2010 at 8:06 AM, mohit verma <mohit89m...@gmail.com> > wrote: > > hey guys, > > i have a question silly question : > > > > as we can create the simple files with open,creat and for directories > there > > is mkdir system calls. > > so what is the need of mknod() to create special files and as well as " > > ordinary files" ? > > why can't we wrap the special file building code in one of open,creat > or > > mkdir system calls? > > > > Because they are special files and some of the commands/operations > (eg.. truncate) may not be available for them. If you look at the > implementation if is kind of a wrapper over regular create. > > > > -- > Thanks - > Manish > ================================== > [$\*.^ -- I miss being one of them > ================================== > > -- > To unsubscribe from this list: send an email with > "unsubscribe kernelnewbies" to ecar...@nl.linux.org > Please read the FAQ at http://kernelnewbies.org/FAQ > > -- Regards, Sri.