Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F145551368
D9371.id24535.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D9371.id24535.diff
View Options
Index: sys/compat/freebsd32/freebsd32_misc.c
===================================================================
--- sys/compat/freebsd32/freebsd32_misc.c
+++ sys/compat/freebsd32/freebsd32_misc.c
@@ -1507,11 +1507,9 @@
int
freebsd32_truncate(struct thread *td, struct freebsd32_truncate_args *uap)
{
- struct truncate_args ap;
- ap.path = uap->path;
- ap.length = PAIR32TO64(off_t,uap->length);
- return (sys_truncate(td, &ap));
+ return (kern_truncate(td, uap->path, UIO_USERSPACE,
+ PAIR32TO64(off_t, uap->length)));
}
int
@@ -1613,11 +1611,9 @@
int
freebsd6_freebsd32_truncate(struct thread *td, struct freebsd6_freebsd32_truncate_args *uap)
{
- struct truncate_args ap;
- ap.path = uap->path;
- ap.length = PAIR32TO64(off_t,uap->length);
- return (sys_truncate(td, &ap));
+ return (kern_truncate(td, uap->path, UIO_USERSPACE,
+ PAIR32TO64(off_t, uap->length)));
}
int
Index: sys/kern/vfs_syscalls.c
===================================================================
--- sys/kern/vfs_syscalls.c
+++ sys/kern/vfs_syscalls.c
@@ -3331,22 +3331,10 @@
};
#endif
int
-otruncate(td, uap)
- struct thread *td;
- register struct otruncate_args /* {
- char *path;
- long length;
- } */ *uap;
+otruncate(struct thread *td, struct otruncate_args *uap)
{
- struct truncate_args /* {
- char *path;
- int pad;
- off_t length;
- } */ nuap;
- nuap.path = uap->path;
- nuap.length = uap->length;
- return (sys_truncate(td, &nuap));
+ return (kern_truncate(td, uap->path, UIO_USERSPACE, uap->length));
}
#endif /* COMPAT_43 */
@@ -3355,11 +3343,8 @@
int
freebsd6_truncate(struct thread *td, struct freebsd6_truncate_args *uap)
{
- struct truncate_args ouap;
- ouap.path = uap->path;
- ouap.length = uap->length;
- return (sys_truncate(td, &ouap));
+ return (kern_truncate(td, uap->path, UIO_USERSPACE, uap->length));
}
int
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Feb 22, 8:53 AM (2 h, 17 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28934976
Default Alt Text
D9371.id24535.diff (1 KB)
Attached To
Mode
D9371: Add kern_truncate().
Attached
Detach File
Event Timeline
Log In to Comment