Debian Codegraph @

upstream/debian-trixie/man2/setup.2

raw
1 .\" Copyright (c) 1992 Drew Eckhardt ([email protected]), March 28, 1992
2 .\"
3 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
4 .\"
5 .\" Modified by Michael Haardt <[email protected]>
6 .\" Modified Sun Jul 25 10:14:13 1993 by Rik Faith <[email protected]>
7 .\" Modified 15 April 1995 by Michael Chastain <[email protected]>
8 .\" Update calling parameters to Linux 1.2.4 values.
9 .\" Modified 10 June 1995 by Andries Brouwer <[email protected]>
10 .\" Modified 3 May 1996 by Martin Schulze <[email protected]>
11 .\" Modified Wed Nov 6 04:05:28 1996 by Eric S. Raymond <[email protected]>
12 .\" Modified Sat Jan 29 01:08:23 2000 by aeb
13 .\"
14 .TH setup 2 2024-05-02 "Linux man-pages 6.9.1"
15 .SH NAME
16 setup \- setup devices and filesystems, mount root filesystem
17 .SH LIBRARY
18 Standard C library
19 .RI ( libc ", " \-lc )
20 .SH SYNOPSIS
21 .nf
22 .B #include <unistd.h>
23 .P
24 .B [[deprecated]] int setup(void);
25 .fi
26 .SH DESCRIPTION
27 .BR setup ()
28 is called once from within
29 .IR linux/init/main.c .
30 It calls initialization functions for devices and filesystems
31 configured into the kernel and then mounts the root filesystem.
32 .P
33 No user process may call
34 .BR setup ().
35 Any user process, even a process with superuser permission,
36 will receive
37 .BR EPERM .
38 .SH RETURN VALUE
39 .BR setup ()
40 always returns \-1 for a user process.
41 .SH ERRORS
42 .TP
43 .B EPERM
44 Always, for a user process.
45 .SH STANDARDS
46 Linux.
47 .SH VERSIONS
48 Removed in Linux 2.1.121.
49 .P
50 The calling sequence varied: at some times
51 .BR setup ()
52 has had a single argument
53 .I "void\ *BIOS"
54 and at other times a single argument
55 .IR "int magic" .