extern int platform_check_ismounted(char *, char *, struct stat *, int);
-int logfd;
-char *logfile_name;
-FILE *logerr;
-char LOGFILE_NAME[] = "/var/tmp/xfs_copy.log.XXXXXX";
+static char *logfile_name;
+static FILE *logerr;
+static char LOGFILE_NAME[] = "/var/tmp/xfs_copy.log.XXXXXX";
-char *source_name;
-int source_fd;
+static char *source_name;
+static int source_fd;
-unsigned int source_blocksize; /* source filesystem blocksize */
-unsigned int source_sectorsize; /* source disk sectorsize */
+static unsigned int source_blocksize; /* source filesystem blocksize */
+static unsigned int source_sectorsize; /* source disk sectorsize */
-xfs_agblock_t first_agbno;
+static xfs_agblock_t first_agbno;
-uint64_t barcount[11];
+static uint64_t barcount[11];
-unsigned int num_targets;
-target_control *target;
+static unsigned int num_targets;
+static target_control *target;
-wbuf w_buf;
-wbuf btree_buf;
+static wbuf w_buf;
+static wbuf btree_buf;
-unsigned int kids;
+static unsigned int kids;
-thread_control glob_masks;
-thread_args *targ;
+static thread_control glob_masks;
+static thread_args *targ;
-pthread_mutex_t mainwait;
+static pthread_mutex_t mainwait;
#define ACTIVE 1
#define INACTIVE 2
#define PRE 0x08 /* append strerror string */
#define LAST 0x10 /* final message we print */
-void
+static void
signal_maskfunc(int addset, int newset)
{
sigset_t set;
sigprocmask(newset, &set, NULL);
}
-void
+static void
do_message(int flags, int code, const char *fmt, ...)
{
va_list ap;
return 0;
}
-void
+static void
check_errors(void)
{
int i, first_error = 0;
* don't have to worry about alignment and mins because those
* are taken care of when the buffer's read in
*/
-int
+static int
do_write(
thread_args *args,
wbuf *buf)
return error;
}
-void *
+static void *
begin_reader(void *arg)
{
thread_args *args = arg;
return NULL;
}
-void
+static void
handler(int sig)
{
pid_t pid;
signal(SIGCHLD, handler);
}
-void
+static void
usage(void)
{
fprintf(stderr,
exit(1);
}
-void
+static void
init_bar(uint64_t source_blocks)
{
int i;
barcount[i] = (source_blocks/10)*i;
}
-int
+static int
bump_bar(int tenths, uint64_t numblocks)
{
static char *bar[11] = {
static xfs_off_t source_position = -1;
-wbuf *
+static wbuf *
wbuf_init(wbuf *buf, int data_size, int data_align, int min_io_size, int id)
{
ASSERT(data_size % BBSIZE == 0);
return buf;
}
-void
+static void
read_wbuf(int fd, wbuf *buf, xfs_mount_t *mp)
{
int res = 0;
buf->length = res;
}
-void
+static void
read_ag_header(int fd, xfs_agnumber_t agno, wbuf *buf, ag_header_t *ag,
xfs_mount_t *mp, int blocksize, int sectorsize)
{
}
-void
+static void
write_wbuf(void)
{
int i;
signal_maskfunc(SIGCHLD, SIG_BLOCK);
}
-void
+static void
sb_update_uuid(
xfs_sb_t *sb, /* Original fs superblock */
ag_header_t *ag_hdr, /* AG hdr to update for this copy */
main(int argc, char **argv)
{
int i, j;
+ int logfd;
int howfar = 0;
int open_flags;
xfs_off_t pos;
return 0;
}
-char *
+static char *
next_log_chunk(char *p, int offset, void *private)
{
wbuf *buf = (wbuf *)private;