static int namedev_init_config(void)
{
- char filename[255];
char line[255];
char *temp;
char *temp2;
int retval = 0;
struct config_device dev;
- strcpy(filename, UDEV_CONFIG_DIR NAMEDEV_CONFIG_FILE);
- dbg("opening %s to read as permissions config", filename);
- fd = fopen(filename, "r");
+ dbg("opening %s to read as config", udev_config_filename);
+ fd = fopen(udev_config_filename, "r");
if (fd == NULL) {
- dbg("Can't open %s", filename);
+ dbg("Can't open %s", udev_config_filename);
return -ENODEV;
}
static int namedev_init_permissions(void)
{
- char filename[255];
char line[255];
char *temp;
char *temp2;
int retval = 0;
struct config_device dev;
- strcpy(filename, UDEV_CONFIG_DIR NAMEDEV_CONFIG_PERMISSION_FILE);
- dbg("opening %s to read as permissions config", filename);
- fd = fopen(filename, "r");
+ dbg("opening %s to read as permissions config", udev_config_permission_filename);
+ fd = fopen(udev_config_permission_filename, "r");
if (fd == NULL) {
- dbg("Can't open %s", filename);
+ dbg("Can't open %s", udev_config_permission_filename);
return -ENODEV;
}
if (tmpattr)
goto label_found;
- /* look in the class device device directory if present */
+ /* look in the class device directory if present */
if (class_dev->sysdevice) {
tmpattr = sysfs_get_classdev_attr(class_dev, dev->sysfs_file);
if (tmpattr)
if (tmpattr)
goto label_found;
- /* look in the class device device directory if present */
+ /* look in the class device directory if present */
if (class_dev_parent->sysdevice) {
tmpattr = sysfs_get_classdev_attr(class_dev_parent, dev->sysfs_file);
if (tmpattr)