Patch to handle ENOTSUP
- From: cascardo minaslivre org
- To: gnome-vfs-list gnome org
- Subject: Patch to handle ENOTSUP
- Date: Mon, 29 Jan 2007 01:04:32 -0200
Hello,
I've started writing some support for Extended Attributes for GNOME-VFS.
As my first patch, I've added an errno code in
gnome_vfs_result_from_errno_code. There are lots of other errno codes
that could be converted, but most of them would require other
GnomeVfsResult codes. In fact, there is even a pointer in the code to a
bug in eazel.com (!!!).
I may start updating some other error codes if I am allowed to add other
GnomeVfsResult codes.
Another thing I would like to add, but would imply in adding a lot to
the API would be to set mime-type with the modules/methods. This way,
when dowloading some file, its mime-type would be stored as an extended
attribute based on the mime-type of the original source.
If there is any interest in this feature, I am willing to start working
on it, even if it's not feasible for 2.18. I think at least retrieving
the mime-type would be cool for 2.18.
Regards,
Thadeu Cascardo.
Index: libgnomevfs/gnome-vfs-result.c
===================================================================
--- libgnomevfs/gnome-vfs-result.c (revision 5272)
+++ libgnomevfs/gnome-vfs-result.c (working copy)
@@ -2,6 +2,7 @@
/* gnome-vfs-error.c - Error handling for the GNOME Virtual File System.
Copyright (C) 1999 Free Software Foundation
+ Copyright (C) 2007 Thadeu Lima de Souza Cascardo
The Gnome Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -19,6 +20,10 @@
Boston, MA 02111-1307, USA.
Author: Ettore Perazzoli <ettore gnu org>
+
+ Modified on 2007-01-29 by Thadeu Lima de Souza Cascardo to handle
+ ENOTSUP.
+
*/
#include <config.h>
@@ -143,6 +148,9 @@
#endif
case EXDEV: return GNOME_VFS_ERROR_NOT_SAME_FILE_SYSTEM;
case ENAMETOOLONG: return GNOME_VFS_ERROR_NAME_TOO_LONG;
+#ifdef ENOTSUP
+ case ENOTSUP: return GNOME_VFS_ERROR_NOT_SUPPORTED;
+#endif
/* FIXME bugzilla.eazel.com 1191: To be completed. */
default: return GNOME_VFS_ERROR_GENERIC;
[
Date Prev][Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]