svn commit: r202125 - head/sys/ufs/ffs
Kirk McKusick
mckusick at FreeBSD.org
Mon Jan 11 22:42:07 UTC 2010
Author: mckusick
Date: Mon Jan 11 22:42:06 2010
New Revision: 202125
URL: http://svn.freebsd.org/changeset/base/202125
Log:
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
Modified:
head/sys/ufs/ffs/ffs_alloc.c
Modified: head/sys/ufs/ffs/ffs_alloc.c
==============================================================================
--- head/sys/ufs/ffs/ffs_alloc.c Mon Jan 11 22:35:19 2010 (r202124)
+++ head/sys/ufs/ffs/ffs_alloc.c Mon Jan 11 22:42:06 2010 (r202125)
@@ -2689,7 +2689,7 @@ sysctl_ffs_fsck(SYSCTL_HANDLER_ARGS)
if (fsckcmds) {
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);
printf("%s: unlink %s (inode %jd)\n",
mp->mnt_stat.f_mntonname, buf, (intmax_t)cmd.size);
@@ -2702,7 +2702,7 @@ sysctl_ffs_fsck(SYSCTL_HANDLER_ARGS)
*/
vn_finished_write(mp);
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);
break;
More information about the svn-src-head
mailing list