X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=networking%2Fudhcp%2Fcommon.h;h=d5291f2f3ac3b418cd121c1b05d9581a9d0b8dd3;hb=e40c04b82695c1cde8ad9ed1e2aa1756463d73a7;hp=cdc51cf8a925255f8d25df324f32e51a2773a149;hpb=8b80c71d70f6f063f01864d2363a235aa1d730cf;p=oweals%2Fbusybox.git diff --git a/networking/udhcp/common.h b/networking/udhcp/common.h index cdc51cf8a..d5291f2f3 100644 --- a/networking/udhcp/common.h +++ b/networking/udhcp/common.h @@ -1,55 +1,23 @@ +/* vi: set sw=4 ts=4: */ /* common.h * * Russ Dill September 2001 * Rewritten by Vladimir Oleynik (C) 2003 * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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. + * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. */ #ifndef _COMMON_H #define _COMMON_H -#include "version.h" #include "libbb_udhcp.h" +long uptime(void); -#ifndef UDHCP_SYSLOG -enum syslog_levels { - LOG_EMERG = 0, - LOG_ALERT, - LOG_CRIT, - LOG_WARNING, - LOG_ERR, - LOG_INFO, - LOG_DEBUG -}; -#else -#include -#endif - -void background(const char *pidfile); -void start_log_and_pid(const char *client_server, const char *pidfile); -void background(const char *pidfile); -void udhcp_logging(int level, const char *fmt, ...); - -#define LOG(level, str, args...) udhcp_logging(level, str, ## args) - -#ifdef UDHCP_DEBUG -# define DEBUG(level, str, args...) LOG(level, str, ## args) +#if ENABLE_FEATURE_UDHCP_DEBUG +# define DEBUG(str, args...) bb_info_msg(str, ## args) #else -# define DEBUG(level, str, args...) do {;} while(0) +# define DEBUG(str, args...) do {;} while(0) #endif #endif