]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man2/setup.2
dist.mk, All pages: .TH: Generate date at 'make dist'
[thirdparty/man-pages.git] / man2 / setup.2
CommitLineData
fea681da
MK
1.\" Copyright (c) 1992 Drew Eckhardt (drew@cs.colorado.edu), March 28, 1992
2.\"
5fbde956 3.\" SPDX-License-Identifier: Linux-man-pages-copyleft
fea681da
MK
4.\"
5.\" Modified by Michael Haardt <michael@moria.de>
6.\" Modified Sun Jul 25 10:14:13 1993 by Rik Faith <faith@cs.unc.edu>
7.\" Modified 15 April 1995 by Michael Chastain <mec@shell.portal.com>
8.\" Update calling parameters to Linux 1.2.4 values.
9.\" Modified 10 June 1995 by Andries Brouwer <aeb@cwi.nl>
10.\" Modified 3 May 1996 by Martin Schulze <joey@infodrom.north.de>
11.\" Modified Wed Nov 6 04:05:28 1996 by Eric S. Raymond <esr@thyrsus.com>
12.\" Modified Sat Jan 29 01:08:23 2000 by aeb
13.\"
ab47278f 14.TH SETUP 2 (date) "Linux man-pages (unreleased)"
fea681da 15.SH NAME
9ee4a2b6 16setup \- setup devices and filesystems, mount root filesystem
b8eeb5db
AC
17.SH LIBRARY
18Standard C library
8fc3b2cf 19.RI ( libc ", " \-lc )
fea681da 20.SH SYNOPSIS
c7db92b9 21.nf
fea681da 22.B #include <unistd.h>
68e4db0a 23.PP
fea681da 24.B int setup(void);
c7db92b9 25.fi
fea681da 26.SH DESCRIPTION
e511ffb6 27.BR setup ()
fea681da
MK
28is called once from within
29.IR linux/init/main.c .
9ee4a2b6
MK
30It calls initialization functions for devices and filesystems
31configured into the kernel and then mounts the root filesystem.
fea681da
MK
32.PP
33No user process may call
e511ffb6 34.BR setup ().
2c8d1c7d 35Any user process, even a process with superuser permission,
fea681da
MK
36will receive
37.BR EPERM .
47297adb 38.SH RETURN VALUE
e511ffb6 39.BR setup ()
fea681da
MK
40always returns \-1 for a user process.
41.SH ERRORS
42.TP
43.B EPERM
44Always, for a user process.
710631e8
MK
45.SH VERSIONS
46Since Linux 2.1.121, no such function exists anymore.
3113c7f3 47.SH STANDARDS
8382f16d 48This function is Linux-specific, and should not be used in programs
fea681da 49intended to be portable, or indeed in any programs at all.
710631e8
MK
50.SH NOTES
51The calling sequence varied: at some times
146c3223 52.BR setup ()
710631e8 53has had a single argument
5049da5b 54.I "void\ *BIOS"
c4bb193f 55and at other times a single argument
fea681da 56.IR "int magic" .