| 1 |
.\" Copyright 1992, Drew Eckhardt <[email protected]> |
| 2 |
.\" Copyright, the authors of the Linux man-pages project |
| 3 |
.\" |
| 4 |
.\" SPDX-License-Identifier: Linux-man-pages-copyleft |
| 5 |
.\" |
| 6 |
.TH setup 2 2026-02-08 "Linux man-pages 6.18" |
| 7 |
.SH NAME |
| 8 |
setup \- setup devices and filesystems, mount root filesystem |
| 9 |
.SH LIBRARY |
| 10 |
Standard C library |
| 11 |
.RI ( libc ,\~ \-lc ) |
| 12 |
.SH SYNOPSIS |
| 13 |
.nf |
| 14 |
.B #include <unistd.h> |
| 15 |
.P |
| 16 |
.B [[deprecated]] int setup(void); |
| 17 |
.fi |
| 18 |
.SH DESCRIPTION |
| 19 |
.BR setup () |
| 20 |
is called once from within |
| 21 |
.IR linux/init/main.c . |
| 22 |
It calls initialization functions for devices and filesystems |
| 23 |
configured into the kernel and then mounts the root filesystem. |
| 24 |
.P |
| 25 |
No user process may call |
| 26 |
.BR setup (). |
| 27 |
Any user process, even a process with superuser permission, |
| 28 |
will receive |
| 29 |
.BR EPERM . |
| 30 |
.SH RETURN VALUE |
| 31 |
.BR setup () |
| 32 |
always returns \-1 for a user process. |
| 33 |
.SH ERRORS |
| 34 |
.TP |
| 35 |
.B EPERM |
| 36 |
Always, for a user process. |
| 37 |
.SH STANDARDS |
| 38 |
Linux. |
| 39 |
.SH VERSIONS |
| 40 |
Removed in Linux 2.1.121. |
| 41 |
.P |
| 42 |
The calling sequence varied: at some times |
| 43 |
.BR setup () |
| 44 |
has had a single argument |
| 45 |
.I "void\ *BIOS" |
| 46 |
and at other times a single argument |
| 47 |
.IR "int magic" . |