From 6014c8f8dbbf7c3a92b67dc2953ecfc8dff0bf9a Mon Sep 17 00:00:00 2001 From: kwm Date: Tue, 11 Aug 2015 16:51:44 +0000 Subject: [PATCH] Instead of defining the actualy user and group id in the drmP.h files define GID_VIDEO in sys/conf.h, and use it together with UID_ROOT to define DRM_DEV_UID and DRM_DEV_GID in the drmP.h files. So there is one place where the UID's and GID's are defined. Submitted by: ed@ Reviewed by: ed@, dumbbell@ Differential Revision: https://reviews.freebsd.org/D3360 --- sys/dev/drm/drmP.h | 4 ++-- sys/dev/drm2/drmP.h | 4 ++-- sys/sys/conf.h | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/sys/dev/drm/drmP.h b/sys/dev/drm/drmP.h index 7ff14954563c..dc7d80404e53 100644 --- a/sys/dev/drm/drmP.h +++ b/sys/dev/drm/drmP.h @@ -174,8 +174,8 @@ SYSCTL_DECL(_hw_drm); #define __OS_HAS_AGP 1 #define DRM_DEV_MODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP) -#define DRM_DEV_UID 0 -#define DRM_DEV_GID 44 /* "video" group */ +#define DRM_DEV_UID UID_ROOT +#define DRM_DEV_GID GID_VIDEO #define wait_queue_head_t atomic_t #define DRM_WAKEUP(w) wakeup((void *)w) diff --git a/sys/dev/drm2/drmP.h b/sys/dev/drm2/drmP.h index 88cb2b78f09f..b110d8bdc8d1 100644 --- a/sys/dev/drm2/drmP.h +++ b/sys/dev/drm2/drmP.h @@ -1592,8 +1592,8 @@ extern int drm_pcie_get_speed_cap_mask(struct drm_device *dev, u32 *speed_mask); SYSCTL_DECL(_hw_drm); #define DRM_DEV_MODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP) -#define DRM_DEV_UID 0 -#define DRM_DEV_GID 44 /* "video" group */ +#define DRM_DEV_UID UID_ROOT +#define DRM_DEV_GID GID_VIDEO #define DRM_WAKEUP(w) wakeup((void *)w) #define DRM_WAKEUP_INT(w) wakeup(w) diff --git a/sys/sys/conf.h b/sys/sys/conf.h index 315551acfb54..d821703b2714 100644 --- a/sys/sys/conf.h +++ b/sys/sys/conf.h @@ -299,6 +299,7 @@ void devfs_free_cdp_inode(ino_t ino); #define GID_OPERATOR 5 #define GID_BIN 7 #define GID_GAMES 13 +#define GID_VIDEO 44 #define GID_DIALER 68 #define GID_NOBODY 65534