gnunet-fuse

GNUnet file-sharing directory mounting via FUSE
Log | Files | Refs | Submodules | README | LICENSE

commit 38190765534b1d8b88be5da32e94b3f9eb314e0a
parent 4cda9a1b7b28608086b5d22ded05f59b82268cc3
Author: Christian Grothoff <christian@grothoff.org>
Date:   Wed,  6 Jun 2012 21:34:13 +0000

removing dead code

Diffstat:
MINSTALL | 9++-------
Mpo/POTFILES.in | 1-
Msrc/fuse/Makefile.am | 10----------
Dsrc/fuse/gnunet-service-fuse.c | 119-------------------------------------------------------------------------------
Dsrc/fuse/test_fuse_api.c | 70----------------------------------------------------------------------
5 files changed, 2 insertions(+), 207 deletions(-)

diff --git a/INSTALL b/INSTALL @@ -1,8 +1,8 @@ Installation Instructions ************************* -Copyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, -Inc. +Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, +2006, 2007, 2008, 2009 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright @@ -226,11 +226,6 @@ order to use an ANSI C compiler: and if that doesn't work, install pre-built binaries of GCC for HP-UX. - HP-UX `make' updates targets which have the same time stamps as -their prerequisites, which makes it generally unusable when shipped -generated files such as `configure' are involved. Use GNU `make' -instead. - On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot parse its `<wchar.h>' header file. The option `-nodtk' can be used as a workaround. If GNU CC is not installed, it is therefore recommended diff --git a/po/POTFILES.in b/po/POTFILES.in @@ -2,7 +2,6 @@ src/fuse/ext_api.c src/fuse/getattr.c src/fuse/gfs_download.c src/fuse/gnunet-fuse.c -src/fuse/gnunet-service-fuse.c src/fuse/mkdir.c src/fuse/mknod.c src/fuse/mutex.c diff --git a/src/fuse/Makefile.am b/src/fuse/Makefile.am @@ -37,13 +37,3 @@ gnunet_fuse_CPPFLAGS = \ -DFUSE_USE_VERSION=26 -#check_PROGRAMS = \ -# test_fuse_api -# -#TESTS = $(check_PROGRAMS) -# -#test_fuse_api_SOURCES = \ -# test_fuse_api.c -#test_fuse_api_LDADD = \ -# $(top_builddir)/src/ext/libgnunetext.la \ -# -lgnunetutil diff --git a/src/fuse/gnunet-service-fuse.c b/src/fuse/gnunet-service-fuse.c @@ -1,119 +0,0 @@ -/* - This file is part of GNUnet. - (C) - - GNUnet 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 3, or (at your - option) any later version. - - GNUnet 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 GNUnet; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. -*/ - -/** - * @file fuse/gnunet-service-fuse.c - * @brief fuse service implementation - * @author Christian Grothoff - */ -#include <gnunet/platform.h> -#include <gnunet/gnunet_util_lib.h> -#include "gnunet_protocols_fuse.h" - -/** - * Our configuration. - */ -static const struct GNUNET_CONFIGURATION_Handle *cfg; - -/** - * Handle FUSE-message. - * - * @param cls closure - * @param client identification of the client - * @param message the actual message - * @return GNUNET_OK to keep the connection open, - * GNUNET_SYSERR to close it (signal serious error) - */ -static void -handle_ext (void *cls, - struct GNUNET_SERVER_Client *client, - const struct GNUNET_MessageHeader *message) -{ - GNUNET_SERVER_receive_done (client, GNUNET_OK); -} - - -/** - * Task run during shutdown. - * - * @param cls unused - * @param tc unused - */ -static void -shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) -{ -} - - -/** - * A client disconnected. Remove all of its data structure entries. - * - * @param cls closure, NULL - * @param client identification of the client - */ -static void -handle_client_disconnect (void *cls, struct GNUNET_SERVER_Client *client) -{ -} - - -/** - * Process statistics requests. - * - * @param cls closure - * @param server the initialized server - * @param c configuration to use - */ -static void -run (void *cls, - struct GNUNET_SERVER_Handle *server, - const struct GNUNET_CONFIGURATION_Handle *c) -{ - static const struct GNUNET_SERVER_MessageHandler handlers[] = { - {&handle_ext, NULL, GNUNET_MESSAGE_TYPE_FUSE, 0}, - {NULL, NULL, 0, 0} - }; - cfg = c; - GNUNET_SERVER_add_handlers (server, handlers); - GNUNET_SERVER_disconnect_notify (server, &handle_client_disconnect, NULL); - GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, - &shutdown_task, NULL); -} - - -/** - * The main function for the fuse service. - * - * @param argc number of arguments from the command line - * @param argv command line arguments - * @return 0 ok, 1 on error - */ -int -main (int argc, char *const *argv) -{ - return (GNUNET_OK == - GNUNET_SERVICE_run (argc, - argv, - "fuse", - GNUNET_SERVICE_OPTION_NONE, - &run, NULL)) ? 0 : 1; -} - -/* end of gnunet-service-fuse.c */ diff --git a/src/fuse/test_fuse_api.c b/src/fuse/test_fuse_api.c @@ -1,70 +0,0 @@ -/* - This file is part of GNUnet. - (C) - - GNUnet 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 3, or (at your - option) any later version. - - GNUnet 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 GNUnet; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. -*/ -/** - * @file fuse/test_fuse_api.c - * @brief testcase for fuse_api.c - */ -#include <gnunet/platform.h> -#include <gnunet/gnunet_util_lib.h> -#include "gnunet_fuse_service.h" - - -static void -run (void *cls, - char *const *args, - const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *cfg) -{ -} - - -static int -check () -{ - int ok = 1; - char *const argv[] = { "test-fuse-api", NULL }; - struct GNUNET_GETOPT_CommandLineOption options[] = { - GNUNET_GETOPT_OPTION_END - }; - struct GNUNET_OS_Process *proc; - - proc = GNUNET_OS_start_process (NULL, NULL, - "gnunet-service-fuse", - "gnunet-service-fuse", NULL); - GNUNET_assert (NULL != proc); - GNUNET_PROGRAM_run (1, argv, "test-fuse-api", "nohelp", options, &run, &ok); - if (0 != GNUNET_OS_process_kill (proc, SIGTERM)) - { - GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); - ok = 1; - } - GNUNET_OS_process_wait (proc); - GNUNET_OS_process_close (proc); - return ok; -} - - -int -main (int argc, char *argv[]) -{ - GNUNET_log_setup ("test_statistics_api", "WARNING", NULL); - return check (); -} - -/* end of test_fuse_api.c */