/*
** SSYNC: Simple minded filesystem sync utility
** Copyright (C) 2002 Michael W. Shaffer <mwshaffer@angrypot.com>
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program (see the file COPYING). If not, write to:
**
** The Free Software Foundation, Inc.
** 59 Temple Place, Suite 330,
** Boston, MA 02111-1307 USA
*/
#ifndef SSYNC_H
#define SSYNC_H
#define SSYNC_VERSION "2.3"
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <utime.h>
#include "hash.h"
#include "log.h"
struct flags {
int no_sync_data;
int no_sync_time;
int no_sync_meta;
int update_only;
int test;
};
extern struct flags flags;
struct stats {
unsigned long dirs;
unsigned long files;
unsigned long links;
unsigned long dirs_updated;
unsigned long regs_updated;
unsigned long lnks_updated;
unsigned long deleted;
unsigned long bytes;
unsigned long kbytes;
unsigned long mbytes;
unsigned long gbytes;
unsigned long tbytes;
unsigned long pbytes;
unsigned long ebytes;
unsigned long unknowns;
unsigned long errors;
};
extern struct stats stats;
extern struct hash_table work;
extern struct hash_table dups;
void ssync_shutdown (void);
int ssync_startup (int argc, char **argv);
void get_bytes (char *buf, unsigned long bufsize);
void process (char *src, struct stat *s, char *dst, struct stat *d);
#endif /* SSYNC_H */
syntax highlighted by Code2HTML, v. 0.9.1