t_unsafe.c

説明を見る。
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 int preserve_perms = 0;
00032 
00033 
00034 int
00035 main(int argc, char **argv)
00036 {
00037         if (argc != 3) {
00038                 fprintf(stderr, "usage: t_unsafe LINKDEST SRCDIR\n");
00039                 return 1;
00040         }
00041 
00042         printf("%s\n",
00043                unsafe_symlink(argv[1], argv[2]) ? "unsafe" : "safe");
00044         
00045         return 0;
00046 }

rsyncに対してSat Dec 5 19:45:42 2009に生成されました。  doxygen 1.4.7