Skip to content

Commit

Permalink
Linux 6.8に対応
Browse files Browse the repository at this point in the history
Linux 6.8ではstrlcpyが消されている。
torvalds/linux@d262700
  • Loading branch information
Kaz205 committed Mar 3, 2024
1 parent a0015bf commit e01add8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions driver/ptx_chrdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,11 @@ int ptx_chrdev_context_create(const char *name, const char *devname,
return -ENOMEM;

mutex_init(&ctx->lock);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,8,0)
strscpy(ctx->devname, devname, sizeof(ctx->devname));
#else
strlcpy(ctx->devname, devname, sizeof(ctx->devname));
#endif

INIT_LIST_HEAD(&ctx->group_list);

Expand Down

0 comments on commit e01add8

Please sign in to comment.