@@ -126,7 +126,6 @@ typedef struct libxfs_xinit {
int bcache_flags; /* cache init flags */
} libxfs_init_t;
-#define LIBXFS_EXIT_ON_FAILURE 0x0001 /* exit the program if a call fails */
#define LIBXFS_ISREADONLY 0x0002 /* disallow all mounted filesystems */
#define LIBXFS_ISINACTIVE 0x0004 /* allow mounted only if mounted ro */
#define LIBXFS_DANGEROUSLY 0x0008 /* repairing a device mounted ro */
@@ -91,7 +91,7 @@ bool xfs_verify_magic(struct xfs_buf *bp, __be32 dmagic);
bool xfs_verify_magic16(struct xfs_buf *bp, __be16 dmagic);
/* b_flags bits */
-#define LIBXFS_B_EXIT 0x0001 /* ==LIBXFS_EXIT_ON_FAILURE */
+#define LIBXFS_B_EXIT 0x0001 /* exit if write fails */
#define LIBXFS_B_DIRTY 0x0002 /* buffer has been modified */
#define LIBXFS_B_STALE 0x0004 /* buffer marked as invalid */
#define LIBXFS_B_UPTODATE 0x0008 /* buffer is sync'd to disk */
@@ -19,7 +19,7 @@
#include "xfs_trans.h"
#include "libfrog/platform.h"
-#include "libxfs.h" /* for LIBXFS_EXIT_ON_FAILURE */
+#include "libxfs.h"
/*
* Important design/architecture note:
@@ -262,7 +262,7 @@ newfile(
if (logit)
libxfs_trans_log_buf(tp, bp, 0, bp->b_bcount - 1);
else
- libxfs_writebuf(bp, LIBXFS_EXIT_ON_FAILURE);
+ libxfs_writebuf(bp, 0);
}
ip->i_d.di_size = len;
return flags;
@@ -3447,7 +3447,7 @@ prepare_devices(
buf = libxfs_getbuf(mp->m_ddev_targp, (xi->dsize - whack_blks),
whack_blks);
memset(buf->b_addr, 0, WHACK_SIZE);
- libxfs_writebuf(buf, LIBXFS_EXIT_ON_FAILURE);
+ libxfs_writebuf(buf, 0);
libxfs_purgebuf(buf);
/*
@@ -3458,7 +3458,7 @@ prepare_devices(
*/
buf = libxfs_getbuf(mp->m_ddev_targp, 0, whack_blks);
memset(buf->b_addr, 0, WHACK_SIZE);
- libxfs_writebuf(buf, LIBXFS_EXIT_ON_FAILURE);
+ libxfs_writebuf(buf, 0);
libxfs_purgebuf(buf);
/* OK, now write the superblock... */
@@ -3466,7 +3466,7 @@ prepare_devices(
buf->b_ops = &xfs_sb_buf_ops;
memset(buf->b_addr, 0, cfg->sectorsize);
libxfs_sb_to_disk(buf->b_addr, sbp);
- libxfs_writebuf(buf, LIBXFS_EXIT_ON_FAILURE);
+ libxfs_writebuf(buf, 0);
libxfs_purgebuf(buf);
/* ...and zero the log.... */
@@ -3486,7 +3486,7 @@ prepare_devices(
XFS_FSB_TO_BB(mp, cfg->rtblocks - 1LL),
BTOBB(cfg->blocksize));
memset(buf->b_addr, 0, cfg->blocksize);
- libxfs_writebuf(buf, LIBXFS_EXIT_ON_FAILURE);
+ libxfs_writebuf(buf, 0);
libxfs_purgebuf(buf);
}
@@ -3583,7 +3583,7 @@ rewrite_secondary_superblocks(
exit(1);
}
XFS_BUF_TO_SBP(buf)->sb_rootino = cpu_to_be64(mp->m_sb.sb_rootino);
- libxfs_writebuf(buf, LIBXFS_EXIT_ON_FAILURE);
+ libxfs_writebuf(buf, 0);
/* and one in the middle for luck if there's enough AGs for that */
if (mp->m_sb.sb_agcount <= 2)
@@ -3599,7 +3599,7 @@ rewrite_secondary_superblocks(
exit(1);
}
XFS_BUF_TO_SBP(buf)->sb_rootino = cpu_to_be64(mp->m_sb.sb_rootino);
- libxfs_writebuf(buf, LIBXFS_EXIT_ON_FAILURE);
+ libxfs_writebuf(buf, 0);
}
static void
@@ -3946,7 +3946,7 @@ main(
if (!buf || buf->b_error)
exit(1);
(XFS_BUF_TO_SBP(buf))->sb_inprogress = 0;
- libxfs_writebuf(buf, LIBXFS_EXIT_ON_FAILURE);
+ libxfs_writebuf(buf, 0);
/* Exit w/ failure if anything failed to get written to our new fs. */
error = -libxfs_umount(mp);