]>
Commit | Line | Data |
---|---|---|
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 | .\" | |
7bd6328f | 14 | .TH SETUP 2 2021-03-22 "Linux man-pages (unreleased)" "Linux Programmer's Manual" |
fea681da | 15 | .SH NAME |
9ee4a2b6 | 16 | setup \- setup devices and filesystems, mount root filesystem |
b8eeb5db AC |
17 | .SH LIBRARY |
18 | Standard 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 |
28 | is called once from within |
29 | .IR linux/init/main.c . | |
9ee4a2b6 MK |
30 | It calls initialization functions for devices and filesystems |
31 | configured into the kernel and then mounts the root filesystem. | |
fea681da MK |
32 | .PP |
33 | No user process may call | |
e511ffb6 | 34 | .BR setup (). |
2c8d1c7d | 35 | Any user process, even a process with superuser permission, |
fea681da MK |
36 | will receive |
37 | .BR EPERM . | |
47297adb | 38 | .SH RETURN VALUE |
e511ffb6 | 39 | .BR setup () |
fea681da MK |
40 | always returns \-1 for a user process. |
41 | .SH ERRORS | |
42 | .TP | |
43 | .B EPERM | |
44 | Always, for a user process. | |
710631e8 MK |
45 | .SH VERSIONS |
46 | Since Linux 2.1.121, no such function exists anymore. | |
3113c7f3 | 47 | .SH STANDARDS |
8382f16d | 48 | This function is Linux-specific, and should not be used in programs |
fea681da | 49 | intended to be portable, or indeed in any programs at all. |
710631e8 MK |
50 | .SH NOTES |
51 | The calling sequence varied: at some times | |
146c3223 | 52 | .BR setup () |
710631e8 | 53 | has had a single argument |
5049da5b | 54 | .I "void\ *BIOS" |
c4bb193f | 55 | and at other times a single argument |
fea681da | 56 | .IR "int magic" . |