Re: why mknod() ??

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <mkatiyar@xxxxxxxxx> wrote:
On Tue, Sep 21, 2010 at 8:06 AM, mohit verma <mohit89mlnc@xxxxxxxxx> 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 ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ




--
Regards,
Sri.


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux