Android-x86
Fork
Donation

  • R/O
  • HTTP
  • SSH
  • HTTPS

external-busybox: Commit

external/busybox


Commit MetaInfo

Revisionf72d270ac9eaa45f026a702ac9075e52656d0c28 (tree)
Time2015-03-12 02:13:15
AuthorChih-Wei Huang <cwhuang@linu...>
CommiterChih-Wei Huang

Log Message

xlseek: large file support

This fixes the issue that mke2fs can't format large disks.

Change Summary

Incremental Difference

--- a/include/libbb.h
+++ b/include/libbb.h
@@ -505,7 +505,7 @@ int open_or_warn_stdin(const char *pathname) FAST_FUNC;
505505 int xopen_stdin(const char *pathname) FAST_FUNC;
506506 void xrename(const char *oldpath, const char *newpath) FAST_FUNC;
507507 int rename_or_warn(const char *oldpath, const char *newpath) FAST_FUNC;
508-off_t xlseek(int fd, off_t offset, int whence) FAST_FUNC;
508+off64_t xlseek(int fd, off64_t offset, int whence) FAST_FUNC;
509509 int xmkstemp(char *template) FAST_FUNC;
510510 off_t fdlength(int fd) FAST_FUNC;
511511
--- a/libbb/xfuncs_printf.c
+++ b/libbb/xfuncs_printf.c
@@ -246,12 +246,12 @@ void FAST_FUNC xclose(int fd)
246246 }
247247
248248 // Die with an error message if we can't lseek to the right spot.
249-off_t FAST_FUNC xlseek(int fd, off_t offset, int whence)
249+off64_t FAST_FUNC xlseek(int fd, off64_t offset, int whence)
250250 {
251- off_t off = lseek(fd, offset, whence);
251+ off64_t off = lseek64(fd, offset, whence);
252252 if (off == (off_t)-1) {
253253 if (whence == SEEK_SET)
254- bb_perror_msg_and_die("lseek(%"OFF_FMT"u)", offset);
254+ bb_perror_msg_and_die("lseek(%llu)", offset);
255255 bb_perror_msg_and_die("lseek");
256256 }
257257 return off;
Show on old repository browser