Blame gio/gvfs.c

Packit ae235b
/* GIO - GLib Input, Output and Streaming Library
Packit ae235b
 *
Packit ae235b
 * Copyright (C) 2006-2007 Red Hat, Inc.
Packit ae235b
 *
Packit ae235b
 * This library is free software; you can redistribute it and/or
Packit ae235b
 * modify it under the terms of the GNU Lesser General Public
Packit ae235b
 * License as published by the Free Software Foundation; either
Packit ae235b
 * version 2.1 of the License, or (at your option) any later version.
Packit ae235b
 *
Packit ae235b
 * This library is distributed in the hope that it will be useful,
Packit ae235b
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit ae235b
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit ae235b
 * Lesser General Public License for more details.
Packit ae235b
 *
Packit ae235b
 * You should have received a copy of the GNU Lesser General
Packit ae235b
 * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
Packit ae235b
 *
Packit ae235b
 * Author: Alexander Larsson <alexl@redhat.com>
Packit ae235b
 */
Packit ae235b
Packit ae235b
#include "config.h"
Packit ae235b
#include <string.h>
Packit ae235b
#include "gvfs.h"
Packit ae235b
#include "glib-private.h"
Packit ae235b
#include "glocalvfs.h"
Packit ae235b
#include "gresourcefile.h"
Packit ae235b
#include "giomodule-priv.h"
Packit ae235b
#include "glibintl.h"
Packit ae235b
Packit ae235b
Packit ae235b
/**
Packit ae235b
 * SECTION:gvfs
Packit ae235b
 * @short_description: Virtual File System
Packit ae235b
 * @include: gio/gio.h
Packit ae235b
 *
Packit ae235b
 * Entry point for using GIO functionality.
Packit ae235b
 *
Packit ae235b
 */
Packit ae235b
Packit ae235b
static GRWLock additional_schemes_lock;
Packit ae235b
Packit ae235b
typedef struct _GVfsPrivate {
Packit ae235b
  GHashTable *additional_schemes;
Packit ae235b
  char const **supported_schemes;
Packit ae235b
} GVfsPrivate;
Packit ae235b
Packit ae235b
typedef struct {
Packit ae235b
  GVfsFileLookupFunc uri_func;
Packit ae235b
  gpointer uri_data;
Packit ae235b
  GDestroyNotify uri_destroy;
Packit ae235b
Packit ae235b
  GVfsFileLookupFunc parse_name_func;
Packit ae235b
  gpointer parse_name_data;
Packit ae235b
  GDestroyNotify parse_name_destroy;
Packit ae235b
} GVfsURISchemeData;
Packit ae235b
Packit ae235b
G_DEFINE_TYPE_WITH_PRIVATE (GVfs, g_vfs, G_TYPE_OBJECT)
Packit ae235b
Packit ae235b
static void
Packit ae235b
g_vfs_dispose (GObject *object)
Packit ae235b
{
Packit ae235b
  GVfs *vfs = G_VFS (object);
Packit ae235b
  GVfsPrivate *priv = g_vfs_get_instance_private (vfs);
Packit ae235b
Packit ae235b
  g_clear_pointer (&priv->additional_schemes, g_hash_table_destroy);
Packit ae235b
  g_clear_pointer (&priv->supported_schemes, g_free);
Packit ae235b
Packit ae235b
  G_OBJECT_CLASS (g_vfs_parent_class)->dispose (object);
Packit ae235b
}
Packit ae235b
Packit ae235b
static void
Packit ae235b
g_vfs_class_init (GVfsClass *klass)
Packit ae235b
{
Packit ae235b
  GObjectClass *object_class = G_OBJECT_CLASS (klass);
Packit ae235b
  object_class->dispose = g_vfs_dispose;
Packit ae235b
}
Packit ae235b
Packit ae235b
static GFile *
Packit ae235b
resource_parse_name (GVfs       *vfs,
Packit ae235b
                     const char *parse_name,
Packit ae235b
                     gpointer    user_data)
Packit ae235b
{
Packit ae235b
  if (g_str_has_prefix (parse_name, "resource:"))
Packit ae235b
    return _g_resource_file_new (parse_name);
Packit ae235b
Packit ae235b
  return NULL;
Packit ae235b
}
Packit ae235b
Packit ae235b
static GFile *
Packit ae235b
resource_get_file_for_uri (GVfs       *vfs,
Packit ae235b
                           const char *uri,
Packit ae235b
                           gpointer    user_data)
Packit ae235b
{
Packit ae235b
  return _g_resource_file_new (uri);
Packit ae235b
}
Packit ae235b
Packit ae235b
static void
Packit ae235b
g_vfs_uri_lookup_func_closure_free (gpointer data)
Packit ae235b
{
Packit ae235b
  GVfsURISchemeData *closure = data;
Packit ae235b
Packit ae235b
  if (closure->uri_destroy)
Packit ae235b
    closure->uri_destroy (closure->uri_data);
Packit ae235b
  if (closure->parse_name_destroy)
Packit ae235b
    closure->parse_name_destroy (closure->parse_name_data);
Packit ae235b
Packit ae235b
  g_free (closure);
Packit ae235b
}
Packit ae235b
Packit ae235b
static void
Packit ae235b
g_vfs_init (GVfs *vfs)
Packit ae235b
{
Packit ae235b
  GVfsPrivate *priv = g_vfs_get_instance_private (vfs);
Packit ae235b
  priv->additional_schemes =
Packit ae235b
    g_hash_table_new_full (g_str_hash, g_str_equal,
Packit ae235b
                           g_free, g_vfs_uri_lookup_func_closure_free);
Packit ae235b
Packit ae235b
  g_vfs_register_uri_scheme (vfs, "resource",
Packit ae235b
                             resource_get_file_for_uri, NULL, NULL,
Packit ae235b
                             resource_parse_name, NULL, NULL);
Packit ae235b
}
Packit ae235b
Packit ae235b
/**
Packit ae235b
 * g_vfs_is_active:
Packit ae235b
 * @vfs: a #GVfs.
Packit ae235b
 *
Packit ae235b
 * Checks if the VFS is active.
Packit ae235b
 *
Packit ae235b
 * Returns: %TRUE if construction of the @vfs was successful
Packit ae235b
 *     and it is now active.
Packit ae235b
 */
Packit ae235b
gboolean
Packit ae235b
g_vfs_is_active (GVfs *vfs)
Packit ae235b
{
Packit ae235b
  GVfsClass *class;
Packit ae235b
Packit ae235b
  g_return_val_if_fail (G_IS_VFS (vfs), FALSE);
Packit ae235b
Packit ae235b
  class = G_VFS_GET_CLASS (vfs);
Packit ae235b
Packit ae235b
  return (* class->is_active) (vfs);
Packit ae235b
}
Packit ae235b
Packit ae235b
Packit ae235b
/**
Packit ae235b
 * g_vfs_get_file_for_path:
Packit ae235b
 * @vfs: a #GVfs.
Packit ae235b
 * @path: a string containing a VFS path.
Packit ae235b
 *
Packit ae235b
 * Gets a #GFile for @path.
Packit ae235b
 *
Packit ae235b
 * Returns: (transfer full): a #GFile.
Packit ae235b
 *     Free the returned object with g_object_unref().
Packit ae235b
 */
Packit ae235b
GFile *
Packit ae235b
g_vfs_get_file_for_path (GVfs       *vfs,
Packit ae235b
                         const char *path)
Packit ae235b
{
Packit ae235b
  GVfsClass *class;
Packit ae235b
 
Packit ae235b
  g_return_val_if_fail (G_IS_VFS (vfs), NULL);
Packit ae235b
  g_return_val_if_fail (path != NULL, NULL);
Packit ae235b
Packit ae235b
  class = G_VFS_GET_CLASS (vfs);
Packit ae235b
Packit ae235b
  return (* class->get_file_for_path) (vfs, path);
Packit ae235b
}
Packit ae235b
Packit ae235b
static GFile *
Packit ae235b
parse_name_internal (GVfs       *vfs,
Packit ae235b
                     const char *parse_name)
Packit ae235b
{
Packit ae235b
  GVfsPrivate *priv = g_vfs_get_instance_private (vfs);
Packit ae235b
  GHashTableIter iter;
Packit ae235b
  GVfsURISchemeData *closure;
Packit ae235b
  GFile *ret = NULL;
Packit ae235b
Packit ae235b
  g_rw_lock_reader_lock (&additional_schemes_lock);
Packit ae235b
  g_hash_table_iter_init (&iter, priv->additional_schemes);
Packit ae235b
Packit ae235b
  while (g_hash_table_iter_next (&iter, NULL, (gpointer *) &closure))
Packit ae235b
    {
Packit ae235b
      ret = closure->parse_name_func (vfs, parse_name,
Packit ae235b
                                      closure->parse_name_data);
Packit ae235b
Packit ae235b
      if (ret)
Packit ae235b
        break;
Packit ae235b
    }
Packit ae235b
Packit ae235b
  g_rw_lock_reader_unlock (&additional_schemes_lock);
Packit ae235b
Packit ae235b
  return ret;
Packit ae235b
}
Packit ae235b
Packit ae235b
static GFile *
Packit ae235b
get_file_for_uri_internal (GVfs       *vfs,
Packit ae235b
                           const char *uri)
Packit ae235b
{
Packit ae235b
  GVfsPrivate *priv = g_vfs_get_instance_private (vfs);
Packit ae235b
  GFile *ret = NULL;
Packit ae235b
  char *scheme;
Packit ae235b
  GVfsURISchemeData *closure;
Packit ae235b
Packit ae235b
  scheme = g_uri_parse_scheme (uri);
Packit ae235b
  if (scheme == NULL)
Packit ae235b
    return NULL;
Packit ae235b
Packit ae235b
  g_rw_lock_reader_lock (&additional_schemes_lock);
Packit ae235b
  closure = g_hash_table_lookup (priv->additional_schemes, scheme);
Packit ae235b
Packit ae235b
  if (closure)
Packit ae235b
    ret = closure->uri_func (vfs, uri, closure->uri_data);
Packit ae235b
Packit ae235b
  g_rw_lock_reader_unlock (&additional_schemes_lock);
Packit ae235b
Packit ae235b
  g_free (scheme);
Packit ae235b
  return ret;
Packit ae235b
}
Packit ae235b
Packit ae235b
/**
Packit ae235b
 * g_vfs_get_file_for_uri:
Packit ae235b
 * @vfs: a#GVfs.
Packit ae235b
 * @uri: a string containing a URI
Packit ae235b
 *
Packit ae235b
 * Gets a #GFile for @uri.
Packit ae235b
 *
Packit ae235b
 * This operation never fails, but the returned object
Packit ae235b
 * might not support any I/O operation if the URI
Packit ae235b
 * is malformed or if the URI scheme is not supported.
Packit ae235b
 *
Packit ae235b
 * Returns: (transfer full): a #GFile.
Packit ae235b
 *     Free the returned object with g_object_unref().
Packit ae235b
 */
Packit ae235b
GFile *
Packit ae235b
g_vfs_get_file_for_uri (GVfs       *vfs,
Packit ae235b
                        const char *uri)
Packit ae235b
{
Packit ae235b
  GVfsClass *class;
Packit ae235b
  GFile *ret;
Packit ae235b
 
Packit ae235b
  g_return_val_if_fail (G_IS_VFS (vfs), NULL);
Packit ae235b
  g_return_val_if_fail (uri != NULL, NULL);
Packit ae235b
Packit ae235b
  class = G_VFS_GET_CLASS (vfs);
Packit ae235b
Packit ae235b
  ret = get_file_for_uri_internal (vfs, uri);
Packit ae235b
  if (ret)
Packit ae235b
    return ret;
Packit ae235b
Packit ae235b
  return (* class->get_file_for_uri) (vfs, uri);
Packit ae235b
}
Packit ae235b
Packit ae235b
/**
Packit ae235b
 * g_vfs_get_supported_uri_schemes:
Packit ae235b
 * @vfs: a #GVfs.
Packit ae235b
 *
Packit ae235b
 * Gets a list of URI schemes supported by @vfs.
Packit ae235b
 *
Packit ae235b
 * Returns: (transfer none): a %NULL-terminated array of strings.
Packit ae235b
 *     The returned array belongs to GIO and must
Packit ae235b
 *     not be freed or modified.
Packit ae235b
 */
Packit ae235b
const gchar * const *
Packit ae235b
g_vfs_get_supported_uri_schemes (GVfs *vfs)
Packit ae235b
{
Packit ae235b
  GVfsPrivate *priv;
Packit ae235b
Packit ae235b
  g_return_val_if_fail (G_IS_VFS (vfs), NULL);
Packit ae235b
Packit ae235b
  priv = g_vfs_get_instance_private (vfs);
Packit ae235b
Packit ae235b
  if (!priv->supported_schemes)
Packit ae235b
    {
Packit ae235b
      GVfsClass *class;
Packit ae235b
      const char * const *default_schemes;
Packit ae235b
      const char *additional_scheme;
Packit ae235b
      GPtrArray *supported_schemes;
Packit ae235b
      GHashTableIter iter;
Packit ae235b
Packit ae235b
      class = G_VFS_GET_CLASS (vfs);
Packit ae235b
Packit ae235b
      default_schemes = (* class->get_supported_uri_schemes) (vfs);
Packit ae235b
      supported_schemes = g_ptr_array_new ();
Packit ae235b
Packit ae235b
      for (; default_schemes && *default_schemes; default_schemes++)
Packit ae235b
        g_ptr_array_add (supported_schemes, (gpointer) *default_schemes);
Packit ae235b
Packit ae235b
      g_rw_lock_reader_lock (&additional_schemes_lock);
Packit ae235b
      g_hash_table_iter_init (&iter, priv->additional_schemes);
Packit ae235b
Packit ae235b
      while (g_hash_table_iter_next
Packit ae235b
             (&iter, (gpointer *) &additional_scheme, NULL))
Packit ae235b
        g_ptr_array_add (supported_schemes, (gpointer) additional_scheme);
Packit ae235b
Packit ae235b
      g_rw_lock_reader_unlock (&additional_schemes_lock);
Packit ae235b
Packit ae235b
      g_ptr_array_add (supported_schemes, NULL);
Packit ae235b
Packit ae235b
      g_free (priv->supported_schemes);
Packit ae235b
      priv->supported_schemes =
Packit ae235b
        (char const **) g_ptr_array_free (supported_schemes, FALSE);
Packit ae235b
    }
Packit ae235b
Packit ae235b
  return priv->supported_schemes;
Packit ae235b
}
Packit ae235b
Packit ae235b
/**
Packit ae235b
 * g_vfs_parse_name:
Packit ae235b
 * @vfs: a #GVfs.
Packit ae235b
 * @parse_name: a string to be parsed by the VFS module.
Packit ae235b
 *
Packit ae235b
 * This operation never fails, but the returned object might
Packit ae235b
 * not support any I/O operations if the @parse_name cannot
Packit ae235b
 * be parsed by the #GVfs module.
Packit ae235b
 *
Packit ae235b
 * Returns: (transfer full): a #GFile for the given @parse_name.
Packit ae235b
 *     Free the returned object with g_object_unref().
Packit ae235b
 */
Packit ae235b
GFile *
Packit ae235b
g_vfs_parse_name (GVfs       *vfs,
Packit ae235b
                  const char *parse_name)
Packit ae235b
{
Packit ae235b
  GVfsClass *class;
Packit ae235b
  GFile *ret;
Packit ae235b
Packit ae235b
  g_return_val_if_fail (G_IS_VFS (vfs), NULL);
Packit ae235b
  g_return_val_if_fail (parse_name != NULL, NULL);
Packit ae235b
Packit ae235b
  class = G_VFS_GET_CLASS (vfs);
Packit ae235b
Packit ae235b
  ret = parse_name_internal (vfs, parse_name);
Packit ae235b
  if (ret)
Packit ae235b
    return ret;
Packit ae235b
Packit ae235b
  return (* class->parse_name) (vfs, parse_name);
Packit ae235b
}
Packit ae235b
Packit ae235b
/**
Packit ae235b
 * g_vfs_get_default:
Packit ae235b
 *
Packit ae235b
 * Gets the default #GVfs for the system.
Packit ae235b
 *
Packit ae235b
 * Returns: (transfer none): a #GVfs.
Packit ae235b
 */
Packit ae235b
GVfs *
Packit ae235b
g_vfs_get_default (void)
Packit ae235b
{
Packit ae235b
  if (GLIB_PRIVATE_CALL (g_check_setuid) ())
Packit ae235b
    return g_vfs_get_local ();
Packit ae235b
  return _g_io_module_get_default (G_VFS_EXTENSION_POINT_NAME,
Packit ae235b
                                   "GIO_USE_VFS",
Packit ae235b
                                   (GIOModuleVerifyFunc)g_vfs_is_active);
Packit ae235b
}
Packit ae235b
Packit ae235b
/**
Packit ae235b
 * g_vfs_get_local:
Packit ae235b
 *
Packit ae235b
 * Gets the local #GVfs for the system.
Packit ae235b
 *
Packit ae235b
 * Returns: (transfer none): a #GVfs.
Packit ae235b
 */
Packit ae235b
GVfs *
Packit ae235b
g_vfs_get_local (void)
Packit ae235b
{
Packit ae235b
  static gsize vfs = 0;
Packit ae235b
Packit ae235b
  if (g_once_init_enter (&vfs))
Packit ae235b
    g_once_init_leave (&vfs, (gsize)_g_local_vfs_new ());
Packit ae235b
Packit ae235b
  return G_VFS (vfs);
Packit ae235b
}
Packit ae235b
Packit ae235b
/**
Packit ae235b
 * g_vfs_register_uri_scheme:
Packit ae235b
 * @vfs: a #GVfs
Packit ae235b
 * @scheme: an URI scheme, e.g. "http"
Packit ae235b
 * @uri_func: (scope notified) (nullable): a #GVfsFileLookupFunc
Packit ae235b
 * @uri_data: (nullable): custom data passed to be passed to @uri_func, or %NULL
Packit ae235b
 * @uri_destroy: (nullable): function to be called when unregistering the
Packit ae235b
 *     URI scheme, or when @vfs is disposed, to free the resources used
Packit ae235b
 *     by the URI lookup function
Packit ae235b
 * @parse_name_func: (scope notified) (nullable): a #GVfsFileLookupFunc
Packit ae235b
 * @parse_name_data: (nullable): custom data passed to be passed to
Packit ae235b
 *     @parse_name_func, or %NULL
Packit ae235b
 * @parse_name_destroy: (nullable): function to be called when unregistering the
Packit ae235b
 *     URI scheme, or when @vfs is disposed, to free the resources used
Packit ae235b
 *     by the parse name lookup function
Packit ae235b
 *
Packit ae235b
 * Registers @uri_func and @parse_name_func as the #GFile URI and parse name
Packit ae235b
 * lookup functions for URIs with a scheme matching @scheme.
Packit ae235b
 * Note that @scheme is registered only within the running application, as
Packit ae235b
 * opposed to desktop-wide as it happens with GVfs backends.
Packit ae235b
 *
Packit ae235b
 * When a #GFile is requested with an URI containing @scheme (e.g. through
Packit ae235b
 * g_file_new_for_uri()), @uri_func will be called to allow a custom
Packit ae235b
 * constructor. The implementation of @uri_func should not be blocking, and
Packit ae235b
 * must not call g_vfs_register_uri_scheme() or g_vfs_unregister_uri_scheme().
Packit ae235b
 *
Packit ae235b
 * When g_file_parse_name() is called with a parse name obtained from such file,
Packit ae235b
 * @parse_name_func will be called to allow the #GFile to be created again. In
Packit ae235b
 * that case, it's responsibility of @parse_name_func to make sure the parse
Packit ae235b
 * name matches what the custom #GFile implementation returned when
Packit ae235b
 * g_file_get_parse_name() was previously called. The implementation of
Packit ae235b
 * @parse_name_func should not be blocking, and must not call
Packit ae235b
 * g_vfs_register_uri_scheme() or g_vfs_unregister_uri_scheme().
Packit ae235b
 *
Packit ae235b
 * It's an error to call this function twice with the same scheme. To unregister
Packit ae235b
 * a custom URI scheme, use g_vfs_unregister_uri_scheme().
Packit ae235b
 *
Packit ae235b
 * Returns: %TRUE if @scheme was successfully registered, or %FALSE if a handler
Packit ae235b
 *     for @scheme already exists.
Packit ae235b
 *
Packit ae235b
 * Since: 2.50
Packit ae235b
 */
Packit ae235b
gboolean
Packit ae235b
g_vfs_register_uri_scheme (GVfs              *vfs,
Packit ae235b
                           const char        *scheme,
Packit ae235b
                           GVfsFileLookupFunc uri_func,
Packit ae235b
                           gpointer           uri_data,
Packit ae235b
                           GDestroyNotify     uri_destroy,
Packit ae235b
                           GVfsFileLookupFunc parse_name_func,
Packit ae235b
                           gpointer           parse_name_data,
Packit ae235b
                           GDestroyNotify     parse_name_destroy)
Packit ae235b
{
Packit ae235b
  GVfsPrivate *priv;
Packit ae235b
  GVfsURISchemeData *closure;
Packit ae235b
Packit ae235b
  g_return_val_if_fail (G_IS_VFS (vfs), FALSE);
Packit ae235b
  g_return_val_if_fail (scheme != NULL, FALSE);
Packit ae235b
Packit ae235b
  priv = g_vfs_get_instance_private (vfs);
Packit ae235b
Packit ae235b
  g_rw_lock_reader_lock (&additional_schemes_lock);
Packit ae235b
  closure = g_hash_table_lookup (priv->additional_schemes, scheme);
Packit ae235b
  g_rw_lock_reader_unlock (&additional_schemes_lock);
Packit ae235b
Packit ae235b
  if (closure != NULL)
Packit ae235b
    return FALSE;
Packit ae235b
Packit ae235b
  closure = g_new0 (GVfsURISchemeData, 1);
Packit ae235b
  closure->uri_func = uri_func;
Packit ae235b
  closure->uri_data = uri_data;
Packit ae235b
  closure->uri_destroy = uri_destroy;
Packit ae235b
  closure->parse_name_func = parse_name_func;
Packit ae235b
  closure->parse_name_data = parse_name_data;
Packit ae235b
  closure->parse_name_destroy = parse_name_destroy;
Packit ae235b
Packit ae235b
  g_rw_lock_writer_lock (&additional_schemes_lock);
Packit ae235b
  g_hash_table_insert (priv->additional_schemes, g_strdup (scheme), closure);
Packit ae235b
  g_rw_lock_writer_unlock (&additional_schemes_lock);
Packit ae235b
Packit ae235b
  /* Invalidate supported schemes */
Packit ae235b
  g_clear_pointer (&priv->supported_schemes, g_free);
Packit ae235b
Packit ae235b
  return TRUE;
Packit ae235b
}
Packit ae235b
Packit ae235b
/**
Packit ae235b
 * g_vfs_unregister_uri_scheme:
Packit ae235b
 * @vfs: a #GVfs
Packit ae235b
 * @scheme: an URI scheme, e.g. "http"
Packit ae235b
 *
Packit ae235b
 * Unregisters the URI handler for @scheme previously registered with
Packit ae235b
 * g_vfs_register_uri_scheme().
Packit ae235b
 *
Packit ae235b
 * Returns: %TRUE if @scheme was successfully unregistered, or %FALSE if a
Packit ae235b
 *     handler for @scheme does not exist.
Packit ae235b
 *
Packit ae235b
 * Since: 2.50
Packit ae235b
 */
Packit ae235b
gboolean
Packit ae235b
g_vfs_unregister_uri_scheme (GVfs       *vfs,
Packit ae235b
                             const char *scheme)
Packit ae235b
{
Packit ae235b
  GVfsPrivate *priv;
Packit ae235b
  gboolean res;
Packit ae235b
Packit ae235b
  g_return_val_if_fail (G_IS_VFS (vfs), FALSE);
Packit ae235b
  g_return_val_if_fail (scheme != NULL, FALSE);
Packit ae235b
Packit ae235b
  priv = g_vfs_get_instance_private (vfs);
Packit ae235b
Packit ae235b
  g_rw_lock_writer_lock (&additional_schemes_lock);
Packit ae235b
  res = g_hash_table_remove (priv->additional_schemes, scheme);
Packit ae235b
  g_rw_lock_writer_unlock (&additional_schemes_lock);
Packit ae235b
Packit ae235b
  if (res)
Packit ae235b
    {
Packit ae235b
      /* Invalidate supported schemes */
Packit ae235b
      g_clear_pointer (&priv->supported_schemes, g_free);
Packit ae235b
Packit ae235b
      return TRUE;
Packit ae235b
    }
Packit ae235b
Packit ae235b
  return FALSE;
Packit ae235b
}