diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2023-01-15 13:52:00 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2023-01-15 13:52:00 +0000 |
commit | c69007e5df12e21d1a0eecadb7969a5dbf47e9d8 (patch) | |
tree | 820c8f9978c14c158433612a122c4f3ee0f8325b /sys | |
parent | 57a3a65d06ef80d0b9ecf38f1138a71341d3487b (diff) |
restore strscpy() paths to reduce diff to linux
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 10 | ||||
-rw-r--r-- | sys/dev/pci/drm/drm_client.c | 4 |
2 files changed, 0 insertions, 14 deletions
diff --git a/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 68fb4b90e22..708775aadb1 100644 --- a/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -5312,15 +5312,9 @@ static void fill_audio_info(struct audio_info *audio_info, cea_revision = drm_connector->display_info.cea_rev; -#ifdef __linux__ strscpy(audio_info->display_name, edid_caps->display_name, AUDIO_INFO_DISPLAY_NAME_SIZE_IN_CHARS); -#else - strncpy(audio_info->display_name, - edid_caps->display_name, - AUDIO_INFO_DISPLAY_NAME_SIZE_IN_CHARS - 1); -#endif if (cea_revision >= 3) { audio_info->mode_count = edid_caps->audio_mode_count; @@ -6675,11 +6669,7 @@ amdgpu_dm_create_common_mode(struct drm_encoder *encoder, mode->hdisplay = hdisplay; mode->vdisplay = vdisplay; mode->type &= ~DRM_MODE_TYPE_PREFERRED; -#ifdef __linux__ strscpy(mode->name, name, DRM_DISPLAY_MODE_LEN); -#else - strncpy(mode->name, name, DRM_DISPLAY_MODE_LEN); -#endif return mode; diff --git a/sys/dev/pci/drm/drm_client.c b/sys/dev/pci/drm/drm_client.c index 3d32a9a5a51..2b230b4d694 100644 --- a/sys/dev/pci/drm/drm_client.c +++ b/sys/dev/pci/drm/drm_client.c @@ -391,11 +391,7 @@ static int drm_client_buffer_addfb(struct drm_client_buffer *buffer, /* drop the reference we picked up in framebuffer lookup */ drm_framebuffer_put(buffer->fb); -#ifdef __linux__ strscpy(buffer->fb->comm, client->name, TASK_COMM_LEN); -#else - strlcpy(buffer->fb->comm, client->name, TASK_COMM_LEN); -#endif return 0; } |