OSDN Git Service

94cfceaf316c5beb37869a187e4cee8f52345083
[linuxjm/LDP_man-pages.git] / original / man2 / setup.2
1 .\" Copyright (c) 1992 Drew Eckhardt (drew@cs.colorado.edu), March 28, 1992
2 .\"
3 .\" %%%LICENSE_START(VERBATIM)
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.
12 .\"
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.
20 .\"
21 .\" Formatted or processed versions of this manual, if unaccompanied by
22 .\" the source, must acknowledge the copyright and authors of this work.
23 .\" %%%LICENSE_END
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 .\"
34 .TH SETUP 2 2008-12-03 "Linux" "Linux Programmer's Manual"
35 .SH NAME
36 setup \- setup devices and filesystems, mount root filesystem
37 .SH SYNOPSIS
38 .B #include <unistd.h>
39 .sp
40 .B int setup(void);
41 .SH DESCRIPTION
42 .BR setup ()
43 is called once from within
44 .IR linux/init/main.c .
45 It calls initialization functions for devices and filesystems
46 configured into the kernel and then mounts the root filesystem.
47 .PP
48 No user process may call
49 .BR setup ().
50 Any user process, even a process with superuser permission,
51 will receive
52 .BR EPERM .
53 .SH RETURN VALUE
54 .BR setup ()
55 always returns \-1 for a user process.
56 .SH ERRORS
57 .TP
58 .B EPERM
59 Always, for a user process.
60 .SH VERSIONS
61 Since Linux 2.1.121, no such function exists anymore.
62 .SH CONFORMING TO
63 This function is Linux-specific, and should not be used in programs
64 intended to be portable, or indeed in any programs at all.
65 .SH NOTES
66 The calling sequence varied: at some times
67 .I setup ()
68 has had a single argument
69 .I "void\ *BIOS"
70 and at other times a single argument
71 .IR "int magic" .
72 .SH COLOPHON
73 This page is part of release 3.64 of the Linux
74 .I man-pages
75 project.
76 A description of the project,
77 and information about reporting bugs,
78 can be found at
79 \%http://www.kernel.org/doc/man\-pages/.