From 53190862039588d50803bfdac8c61cd09ef97d90 Mon Sep 17 00:00:00 2001 From: jmb Date: Mon, 5 Jan 1998 01:05:15 +0000 Subject: [PATCH] length argument to truncate() in linux emulation was not being set copied to the bsd arguments.. frequently, resulting in files of over 100MB of NULs PR: 386/5044 Reviewed by: jmb Submitted by: (Richard Winkel) rich@math.missouri.edu --- sys/compat/linux/linux_file.c | 3 ++- sys/i386/linux/linux_file.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c index 2dfad3fb5d25..13e752062cdd 100644 --- a/sys/compat/linux/linux_file.c +++ b/sys/compat/linux/linux_file.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: linux_file.c,v 1.16 1997/12/05 19:55:37 bde Exp $ + * $Id: linux_file.c,v 1.17 1997/12/16 18:49:23 eivind Exp $ */ #include "opt_compat.h" @@ -799,6 +799,7 @@ linux_truncate(struct proc *p, struct linux_truncate_args *args) p->p_pid, args->path); #endif bsd.path = args->path; + bsd.length = args->length; return otruncate(p, &bsd); } diff --git a/sys/i386/linux/linux_file.c b/sys/i386/linux/linux_file.c index 2dfad3fb5d25..13e752062cdd 100644 --- a/sys/i386/linux/linux_file.c +++ b/sys/i386/linux/linux_file.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: linux_file.c,v 1.16 1997/12/05 19:55:37 bde Exp $ + * $Id: linux_file.c,v 1.17 1997/12/16 18:49:23 eivind Exp $ */ #include "opt_compat.h" @@ -799,6 +799,7 @@ linux_truncate(struct proc *p, struct linux_truncate_args *args) p->p_pid, args->path); #endif bsd.path = args->path; + bsd.length = args->length; return otruncate(p, &bsd); }