mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2025-12-20 04:40:09 +01:00
OpenBSD: fix FTBS on misspelled and missing variables
../xf86drm.c:4622:9: error: use of undeclared identifier 'written'; did you mean 'write'?
if (written + 1 > max_node_length)
^~~~~~~
write
../xf86drm.c:4624:21: error: use of undeclared identifier 'sbuf'; did you mean 'sbrk'?
if (stat(node, &sbuf))
^~~~
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
parent
7f20912b1b
commit
0cd18d0dfb
1 changed files with 3 additions and 2 deletions
|
|
@ -4595,6 +4595,7 @@ drm_public int drmGetDeviceFromDevId(dev_t find_rdev, uint32_t flags, drmDeviceP
|
|||
int node_type, subsystem_type;
|
||||
int maj, min, n, ret;
|
||||
const int max_node_length = ALIGN(drmGetMaxNodeName(), sizeof(void *));
|
||||
struct stat sbuf;
|
||||
|
||||
if (device == NULL)
|
||||
return -EINVAL;
|
||||
|
|
@ -4619,8 +4620,8 @@ drm_public int drmGetDeviceFromDevId(dev_t find_rdev, uint32_t flags, drmDeviceP
|
|||
n = snprintf(node, PATH_MAX, dev_name, DRM_DIR_NAME, min);
|
||||
if (n == -1 || n >= PATH_MAX)
|
||||
return -errno;
|
||||
if (written + 1 > max_node_length)
|
||||
return -EINVAL
|
||||
if (n + 1 > max_node_length)
|
||||
return -EINVAL;
|
||||
if (stat(node, &sbuf))
|
||||
return -EINVAL;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue