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
This commit is contained in:
jmb 1998-01-05 01:05:15 +00:00
parent eea4c07ab4
commit 5319086203
2 changed files with 4 additions and 2 deletions

View File

@ -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);
}

View File

@ -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);
}