@@ -860,7 +860,7 @@ main(int argc, char **argv)
off = mp->m_sb.sb_dblocks * source_blocksize;
off -= sizeof(lb);
- if (pwrite64(target[i].fd, lb, sizeof(lb), off) < 0) {
+ if (pwrite(target[i].fd, lb, sizeof(lb), off) < 0) {
do_log(_("%s: failed to write last block\n"),
progname);
do_log(_("\tIs target \"%s\" too small?\n"),
@@ -141,7 +141,6 @@ typedef u_int64_t xfs_ino_t;
typedef u_int32_t xfs_dev_t;
typedef int64_t xfs_daddr_t;
-#define pwrite64 pwrite
#define fdatasync fsync
#define memalign(a,sz) valloc(sz)
@@ -34,7 +34,6 @@
#define __LITTLE_ENDIAN LITTLE_ENDIAN
/* FreeBSD file API is 64-bit aware */
-#define pwrite64 pwrite
#define fdatasync fsync
#define memalign(a,sz) valloc(sz)
@@ -101,7 +101,7 @@ do_pwrite(
ssize_t buffer_size)
{
if (!vectors)
- return pwrite64(fd, buffer, min(count, buffer_size), offset);
+ return pwrite(fd, buffer, min(count, buffer_size), offset);
return do_pwritev(fd, offset, count, buffer_size);
}
@@ -137,7 +137,7 @@ write_random(
if (bytes == 0)
break;
if (bytes < 0) {
- perror("pwrite64");
+ perror("pwrite");
return -1;
}
ops++;
@@ -175,7 +175,7 @@ write_backward(
if (bytes == 0)
return ops;
if (bytes < 0) {
- perror("pwrite64");
+ perror("pwrite");
return -1;
}
ops++;
@@ -193,7 +193,7 @@ write_backward(
if (bytes == 0)
break;
if (bytes < 0) {
- perror("pwrite64");
+ perror("pwrite");
return -1;
}
ops++;
@@ -228,7 +228,7 @@ write_buffer(
if (bytes == 0)
break;
if (bytes < 0) {
- perror("pwrite64");
+ perror("pwrite");
return -1;
}
ops++;
@@ -1083,16 +1083,16 @@ __write_buf(int fd, void *buf, int len, off64_t offset, int flags)
{
int sts;
- sts = pwrite64(fd, buf, len, offset);
+ sts = pwrite(fd, buf, len, offset);
if (sts < 0) {
int error = errno;
- fprintf(stderr, _("%s: pwrite64 failed: %s\n"),
+ fprintf(stderr, _("%s: pwrite failed: %s\n"),
progname, strerror(error));
if (flags & LIBXFS_B_EXIT)
exit(1);
return -error;
} else if (sts != len) {
- fprintf(stderr, _("%s: error - pwrite64 only %d of %d bytes\n"),
+ fprintf(stderr, _("%s: error - pwrite only %d of %d bytes\n"),
progname, sts, len);
if (flags & LIBXFS_B_EXIT)
exit(1);
@@ -134,7 +134,7 @@ perform_restore(
off64_t off;
off = sb.sb_dblocks * sb.sb_blocksize - sizeof(lb);
- if (pwrite64(dst_fd, lb, sizeof(lb), off) < 0)
+ if (pwrite(dst_fd, lb, sizeof(lb), off) < 0)
fatal("failed to write last block, is target too "
"small? (error: %s)\n", strerror(errno));
}
@@ -146,7 +146,7 @@ perform_restore(
print_progress("%lld MB read", bytes_read >> 20);
for (cur_index = 0; cur_index < mb_count; cur_index++) {
- if (pwrite64(dst_fd, &block_buffer[cur_index <<
+ if (pwrite(dst_fd, &block_buffer[cur_index <<
tmb.mb_blocklog], block_size,
be64_to_cpu(block_index[cur_index]) <<
BBSHIFT) < 0)
@@ -1111,7 +1111,7 @@ zero_old_xfs_structures(
off = 0;
for (i = 1; i < sb.sb_agcount; i++) {
off += sb.sb_agblocks;
- if (pwrite64(xi->dfd, buf, new_sb->sb_sectsize,
+ if (pwrite(xi->dfd, buf, new_sb->sb_sectsize,
off << sb.sb_blocklog) == -1)
break;
}
@@ -5893,8 +5893,8 @@ msgstr "%s: lesen fehlgeschlagen: %s\n"
#: .././libxfs/rdwr.c:502
#, c-format
-msgid "%s: pwrite64 failed: %s\n"
-msgstr "%s: pwrite64 fehlgeschlagen: %s\n"
+msgid "%s: pwrite failed: %s\n"
+msgstr "%s: pwrite fehlgeschlagen: %s\n"
#: .././libxfs/rdwr.c:509
#, c-format
@@ -5940,13 +5940,13 @@ msgstr "%s: błąd - odczytano tylko %d z %d bajtów\n"
#: .././libxfs/rdwr.c:878
#, c-format
-msgid "%s: pwrite64 failed: %s\n"
-msgstr "%s: pwrite64 nie powiodło się: %s\n"
+msgid "%s: pwrite failed: %s\n"
+msgstr "%s: pwrite nie powiodło się: %s\n"
#: .././libxfs/rdwr.c:884
#, c-format
-msgid "%s: error - pwrite64 only %d of %d bytes\n"
-msgstr "%s: błąd - wykonano pwrite64 tylko %d z %d bajtów\n"
+msgid "%s: error - pwrite only %d of %d bytes\n"
+msgstr "%s: błąd - wykonano pwrite tylko %d z %d bajtów\n"
#: .././libxfs/rdwr.c:920
#, c-format
Signed-off-by: Felix Janda <felix.janda@posteo.de> --- copy/xfs_copy.c | 2 +- include/darwin.h | 1 - include/freebsd.h | 1 - io/pwrite.c | 10 +++++----- libxfs/rdwr.c | 6 +++--- mdrestore/xfs_mdrestore.c | 4 ++-- mkfs/xfs_mkfs.c | 2 +- po/de.po | 4 ++-- po/pl.po | 8 ++++---- 9 files changed, 18 insertions(+), 20 deletions(-)