From 86a1073e0bfa608defbfaa43d94a537c5e700efe Mon Sep 17 00:00:00 2001 From: "\"Vladimir N. Oleynik\"" Date: Wed, 12 Oct 2005 15:21:32 +0000 Subject: bb_dev_null --- include/libbb.h | 2 +- libbb/Makefile.in | 2 +- libbb/bb_pwd.c | 6 +----- libbb/messages.c | 4 ++++ 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/libbb.h b/include/libbb.h index ee5fb8475..e3087db18 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -332,7 +332,7 @@ extern const char * const bb_path_gshadow_file; extern const char * const bb_path_group_file; extern const char * const bb_path_securetty_file; extern const char * const bb_path_motd_file; - +extern const char * const bb_dev_null; /* * You can change LIBBB_DEFAULT_LOGIN_SHELL, but don`t use, * use bb_default_login_shell and next defines, diff --git a/libbb/Makefile.in b/libbb/Makefile.in index 36b2ad212..69f8779d2 100644 --- a/libbb/Makefile.in +++ b/libbb/Makefile.in @@ -47,7 +47,7 @@ LIBBB_MOBJ0:=full_version.o \ can_not_create_raw_socket.o perm_denied_are_you_root.o \ shadow_file.o passwd_file.o group_file.o gshadow_file.o nologin_file.o \ securetty_file.o motd_file.o \ - msg_standard_input.o msg_standard_output.o shell_file.o + msg_standard_input.o msg_standard_output.o shell_file.o bb_dev_null.o LIBBB_MSRC1:=$(srcdir)/xfuncs.c LIBBB_MOBJ1:=xmalloc.o xrealloc.o xcalloc.o xstrdup.o xstrndup.o \ diff --git a/libbb/bb_pwd.c b/libbb/bb_pwd.c index 9ce1c7150..cbd72af2f 100644 --- a/libbb/bb_pwd.c +++ b/libbb/bb_pwd.c @@ -7,6 +7,7 @@ * Licensed under the GPL v2, see the file LICENSE in this tarball. */ +#include "libbb.h" #ifdef L_bb_getgrgid /* Hacked by Tito Ragusa (c) 2004 to make it more @@ -26,7 +27,6 @@ * the program exits. */ -#include "libbb.h" #include "grp_.h" /* gets a groupname given a gid */ @@ -42,7 +42,6 @@ char * bb_getgrgid(char *group, long gid, int bufsize) #ifdef L_bb_xgetgrnam #include #include -#include "libbb.h" #include "pwd_.h" #include "grp_.h" @@ -63,7 +62,6 @@ long bb_xgetgrnam(const char *name) #ifdef L_bb_xgetpwnam #include #include -#include "libbb.h" #include "pwd_.h" #include "grp_.h" @@ -99,7 +97,6 @@ long bb_xgetpwnam(const char *name) * the program exits. */ -#include "libbb.h" #include "pwd_.h" /* gets a username given a uid */ @@ -129,7 +126,6 @@ char * bb_getpwuid(char *name, long uid, int bufsize) #include #include -#include "libbb.h" /* internal function for bb_getpwuid and bb_getgrgid */ diff --git a/libbb/messages.c b/libbb/messages.c index c3f307ec5..e6e4dc30d 100644 --- a/libbb/messages.c +++ b/libbb/messages.c @@ -97,3 +97,7 @@ const char * const bb_path_motd_file = MOTD_FILE; const char * const bb_default_login_shell = LIBBB_DEFAULT_LOGIN_SHELL; #endif +#ifdef L_dev_null +const char * const bb_dev_null = "dev/null"; +#endif + -- cgit v1.2.3