X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/d542c20c5fd636c6973b7bcbed6be2bedbed4bcd..e51094b7210fc31fa67cc218c1bd30de841a426e:/t_stub.c diff --git a/t_stub.c b/t_stub.c index 50ca4e19..3104586f 100644 --- a/t_stub.c +++ b/t_stub.c @@ -27,9 +27,10 @@ **/ int modify_window = 0; -struct exclude_struct **server_exclude_list; +int module_id = -1; +struct exclude_list_struct server_exclude_list; - void rprintf(enum logcode UNUSED(code), const char *format, ...) + void rprintf(UNUSED(enum logcode code), const char *format, ...) { va_list ap; va_start(ap, format); @@ -37,6 +38,16 @@ struct exclude_struct **server_exclude_list; va_end(ap); } + void rsyserr(UNUSED(enum logcode code), int errcode, const char *format, ...) +{ + va_list ap; + fputs(RSYNC_NAME ": ", stderr); + va_start(ap, format); + vfprintf(stderr, format, ap); + va_end(ap); + fprintf(stderr, ": %s (%d)\n", strerror(errcode), errcode); +} + void _exit_cleanup(int code, const char *file, int line) { fprintf(stderr, "exit(%d): %s(%d)\n", @@ -44,9 +55,26 @@ struct exclude_struct **server_exclude_list; exit(code); } - int check_exclude(struct exclude_struct **list, char *name, int name_is_dir) + int check_exclude(UNUSED(struct exclude_list_struct *listp), UNUSED(char *name), + UNUSED(int name_is_dir)) { - /* This function doesn't really get called in a test context, so - * just reference our parameters to avoid compiler warnings. */ - return 0 && list && name && name_is_dir; + /* This function doesn't really get called in this test context, so + * just return 0. */ + return 0; } + + char *lp_name(UNUSED(int mod)) +{ + return NULL; +} + + BOOL lp_use_chroot(UNUSED(int mod)) +{ + return 0; +} + + char *lp_path(UNUSED(int mod)) +{ + return NULL; +} +