diff options
Diffstat (limited to 'toolbox')
-rw-r--r-- | toolbox/dd.c | 8 | ||||
-rw-r--r-- | toolbox/mount.c | 7 |
2 files changed, 8 insertions, 7 deletions
diff --git a/toolbox/dd.c b/toolbox/dd.c index 350f1d2..a8c12d2 100644 --- a/toolbox/dd.c +++ b/toolbox/dd.c @@ -590,8 +590,8 @@ pos_in(void) /* If not a pipe or tape device, try to seek on it. */ if (!(in.flags & (ISPIPE|ISTAPE))) { - if (lseek(in.fd, - (off_t)in.offset * (off_t)in.dbsz, SEEK_CUR) == -1) { + if (lseek64(in.fd, + (off64_t)in.offset * (off64_t)in.dbsz, SEEK_CUR) == -1) { fprintf(stderr, "%s: seek error: %s", in.name, strerror(errno)); exit(1); @@ -661,8 +661,8 @@ pos_out(void) * have specified the seek operand. */ if (!(out.flags & ISTAPE)) { - if (lseek(out.fd, - (off_t)out.offset * (off_t)out.dbsz, SEEK_SET) == -1) { + if (lseek64(out.fd, + (off64_t)out.offset * (off64_t)out.dbsz, SEEK_SET) == -1) { fprintf(stderr, "%s: seek error: %s\n", out.name, strerror(errno)); exit(1); diff --git a/toolbox/mount.c b/toolbox/mount.c index b7adce2..bcda2a2 100644 --- a/toolbox/mount.c +++ b/toolbox/mount.c @@ -19,7 +19,7 @@ #define LOOPDEV_MAXLEN 64 struct mount_opts { - const char str[8]; + const char str[16]; unsigned long rwmask; unsigned long rwset; unsigned long rwnoset; @@ -65,10 +65,11 @@ static const struct mount_opts options[] = { static void add_extra_option(struct extra_opts *extra, char *s) { int len = strlen(s); - int newlen = extra->used_size + len; + int newlen; if (extra->str) len++; /* +1 for ',' */ + newlen = extra->used_size + len; if (newlen >= extra->alloc_size) { char *new; @@ -79,7 +80,7 @@ static void add_extra_option(struct extra_opts *extra, char *s) extra->str = new; extra->end = extra->str + extra->used_size; - extra->alloc_size = newlen; + extra->alloc_size = newlen + 1; } if (extra->used_size) { |