Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals   Related Pages  

t_unsafe.c

Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2002 by Martin Pool
00003  * 
00004  * This program is free software; you can redistribute it and/or modify
00005  * it under the terms of the GNU General Public License as published by
00006  * the Free Software Foundation; either version 2 of the License, or
00007  * (at your option) any later version.
00008  * 
00009  * This program is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  * 
00014  * You should have received a copy of the GNU General Public License
00015  * along with this program; if not, write to the Free Software
00016  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00017  */
00018 
00019 /**
00020  * @file 
00021  *
00022  * Test harness for unsafe_symlink().  Not linked into @c rsync itself.
00023  *
00024  * Prints either "safe" or "unsafe" depending on the two arguments.
00025  * Always returns 0 unless something extraordinary happens.
00026  **/
00027 
00028 #include "rsync.h"
00029 
00030 int dry_run, read_only, list_only, verbose;
00031 
00032 
00033 int main(int argc, char **argv)
00034 {
00035         if (argc != 3) {
00036                 fprintf(stderr, "usage: t_unsafe LINKDEST SRCDIR\n");
00037                 return 1;
00038         }
00039 
00040         printf("%s\n",
00041                unsafe_symlink(argv[1], argv[2]) ? "unsafe" : "safe");
00042         
00043         return 0;
00044 }

Generated on Tue Apr 16 12:37:37 2002 for rsync by doxygen1.2.15