udev_config.c revision 9f8dfa19cfd2b502bf794f39a421cbb7c4cc0404
/*
*
* Userspace devfs
*
* Copyright (C) 2003,2004 Greg Kroah-Hartman <greg@kroah.com>
*
*
* under the terms of the GNU General Public License as published by the
* Free Software Foundation version 2 of the License.
*
* 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.
*
*/
/* define this to enable parsing debugging */
/* #define DEBUG_PARSER */
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <ctype.h>
#include "libsysfs/sysfs/libsysfs.h"
#include "udev.h"
#include "udev_utils.h"
#include "udev_version.h"
#include "logging.h"
#include "namedev.h"
/* global variables */
char sysfs_path[SYSFS_PATH_MAX];
char default_owner[USER_SIZE];
char default_group[USER_SIZE];
int udev_log;
int udev_dev_d;
int udev_hotplug_d;
static int string_is_true(const char *str)
{
return 1;
return 1;
return 1;
return 0;
}
static void init_variables(void)
{
const char *env;
/* If any config values are specified, they will override these values. */
default_mode = 0660;
udev_dev_d = 1;
udev_dev_d = 0;
udev_hotplug_d = 1;
udev_hotplug_d = 0;
}
static int parse_config_file(void)
{
char *bufline;
char *temp;
char *variable;
char *value;
char *buf;
int lineno;
int retval = 0;
} else {
return -ENODEV;
}
/* loop through the whole file */
lineno = 0;
cur = 0;
lineno++;
info("line too long, conf line skipped %s, line %d",
continue;
}
/* eat the whitespace */
bufline++;
count--;
}
if (count == 0)
continue;
/* see if this is a comment */
if (bufline[0] == COMMENT_CHARACTER)
continue;
if (retval != 0)
info("%s:%d:%Zd: error parsing '%s'",
continue;
}
continue;
}
continue;
}
continue;
}
continue;
}
continue;
}
continue;
}
info("%s:%d:%Zd: unknown key '%s'",
}
return retval;
}
static void get_dirs(void)
{
char *temp;
int retval;
if (retval)
dbg("sysfs_get_mnt_path failed");
/* see if we should try to override any of the default values */
}
}
}
void udev_init_config(void)
{
get_dirs();
}