www.delorie.com/djgpp/doc/libc/libc_572.html   search  
libc.a reference

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

mknod

Syntax

 
#include <sys/stat.h>

int mknod(const char *path, mode_t mode, dev_t dev);

Description

This function is provided to assist in porting from Unix. If mode specifies a regular file, mknod creates a file using path as its name. If mode specifies a character device, and if the device whose name is given by path exists and its device specification as returned by stat or fstat is equal to dev, mknod returns -1 and sets errno to EEXIST. In all other cases, -1 is returned errno is set to EACCES.

The argument dev is ignored if mode does not specify a character device.

Return Value

Zero on success, -1 on failure.

Portability

ANSI/ISO C No
POSIX No


  webmaster     delorie software   privacy  
  Copyright © 2004     Updated Apr 2004