[Mesa-dev] [PATCH kmscube 4/5] Rename drm.[ch] to drm-common.[ch]

Emil Velikov emil.l.velikov at gmail.com
Mon Mar 13 15:28:31 UTC 2017


Depending on the moon cycle and other factors we might end up including
the local or libdrm drm.h. Simply rename the files to make it distinct
and easy to track and manage.

Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
---
 Makefile.am           | 4 ++--
 drm-atomic.c          | 2 +-
 drm.c => drm-common.c | 2 +-
 drm.h => drm-common.h | 6 +++---
 drm-legacy.c          | 2 +-
 kmscube.c             | 2 +-
 6 files changed, 9 insertions(+), 9 deletions(-)
 rename drm.c => drm-common.c (99%)
 rename drm.h => drm-common.h (96%)

diff --git a/Makefile.am b/Makefile.am
index 8aa2756..80de719 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -47,9 +47,9 @@ kmscube_SOURCES = \
 	common.h \
 	cube-smooth.c \
 	cube-tex.c \
-	drm.c \
-	drm.h \
 	drm-atomic.c \
+	drm-common.c \
+	drm-common.h \
 	drm-legacy.c \
 	esTransform.c \
 	esUtil.h \
diff --git a/drm-atomic.c b/drm-atomic.c
index 0b38c32..3362eac 100644
--- a/drm-atomic.c
+++ b/drm-atomic.c
@@ -29,7 +29,7 @@
 #include <unistd.h>
 
 #include "common.h"
-#include "drm.h"
+#include "drm-common.h"
 
 #define VOID2U64(x) ((uint64_t)(unsigned long)(x))
 
diff --git a/drm.c b/drm-common.c
similarity index 99%
rename from drm.c
rename to drm-common.c
index d082846..764ffa2 100644
--- a/drm.c
+++ b/drm-common.c
@@ -28,7 +28,7 @@
 #include <string.h>
 
 #include "common.h"
-#include "drm.h"
+#include "drm-common.h"
 
 static void
 drm_fb_destroy_callback(struct gbm_bo *bo, void *data)
diff --git a/drm.h b/drm-common.h
similarity index 96%
rename from drm.h
rename to drm-common.h
index c41683b..f56d07b 100644
--- a/drm.h
+++ b/drm-common.h
@@ -21,8 +21,8 @@
  * DEALINGS IN THE SOFTWARE.
  */
 
-#ifndef _DRM_H
-#define _DRM_H
+#ifndef _DRM_COMMON_H
+#define _DRM_COMMON_H
 
 #include <xf86drm.h>
 #include <xf86drmMode.h>
@@ -74,4 +74,4 @@ int init_drm(struct drm *drm, const char *device);
 const struct drm * init_drm_legacy(const char *device);
 const struct drm * init_drm_atomic(const char *device);
 
-#endif /* _DRM_H */
+#endif /* _DRM_COMMON_H */
diff --git a/drm-legacy.c b/drm-legacy.c
index 29d5f3c..2392a3d 100644
--- a/drm-legacy.c
+++ b/drm-legacy.c
@@ -26,7 +26,7 @@
 #include <string.h>
 
 #include "common.h"
-#include "drm.h"
+#include "drm-common.h"
 
 static struct drm drm;
 
diff --git a/kmscube.c b/kmscube.c
index e31a61d..91e0104 100644
--- a/kmscube.c
+++ b/kmscube.c
@@ -29,7 +29,7 @@
 #include <getopt.h>
 
 #include "common.h"
-#include "drm.h"
+#include "drm-common.h"
 
 
 #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
-- 
2.11.1



More information about the mesa-dev mailing list