udev_add.o \
udev_remove.o \
udev_sysfs.o \
- udevdb.o \
+ udev_db.o \
namedev.o \
namedev_parse.o \
dev_d.o \
udev_lib.h \
namedev.h \
udev_version.h \
- udevdb.h \
+ udev_db.h \
udev_sysfs.h \
logging.h \
selinux.h \
$(QUIET) $(STRIPCMD) $@
$(INFO): $(LIBC) $(INFO).o $(OBJS) $(HEADERS)
- $(QUIET) $(LD) $(LDFLAGS) -o $@ $(CRT0) udevinfo.o udev_lib.o udev_config.o udevdb.o $(SYSFS) $(LIB_OBJS) $(ARCH_LIB_OBJS)
+ $(QUIET) $(LD) $(LDFLAGS) -o $@ $(CRT0) udevinfo.o udev_lib.o udev_config.o udev_db.o $(SYSFS) $(LIB_OBJS) $(ARCH_LIB_OBJS)
$(QUIET) $(STRIPCMD) $@
$(DAEMON): $(LIBC) $(DAEMON).o $(OBJS) udevd.h
#include "udev.h"
#include "udev_lib.h"
-#include "udevdb.h"
#include "logging.h"
static int run_program(const char *filename, void *data)
#include "udev_version.h"
#include "logging.h"
#include "namedev.h"
-#include "udevdb.h"
+#include "udev_db.h"
static struct sysfs_attribute *find_sysfs_attribute(struct sysfs_class_device *class_dev, struct sysfs_device *sysfs_device, char *attr);
while (1) {
dbg("look for existing node '%s'", filename);
memset(&db_udev, 0x00, sizeof(struct udevice));
- if (udevdb_get_dev_byname(&db_udev, filename) != 0) {
+ if (udev_db_get_device_byname(&db_udev, filename) != 0) {
dbg("free num=%d", num);
return num;
}
#include "udev_lib.h"
#include "udev_sysfs.h"
#include "udev_version.h"
-#include "logging.h"
#include "namedev.h"
-#include "udevdb.h"
+#include "logging.h"
#ifdef LOG
#include "udev_version.h"
#include "logging.h"
#include "namedev.h"
-#include "udevdb.h"
+#include "udev_db.h"
#include "selinux.h"
if (retval != 0)
goto exit;
- if (udevdb_add_dev(udev) != 0)
- dbg("udevdb_add_dev failed, but we create the node anyway, "
+ if (udev_db_add_device(udev) != 0)
+ dbg("udev_db_add_dev failed, but we create the node anyway, "
"remove might not work for custom names");
/* use full path to the environment */
/*
- * udevdb.c
+ * udev_db.c
*
* Userspace devfs
*
#include "udev.h"
#include "udev_lib.h"
#include "logging.h"
-#include "udevdb.h"
+#include "udev_db.h"
#define PATH_TO_NAME_CHAR '@'
return 0;
}
-int udevdb_add_dev(struct udevice *udev)
+int udev_db_add_device(struct udevice *udev)
{
char filename[SYSFS_PATH_MAX];
FILE *f;
return 0;
}
-int udevdb_get_dev(struct udevice *udev)
+int udev_db_get_device(struct udevice *udev)
{
char filename[SYSFS_PATH_MAX];
return parse_db_file(udev, filename);
}
-int udevdb_delete_dev(struct udevice *udev)
+int udev_db_delete_device(struct udevice *udev)
{
char filename[SYSFS_PATH_MAX];
return 0;
}
-int udevdb_get_dev_byname(struct udevice *udev, const char *name)
+int udev_db_get_device_byname(struct udevice *udev, const char *name)
{
struct dirent *ent;
DIR *dir;
/*
- * udevdb.h
+ * udev_db.h
*
* Userspace devfs
*
*
*/
-#ifndef _UDEVDB_H_
-#define _UDEVDB_H_
+#ifndef _UDEV_DB_H_
+#define _UDEV_DB_H_
-extern int udevdb_add_dev(struct udevice *dev);
-extern int udevdb_get_dev(struct udevice *dev);
-extern int udevdb_delete_dev(struct udevice *dev);
+extern int udev_db_add_device(struct udevice *dev);
+extern int udev_db_get_device(struct udevice *dev);
+extern int udev_db_delete_device(struct udevice *dev);
-extern int udevdb_get_dev_byname(struct udevice *udev, const char *name);
+extern int udev_db_get_device_byname(struct udevice *udev, const char *name);
-#endif /* _UDEVDB_H_ */
+#endif /* _UDEV_DB_H_ */
#include "udev.h"
#include "udev_lib.h"
#include "udev_version.h"
-#include "logging.h"
#include "namedev.h"
-#include "udevdb.h"
+#include "udev_db.h"
+#include "logging.h"
static int delete_path(const char *path)
{
if (udev->type != 'b' && udev->type != 'c')
return 0;
- retval = udevdb_get_dev(udev);
+ retval = udev_db_get_device(udev);
if (retval) {
/* fall back to kernel name */
temp = strrchr(udev->devpath, '/');
}
dbg("remove name='%s'", udev->name);
- udevdb_delete_dev(udev);
+ udev_db_delete_device(udev);
/* use full path to the environment */
snprintf(udev->devname, NAME_SIZE, "%s/%s", udev_root, udev->name);
#include "udev.h"
#include "udev_lib.h"
#include "udev_version.h"
+#include "udev_db.h"
#include "logging.h"
-#include "udevdb.h"
#define SYSFS_VALUE_SIZE 256
}
memset(&udev, 0x00, sizeof(struct udevice));
strfieldcpy(udev.devpath, pos);
- retval = udevdb_get_dev(&udev);
+ retval = udev_db_get_device(&udev);
if (retval != 0) {
printf("device not found in database\n");
goto exit;
memset(&udev, 0x00, sizeof(struct udevice));
strfieldcpy(udev.name, pos);
- retval = udevdb_get_dev_byname(&udev, pos);
+ retval = udev_db_get_device_byname(&udev, pos);
if (retval != 0) {
printf("device not found in database\n");
goto exit;
#include "udev.h"
#include "udev_lib.h"
#include "udev_version.h"
-#include "logging.h"
#include "namedev.h"
+#include "logging.h"
#ifdef LOG