utils.c revision 181368a3b26329f77a93b06a5d2b285d4bf5f8e3
/*
* Modem mode switcher
*
* Copyright (C) 2009 Dan Williams <dcbw@redhat.com>
*
* 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:
*/
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <time.h>
#include "utils.h"
static int debug_on = 0;
static int quiet = 0;
void
{
char buffer[1024];
char tag = 'L';
return;
tag = 'E';
tag = 'L';
tag = 'D';
if (logfile)
if (!quiet)
}
int
{
time_t t;
if (!path)
return 0;
if (!logfile)
return 1;
return 0;
}
void
log_shutdown (void)
{
if (logfile)
}