]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man2/setup.2
getent.1, ldd.1, locale.1, localedef.1, memusage.1, memusagestat.1, mtrace.1, _exit...
[thirdparty/man-pages.git] / man2 / setup.2
CommitLineData
fea681da
MK
1.\" Copyright (c) 1992 Drew Eckhardt (drew@cs.colorado.edu), March 28, 1992
2.\"
93015253 3.\" %%%LICENSE_START(VERBATIM)
fea681da
MK
4.\" Permission is granted to make and distribute verbatim copies of this
5.\" manual provided the copyright notice and this permission notice are
6.\" preserved on all copies.
7.\"
8.\" Permission is granted to copy and distribute modified versions of this
9.\" manual under the conditions for verbatim copying, provided that the
10.\" entire resulting derived work is distributed under the terms of a
11.\" permission notice identical to this one.
c13182ef 12.\"
fea681da
MK
13.\" Since the Linux kernel and libraries are constantly changing, this
14.\" manual page may be incorrect or out-of-date. The author(s) assume no
15.\" responsibility for errors or omissions, or for damages resulting from
16.\" the use of the information contained herein. The author(s) may not
17.\" have taken the same level of care in the production of this manual,
18.\" which is licensed free of charge, as they might when working
19.\" professionally.
c13182ef 20.\"
fea681da
MK
21.\" Formatted or processed versions of this manual, if unaccompanied by
22.\" the source, must acknowledge the copyright and authors of this work.
4b72fb64 23.\" %%%LICENSE_END
fea681da
MK
24.\"
25.\" Modified by Michael Haardt <michael@moria.de>
26.\" Modified Sun Jul 25 10:14:13 1993 by Rik Faith <faith@cs.unc.edu>
27.\" Modified 15 April 1995 by Michael Chastain <mec@shell.portal.com>
28.\" Update calling parameters to Linux 1.2.4 values.
29.\" Modified 10 June 1995 by Andries Brouwer <aeb@cwi.nl>
30.\" Modified 3 May 1996 by Martin Schulze <joey@infodrom.north.de>
31.\" Modified Wed Nov 6 04:05:28 1996 by Eric S. Raymond <esr@thyrsus.com>
32.\" Modified Sat Jan 29 01:08:23 2000 by aeb
33.\"
1d767b55 34.TH SETUP 2 2021-03-22 "Linux" "Linux Programmer's Manual"
fea681da 35.SH NAME
9ee4a2b6 36setup \- setup devices and filesystems, mount root filesystem
fea681da 37.SH SYNOPSIS
c7db92b9 38.nf
fea681da 39.B #include <unistd.h>
68e4db0a 40.PP
fea681da 41.B int setup(void);
c7db92b9 42.fi
fea681da 43.SH DESCRIPTION
e511ffb6 44.BR setup ()
fea681da
MK
45is called once from within
46.IR linux/init/main.c .
9ee4a2b6
MK
47It calls initialization functions for devices and filesystems
48configured into the kernel and then mounts the root filesystem.
fea681da
MK
49.PP
50No user process may call
e511ffb6 51.BR setup ().
2c8d1c7d 52Any user process, even a process with superuser permission,
fea681da
MK
53will receive
54.BR EPERM .
47297adb 55.SH RETURN VALUE
e511ffb6 56.BR setup ()
fea681da
MK
57always returns \-1 for a user process.
58.SH ERRORS
59.TP
60.B EPERM
61Always, for a user process.
710631e8
MK
62.SH VERSIONS
63Since Linux 2.1.121, no such function exists anymore.
47297adb 64.SH CONFORMING TO
8382f16d 65This function is Linux-specific, and should not be used in programs
fea681da 66intended to be portable, or indeed in any programs at all.
710631e8
MK
67.SH NOTES
68The calling sequence varied: at some times
146c3223 69.BR setup ()
710631e8 70has had a single argument
5049da5b 71.I "void\ *BIOS"
c4bb193f 72and at other times a single argument
fea681da 73.IR "int magic" .