mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-28 09:02:44 +00:00
Cast 64-bit quantity to intptr_t rather than int so as to work properly
with 64-bit architectures (such as amd64). Reported by: bz
This commit is contained in:
parent
fe0518e9ee
commit
53298164b8
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=202125
@ -2689,7 +2689,7 @@ sysctl_ffs_fsck(SYSCTL_HANDLER_ARGS)
|
|||||||
if (fsckcmds) {
|
if (fsckcmds) {
|
||||||
char buf[32];
|
char buf[32];
|
||||||
|
|
||||||
if (copyinstr((char *)(int)cmd.value, buf, 32, NULL))
|
if (copyinstr((char *)(intptr_t)cmd.value, buf,32,NULL))
|
||||||
strncpy(buf, "Name_too_long", 32);
|
strncpy(buf, "Name_too_long", 32);
|
||||||
printf("%s: unlink %s (inode %jd)\n",
|
printf("%s: unlink %s (inode %jd)\n",
|
||||||
mp->mnt_stat.f_mntonname, buf, (intmax_t)cmd.size);
|
mp->mnt_stat.f_mntonname, buf, (intmax_t)cmd.size);
|
||||||
@ -2702,7 +2702,7 @@ sysctl_ffs_fsck(SYSCTL_HANDLER_ARGS)
|
|||||||
*/
|
*/
|
||||||
vn_finished_write(mp);
|
vn_finished_write(mp);
|
||||||
mp = NULL;
|
mp = NULL;
|
||||||
error = kern_unlinkat(td, AT_FDCWD, (char *)(int)cmd.value,
|
error = kern_unlinkat(td, AT_FDCWD, (char *)(intptr_t)cmd.value,
|
||||||
UIO_USERSPACE, (ino_t)cmd.size);
|
UIO_USERSPACE, (ino_t)cmd.size);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user