Update of /cvsroot/faubackup/faubackup/src
In directory sc8-pr-cvs1:/tmp/cvs-serv4262/src
Modified Files:
faubackup-gather.c faubackup-scatter.c
Log Message:
use generic stat instead of stat64
Index: faubackup-gather.c
===================================================================
RCS file: /cvsroot/faubackup/faubackup/src/faubackup-gather.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** faubackup-gather.c 10 Dec 2003 21:32:45 -0000 1.1
--- faubackup-gather.c 11 Dec 2003 00:09:06 -0000 1.2
***************
*** 20,23 ****
--- 20,24 ----
+ #include "config.h"
#include <sys/types.h>
***************
*** 72,76 ****
static void
! send_inode(struct stat64 *st)
{
unsigned int tmp;
--- 73,77 ----
static void
! send_inode(struct stat *st)
{
unsigned int tmp;
***************
*** 113,117 ****
static void
! gather_blk(char *path, struct stat64 *st)
{
assert( S_ISBLK(st->st_mode) );
--- 114,118 ----
static void
! gather_blk(char *path, struct stat *st)
{
assert( S_ISBLK(st->st_mode) );
***************
*** 123,127 ****
static void
! gather_chr(char *path, struct stat64 *st)
{
assert( S_ISCHR(st->st_mode) );
--- 124,128 ----
static void
! gather_chr(char *path, struct stat *st)
{
assert( S_ISCHR(st->st_mode) );
***************
*** 133,137 ****
static void
! gather_reg(char *path, struct stat64 *st)
{
int fd;
--- 134,138 ----
static void
! gather_reg(char *path, struct stat *st)
{
int fd;
***************
*** 199,203 ****
static void
! gather_lnk(char *path, struct stat64 *st)
{
char link[MAXLEN];
--- 200,204 ----
static void
! gather_lnk(char *path, struct stat *st)
{
char link[MAXLEN];
***************
*** 222,226 ****
static void
! gather_dir(char *path, struct stat64 *st)
{
assert( S_ISDIR(st->st_mode) );
--- 223,227 ----
static void
! gather_dir(char *path, struct stat *st)
{
assert( S_ISDIR(st->st_mode) );
***************
*** 234,242 ****
{
int ret;
! struct stat64 st;
! ret = stat64(".", &st);
if( ret < 0) {
! fprintf(stderr, "%s: stat64(\".\", &st): %s\n",
progname, strerror(errno));
error++;
--- 235,243 ----
{
int ret;
! struct stat st;
! ret = stat(".", &st);
if( ret < 0) {
! fprintf(stderr, "%s: stat(\".\", &st): %s\n",
progname, strerror(errno));
error++;
***************
*** 244,250 ****
}
! ret = lstat64( path, &st );
if( ret < 0) {
! fprintf(stderr, "%s: lstat64 %s: %s\n",
progname, path, strerror(errno));
error++;
--- 245,251 ----
}
! ret = lstat( path, &st );
if( ret < 0) {
! fprintf(stderr, "%s: lstat %s: %s\n",
progname, path, strerror(errno));
error++;
Index: faubackup-scatter.c
===================================================================
RCS file: /cvsroot/faubackup/faubackup/src/faubackup-scatter.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** faubackup-scatter.c 10 Dec 2003 23:30:29 -0000 1.2
--- faubackup-scatter.c 11 Dec 2003 00:09:06 -0000 1.3
***************
*** 19,22 ****
--- 19,24 ----
*/
+ #include "config.h"
+
#include <sys/types.h>
#include <sys/stat.h>
***************
*** 92,99 ****
}
! static struct stat64*
recv_inode()
{
! static struct stat64 st;
unsigned int tmp;
int size64=0;
--- 94,101 ----
}
! static struct stat*
recv_inode()
{
! static struct stat st;
unsigned int tmp;
int size64=0;
***************
*** 180,184 ****
DIR *d;
struct dirent *de;
! struct stat64 st;
time_t lastt;
int ret;
--- 182,186 ----
DIR *d;
struct dirent *de;
! struct stat st;
time_t lastt;
int ret;
***************
*** 218,224 ****
if( *p != '\0') continue;
! ret = lstat64( de->d_name, &st );
if( ret < 0 ) {
! fprintf(stderr, "%s: lstat64(%s, &newst): %s\n",
progname, de->d_name, strerror(errno));
exit(1);
--- 220,226 ----
if( *p != '\0') continue;
! ret = lstat( de->d_name, &st );
if( ret < 0 ) {
! fprintf(stderr, "%s: lstat(%s, &newst): %s\n",
progname, de->d_name, strerror(errno));
exit(1);
***************
*** 368,372 ****
static const int SET_TIME = 4;
static const int SET_LINK_OWNER = 8;
! static const int SET_ALL = SET_OWNER | SET_MODE | SET_TIME;
/*
--- 370,374 ----
static const int SET_TIME = 4;
static const int SET_LINK_OWNER = 8;
! static const int SET_ALL = (SET_OWNER | SET_MODE | SET_TIME);
/*
***************
*** 374,378 ****
*/
static void
! set_perms(char *path, struct stat64 *st, int flags)
{
mode_t mode;
--- 376,380 ----
*/
static void
! set_perms(char *path, struct stat *st, int flags)
{
mode_t mode;
***************
*** 428,432 ****
static void
! scatter_blk(char *path, struct stat64 *st)
{
int ret;
--- 430,434 ----
static void
! scatter_blk(char *path, struct stat *st)
{
int ret;
***************
*** 452,456 ****
static void
! scatter_chr(char *path, struct stat64 *st)
{
int ret;
--- 454,458 ----
static void
! scatter_chr(char *path, struct stat *st)
{
int ret;
***************
*** 476,484 ****
static void
! scatter_reg(char *path, struct stat64 *st)
{
char *actfile;
char *oldfile;
! struct stat64 oldst;
int equal;
long long pos;
--- 478,486 ----
static void
! scatter_reg(char *path, struct stat *st)
{
char *actfile;
char *oldfile;
! struct stat oldst;
int equal;
long long pos;
***************
*** 500,508 ****
*/
! ret = lstat64( oldfile, &oldst );
if( ret < 0 && errno == ENOENT ) {
equal = 0;
} else if( ret < 0 ) {
! fprintf( stderr, "%s: lstat64 %s: %s\n",
progname, oldfile, strerror(errno) );
error++;
--- 502,510 ----
*/
! ret = lstat( oldfile, &oldst );
if( ret < 0 && errno == ENOENT ) {
equal = 0;
} else if( ret < 0 ) {
! fprintf( stderr, "%s: lstat %s: %s\n",
progname, oldfile, strerror(errno) );
error++;
***************
*** 678,682 ****
static void
! scatter_lnk(char *path, struct stat64 *st)
{
char *link;
--- 680,684 ----
static void
! scatter_lnk(char *path, struct stat *st)
{
char *link;
***************
*** 709,713 ****
static void
! scatter_dir(char *path, struct stat64 *st)
{
int ret;
--- 711,715 ----
static void
! scatter_dir(char *path, struct stat *st)
{
int ret;
***************
*** 735,739 ****
{
char *path, *workdir;
! struct stat64 *st;
int ret;
--- 737,741 ----
{
char *path, *workdir;
! struct stat *st;
int ret;
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.