/* $Id$ * gnome-vfs init/shutdown implementation of interface to libntfs * Copyright (C) 2003 Jan Kratochvil * * This program 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 2 of the License, or * (at your option) any later version. * * This program 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 this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "config.h" #include "gnome-vfs-method.h" #include #include #include /* for g_atexit() */ /* filesystem-module-scope lock for _any_ libntfs access */ G_LOCK_DEFINE(libntfs); static void vfs_module_shutdown_atexit(void); /** * vfs_module_init: * @method_name: FIXME * @args: FIXME * * FIXME * * Returns: FIXME */ GnomeVFSMethod *vfs_module_init(const char *method_name,const char *args) { GnomeVFSMethod *libntfs_gnomevfs_method_ptr; g_return_val_if_fail(method_name!=NULL,NULL); /* 'args' may be NULL if not supplied. */ libntfs_gnomevfs_method_ptr=libntfs_gnomevfs_method_init( method_name, /* method_name */ args); /* args */ g_atexit(vfs_module_shutdown_atexit); return libntfs_gnomevfs_method_ptr; } /** * vfs_module_shutdown: */ void vfs_module_shutdown(GnomeVFSMethod *method) { /* 'method' may be NULL iff we are called from vfs_module_shutdown_atexit() */ libntfs_gnomevfs_method_shutdown(); } static void vfs_module_shutdown_atexit(void) { vfs_module_shutdown(NULL); }