chiark / gitweb /
[PATCH] rename udevdb* to udev_db*
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>
Fri, 12 Nov 2004 05:32:19 +0000 (06:32 +0100)
committerGreg KH <gregkh@suse.de>
Wed, 27 Apr 2005 05:25:14 +0000 (22:25 -0700)
Makefile
dev_d.c
namedev.c
udev.c
udev_add.c
udev_db.c [moved from udevdb.c with 94% similarity]
udev_db.h [moved from udevdb.h with 71% similarity]
udev_remove.c
udevinfo.c
udevtest.c

index 50c72279f85b542ae9f2ebdf04e7365048f438e3..09b74fcde7813b9dcea2924bca0da113ec458825 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -210,7 +210,7 @@ OBJS =      udev_lib.o      \
        udev_add.o      \
        udev_remove.o   \
        udev_sysfs.o    \
        udev_add.o      \
        udev_remove.o   \
        udev_sysfs.o    \
-       udevdb.o        \
+       udev_db.o       \
        namedev.o       \
        namedev_parse.o \
        dev_d.o         \
        namedev.o       \
        namedev_parse.o \
        dev_d.o         \
@@ -220,7 +220,7 @@ HEADERS =   udev.h          \
                udev_lib.h      \
                namedev.h       \
                udev_version.h  \
                udev_lib.h      \
                namedev.h       \
                udev_version.h  \
-               udevdb.h        \
+               udev_db.h       \
                udev_sysfs.h    \
                logging.h       \
                selinux.h       \
                udev_sysfs.h    \
                logging.h       \
                selinux.h       \
@@ -292,7 +292,7 @@ $(TESTER): $(LIBC) $(TESTER).o $(OBJS) $(HEADERS)
        $(QUIET) $(STRIPCMD) $@
 
 $(INFO): $(LIBC) $(INFO).o $(OBJS) $(HEADERS)
        $(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
        $(QUIET) $(STRIPCMD) $@
 
 $(DAEMON): $(LIBC) $(DAEMON).o $(OBJS) udevd.h
diff --git a/dev_d.c b/dev_d.c
index b3d05d9220d7f5fb1f6c18dd1a8bcbea8ede6f0b..d14c70c256d31a526e5f42b61d490eb61a94f632 100644 (file)
--- a/dev_d.c
+++ b/dev_d.c
@@ -29,7 +29,6 @@
 
 #include "udev.h"
 #include "udev_lib.h"
 
 #include "udev.h"
 #include "udev_lib.h"
-#include "udevdb.h"
 #include "logging.h"
 
 static int run_program(const char *filename, void *data)
 #include "logging.h"
 
 static int run_program(const char *filename, void *data)
index 9c94e69082a3f968500437472de3e6cd152d3e6c..3ab45d4ec6a67c32788b5b35a621a6f43ccaa193 100644 (file)
--- a/namedev.c
+++ b/namedev.c
@@ -40,7 +40,7 @@
 #include "udev_version.h"
 #include "logging.h"
 #include "namedev.h"
 #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);
 
 
 static struct sysfs_attribute *find_sysfs_attribute(struct sysfs_class_device *class_dev, struct sysfs_device *sysfs_device, char *attr);
 
@@ -194,7 +194,7 @@ static int find_free_number(struct udevice *udev, const char *name)
        while (1) {
                dbg("look for existing node '%s'", filename);
                memset(&db_udev, 0x00, sizeof(struct udevice));
        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;
                }
                        dbg("free num=%d", num);
                        return num;
                }
diff --git a/udev.c b/udev.c
index bb3385e67d5226273998a8e26683f56ee8560914..a41f22277880be604ab4beef193847373110bbd0 100644 (file)
--- a/udev.c
+++ b/udev.c
@@ -34,9 +34,8 @@
 #include "udev_lib.h"
 #include "udev_sysfs.h"
 #include "udev_version.h"
 #include "udev_lib.h"
 #include "udev_sysfs.h"
 #include "udev_version.h"
-#include "logging.h"
 #include "namedev.h"
 #include "namedev.h"
-#include "udevdb.h"
+#include "logging.h"
 
 
 #ifdef LOG
 
 
 #ifdef LOG
index c139bd38bf0ac1bbde2f4686ddfc81b622ec8554..4fb5ef18c06149200406753edfc0eb08acbd7a40 100644 (file)
@@ -42,7 +42,7 @@
 #include "udev_version.h"
 #include "logging.h"
 #include "namedev.h"
 #include "udev_version.h"
 #include "logging.h"
 #include "namedev.h"
-#include "udevdb.h"
+#include "udev_db.h"
 
 #include "selinux.h"
 
 
 #include "selinux.h"
 
@@ -303,8 +303,8 @@ int udev_add_device(struct udevice *udev, struct sysfs_class_device *class_dev)
                if (retval != 0)
                        goto exit;
 
                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 */
                            "remove might not work for custom names");
 
                /* use full path to the environment */
similarity index 94%
rename from udevdb.c
rename to udev_db.c
index 38830b098ee999aa3107c7fa2890877abd9201e5..f2a890ea421c7b3ad8b633a8275727298b5ff405 100644 (file)
--- a/udevdb.c
+++ b/udev_db.c
@@ -1,5 +1,5 @@
 /*
 /*
- * udevdb.c
+ * udev_db.c
  *
  * Userspace devfs
  *
  *
  * Userspace devfs
  *
@@ -35,7 +35,7 @@
 #include "udev.h"
 #include "udev_lib.h"
 #include "logging.h"
 #include "udev.h"
 #include "udev_lib.h"
 #include "logging.h"
-#include "udevdb.h"
+#include "udev_db.h"
 
 #define PATH_TO_NAME_CHAR              '@'
 
 
 #define PATH_TO_NAME_CHAR              '@'
 
@@ -57,7 +57,7 @@ static int get_db_filename(struct udevice *udev, char *filename, int len)
        return 0;
 }
 
        return 0;
 }
 
-int udevdb_add_dev(struct udevice *udev)
+int udev_db_add_device(struct udevice *udev)
 {
        char filename[SYSFS_PATH_MAX];
        FILE *f;
 {
        char filename[SYSFS_PATH_MAX];
        FILE *f;
@@ -135,7 +135,7 @@ static int parse_db_file(struct udevice *udev, const char *filename)
        return 0;
 }
 
        return 0;
 }
 
-int udevdb_get_dev(struct udevice *udev)
+int udev_db_get_device(struct udevice *udev)
 {
        char filename[SYSFS_PATH_MAX];
 
 {
        char filename[SYSFS_PATH_MAX];
 
@@ -144,7 +144,7 @@ int udevdb_get_dev(struct udevice *udev)
        return parse_db_file(udev, filename);
 }
 
        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];
 
 {
        char filename[SYSFS_PATH_MAX];
 
@@ -154,7 +154,7 @@ int udevdb_delete_dev(struct udevice *udev)
        return 0;
 }
 
        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;
 {
        struct dirent *ent;
        DIR *dir;
similarity index 71%
rename from udevdb.h
rename to udev_db.h
index 4f6b5de90c9390971f2185a22eddd4c51ec758ec..141c586f24702091eb43b2ff4da35b47408d8af7 100644 (file)
--- a/udevdb.h
+++ b/udev_db.h
@@ -1,5 +1,5 @@
 /*
 /*
- * udevdb.h
+ * udev_db.h
  *
  * Userspace devfs
  *
  *
  * 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_ */
index 56834a45b929eaa1127944a9383d12baa8d4dfc4..32cd785984c821267fde164258098ea07b0aa8b9 100644 (file)
@@ -33,9 +33,9 @@
 #include "udev.h"
 #include "udev_lib.h"
 #include "udev_version.h"
 #include "udev.h"
 #include "udev_lib.h"
 #include "udev_version.h"
-#include "logging.h"
 #include "namedev.h"
 #include "namedev.h"
-#include "udevdb.h"
+#include "udev_db.h"
+#include "logging.h"
 
 static int delete_path(const char *path)
 {
 
 static int delete_path(const char *path)
 {
@@ -175,7 +175,7 @@ int udev_remove_device(struct udevice *udev)
        if (udev->type != 'b' && udev->type != 'c')
                return 0;
 
        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, '/');
        if (retval) {
                /* fall back to kernel name */
                temp = strrchr(udev->devpath, '/');
@@ -186,7 +186,7 @@ int udev_remove_device(struct udevice *udev)
        }
 
        dbg("remove name='%s'", udev->name);
        }
 
        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);
 
        /* use full path to the environment */
        snprintf(udev->devname, NAME_SIZE, "%s/%s", udev_root, udev->name);
index 11482727436d31a9e78432ac531c4e4cd48bd5b5..08c25d3a047883029f25821759b166cca100ff73 100644 (file)
@@ -32,8 +32,8 @@
 #include "udev.h"
 #include "udev_lib.h"
 #include "udev_version.h"
 #include "udev.h"
 #include "udev_lib.h"
 #include "udev_version.h"
+#include "udev_db.h"
 #include "logging.h"
 #include "logging.h"
-#include "udevdb.h"
 
 
 #define SYSFS_VALUE_SIZE               256
 
 
 #define SYSFS_VALUE_SIZE               256
@@ -355,7 +355,7 @@ static int process_options(int argc, char *argv[])
                        }
                        memset(&udev, 0x00, sizeof(struct udevice));
                        strfieldcpy(udev.devpath, pos);
                        }
                        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;
                        if (retval != 0) {
                                printf("device not found in database\n");
                                goto exit;
@@ -374,7 +374,7 @@ static int process_options(int argc, char *argv[])
 
                        memset(&udev, 0x00, sizeof(struct udevice));
                        strfieldcpy(udev.name, pos);
 
                        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;
                        if (retval != 0) {
                                printf("device not found in database\n");
                                goto exit;
index 14c511584ba8ad362861b6313f3409d4242d3ea3..b9a5fea489491aaf78f8c886ce28753373aa1d0c 100644 (file)
@@ -31,8 +31,8 @@
 #include "udev.h"
 #include "udev_lib.h"
 #include "udev_version.h"
 #include "udev.h"
 #include "udev_lib.h"
 #include "udev_version.h"
-#include "logging.h"
 #include "namedev.h"
 #include "namedev.h"
+#include "logging.h"
 
 
 #ifdef LOG
 
 
 #ifdef LOG