Everything2
Near Matches
Ignore Exact
Full Text
Everything2

mknod

created by GoNINzo

(thing) by premchai21 (4.2 hr) (print)   ?   (I like it!) Sun Oct 14 2001 at 21:48:02

mknod is a function in the GNU C library, glibc, which makes special files, such as files which correspond to devices. It is included for compatibility with 4.4BSD. Its prototype is:

int mknod(const char *filename, int mode, int dev)

where filename is the name of the special file to create, mode specifies the mode of the file (possibly including special file bits, such as S_IFCHR or S_IFBLK for character or block files), and dev is an integer specifying which device the file refers to; its interpretation varies. mknod returns 0 on success, and returns -1 on error, as well as setting errno accordingly:

  1. EPERM - only the superuser can create special files. This process is not running as the superuser.
  2. ENOSPC - No space left in filesystem or directory for the new special file.
  3. EROFS - Read-only filesystem.
  4. EEXIST - File already exists -- old file must be unlinked first.

The mknod function happens unsurprisingly to form the base for the mknod program, which in the GNU system is part of GNU coreutils.

(Information mostly paraphrased from the GNU C Library Reference Manual, which is under the GNU Free Documentation License.)


printable version
chaos

Compromising /dev/random glibc device numbers Linux filesystem hierarchy
Getting a USB mouse to work under Linux character device special file char *
ENOSPC radio communication George Washington's 1792 State of the Union Address em
January 30, 2006 Intelligence Quotient unix commands open frame monitor
chmod FIFO BSD prototype
directory unlink read-only George Washington's 1790 State of the Union Address
Y'know, if you log in, you can write something here, or contact authors directly on the site. Create a New User if you don't already have an account.
  Epicenter
Login
Password

password reminder
register

Everything2 Help

Cool Staff Picks
What you are reading:
The Idiot's Guide to the Transmutation of Morals
Jerusalem cricket
Tupperware
Traci Lords
Something Happened: The Pacific NorthWest E2 Gathering
ocean
DeLorean
running shoes
What my mother taught me
Fred Astaire
Search Engine Mechanics
Yossarian's School of Badassary
Walter Benjamin
New Writeups
SwimmingMonkey
Conversations with Fo Fo- the Loneliest dog in Purgatory(fiction)
locke baron
lynx(thing)
Simulacron3
Reality, Dimensions and the Natural Ontology(essay)
SubSane
Making Love to a 9-Foot Woman(person)
Ouzo
Thoughts(idea)
antigravpussy
I fall silent, listening. The breadcrumbs are talking about us(person)
calgon
Buffalo Bill by the pool(poetry)
gate
Anarchy is Order(idea)
ushdfgakjasgh
Scribeling(thing)
XWiz
Trism(review)
artman2003
Briefcase Full of Souls - Part I(fiction)
Dreamvirus
Alan Ladd(person)
waverider37
Harold Holt(person)
The Debutante
Until death do us part(fiction)
Ysardo
a brother to a sister(personal)
This page courtesy of The Everything Development Company