Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/makefs Oops, used size_t when off_t was meant. This...
details: https://anonhg.NetBSD.org/src/rev/13c2945da0a4
branches: trunk
changeset: 789155:13c2945da0a4
user: reinoud <reinoud%NetBSD.org@localhost>
date: Fri Aug 09 11:29:44 2013 +0000
description:
Oops, used size_t when off_t was meant. This results in the 4G file size
modulation seen on 32 bit machines due to size_t being 32 bit there.
While here, also fix compilation errors he@ discovered while compiling on
NetBSD/vax.
diffstat:
usr.sbin/makefs/udf.c | 17 +++++++++++------
1 files changed, 11 insertions(+), 6 deletions(-)
diffs (68 lines):
diff -r ed68455a845b -r 13c2945da0a4 usr.sbin/makefs/udf.c
--- a/usr.sbin/makefs/udf.c Fri Aug 09 09:08:47 2013 +0000
+++ b/usr.sbin/makefs/udf.c Fri Aug 09 11:29:44 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: udf.c,v 1.10 2013/08/06 13:15:30 reinoud Exp $ */
+/* $NetBSD: udf.c,v 1.11 2013/08/09 11:29:44 reinoud Exp $ */
/*
* Copyright (c) 2006, 2008, 2013 Reinoud Zandijk
@@ -30,7 +30,7 @@
#endif
#include <sys/cdefs.h>
-__RCSID("$NetBSD: udf.c,v 1.10 2013/08/06 13:15:30 reinoud Exp $");
+__RCSID("$NetBSD: udf.c,v 1.11 2013/08/09 11:29:44 reinoud Exp $");
#include <stdio.h>
#include <stdlib.h>
@@ -549,7 +549,7 @@
}
static int
-udf_file_inject_blob(union dscrptr *dscr, uint8_t *blob, size_t size)
+udf_file_inject_blob(union dscrptr *dscr, uint8_t *blob, off_t size)
{
struct icb_tag *icb;
struct file_entry *fe;
@@ -646,9 +646,11 @@
const int use_shorts = (context.data_part == context.metadata_part);
uint64_t max_len = UDF_ROUNDDOWN(UDF_EXT_MAXLEN, sector_size);
+ fe = NULL;
+ efe = NULL;
if (udf_rw16(dscr->tag.id) == TAGID_FENTRY) {
fe = &dscr->fe;
- data = fe->data;
+ data = fe->data;
l_ea = fe->l_ea;
l_ad = udf_rw32(fe->l_ad);
icb = &fe->icbtag;
@@ -678,6 +680,9 @@
last_len = 0;
last_lb_num = 0;
last_part_num = 0;
+ last_flags = 0;
+ last_short = NULL;
+ last_long = NULL;
if (l_ad != 0) {
if (use_shorts) {
assert(cur_alloc == UDF_ICB_SHORT_ALLOC);
@@ -764,7 +769,7 @@
static int
udf_append_file_contents(union dscrptr *dscr, struct long_ad *data_icb,
- uint8_t *fdata, size_t flen)
+ uint8_t *fdata, off_t flen)
{
struct long_ad icb;
uint32_t location;
@@ -954,7 +959,7 @@
union dscrptr *dscr;
struct long_ad data_icb;
fsinode *fnode;
- size_t sz, chunk, rd;
+ off_t sz, chunk, rd;
uint8_t *data;
int nblk;
int i, f;
Home |
Main Index |
Thread Index |
Old Index