fix build warning
tools.c: In function 'splash_verbose': tools.c:309:2: warning: implicit declaration of function 'spawn' [-Wimplicit-function-declaration] stage1.c: In function 'spawn_splash': stage1.c:165:2: warning: implicit declaration of function 'spawn' [-Wimplicit-function-declaration]
This commit is contained in:
parent
6e000ec0e3
commit
267ca6e7d1
14
init.c
14
init.c
@ -66,7 +66,7 @@ char *init_premount[] = {"/sbin/init-premount", "init-premount", NULL};
|
||||
char *init_bottom[] = {"/sbin/init-bottom", "init-bottom", NULL};
|
||||
|
||||
extern void stage1();
|
||||
void fatal(const char *) __attribute__((noreturn));
|
||||
static void fatal(const char *) __attribute__((noreturn));
|
||||
|
||||
/*
|
||||
* this needs to handle the following cases:
|
||||
@ -77,14 +77,14 @@ void fatal(const char *) __attribute__((noreturn));
|
||||
* 4) run from a floppy that's been loaded into a ramdisk
|
||||
*/
|
||||
|
||||
void fatal(const char *msg)
|
||||
static void fatal(const char *msg)
|
||||
{
|
||||
printf("FATAL ERROR IN INIT: %s\nI can't recover from this,"
|
||||
"please reboot manually and send bugreport.\n", msg);
|
||||
while (1);
|
||||
}
|
||||
|
||||
void warn(char *msg)
|
||||
static void warn(char *msg)
|
||||
{
|
||||
printf("W: %s\n", msg);
|
||||
}
|
||||
@ -104,7 +104,7 @@ static int _mknod(const char *pathname, mode_t mode, dev_t dev)
|
||||
* (1) watch /proc/kmsg and copy the stuff to /dev/tty4
|
||||
* (2) listens to /dev/log and copy also this stuff (log from programs)
|
||||
*/
|
||||
pid_t doklog()
|
||||
static pid_t doklog()
|
||||
{
|
||||
int in, out, i, ii;
|
||||
pid_t pid;
|
||||
@ -151,7 +151,7 @@ pid_t spawn(char *av[])
|
||||
}
|
||||
}
|
||||
|
||||
void spawn_hook(char *av[])
|
||||
static void spawn_hook(char *av[])
|
||||
{
|
||||
struct stat st;
|
||||
int status;
|
||||
@ -160,7 +160,7 @@ void spawn_hook(char *av[])
|
||||
if (waitpid(spawn(av), &status, 0) < 0 || !(WIFEXITED(status))) fatal(av[0]);
|
||||
}
|
||||
|
||||
void take_env(int fd)
|
||||
static void take_env(int fd)
|
||||
{
|
||||
static char buf[PIPE_BUF];
|
||||
char *p = buf;
|
||||
@ -285,7 +285,7 @@ struct filesystem
|
||||
};
|
||||
|
||||
/* attempt to unmount all filesystems in /proc/mounts */
|
||||
void unmount_filesystems(void)
|
||||
static void unmount_filesystems(void)
|
||||
{
|
||||
int fd, size;
|
||||
char buf[65535]; /* this should be big enough */
|
||||
|
22
init.h
Normal file
22
init.h
Normal file
@ -0,0 +1,22 @@
|
||||
/*
|
||||
* Guillaume Cottenceau (gc@mandrakesoft.com)
|
||||
*
|
||||
* Copyright 2000 MandrakeSoft
|
||||
*
|
||||
* This software may be freely redistributed under the terms of the GNU
|
||||
* public license.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _INIT_H
|
||||
#define _INIT_H
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
pid_t spawn(char *av[]);
|
||||
|
||||
#endif
|
4
stage1.c
4
stage1.c
@ -59,6 +59,10 @@
|
||||
#include "disk.h"
|
||||
#endif
|
||||
|
||||
#ifdef SPAWN_SPLASH
|
||||
#include "init.h"
|
||||
#endif
|
||||
|
||||
extern char *env[];
|
||||
|
||||
/************************************************************
|
||||
|
Loading…
x
Reference in New Issue
Block a user