Add _GNU_SOURCE define to make sure O_LARGEFILE is defined for
do_dump(), and use O_LARGEFILE when writing files using do_rdump().
Addresses Debian Bug: #412614
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
+2007-04-02 Theodore Tso <tytso@mit.edu>
+
+ * dump.c (do_rdump): Use O_LARGEFILE when creating files. Add a
+ #define of GNU_SOURCE so that the dump and rdump commands
+ work with files > 2GB. (Addresses Debian Bug: #412614)
+
2007-03-29 Theodore Tso <tytso@mit.edu>
* debugfs.c (do_print_working_directory): Handle the case if
* under the terms of the GNU Public License.
*/
+#define _GNU_SOURCE /* for O_LARGEFILE */
+
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
rdump_symlink(ino, inode, fullname);
else if (LINUX_S_ISREG(inode->i_mode)) {
int fd;
- fd = open(fullname, O_WRONLY | O_CREAT | O_TRUNC, S_IRWXU);
+ fd = open(fullname, O_WRONLY | O_CREAT | O_TRUNC | O_LARGEFILE, S_IRWXU);
if (fd == -1) {
com_err("rdump", errno, "while dumping %s", fullname);
goto errout;