libiconv: Uncomment iconv_vfs_refcount.
authorAlexander Polakov <polachok@gmail.com>
Fri, 5 Jun 2009 08:04:28 +0000 (12:04 +0400)
committerAlexander Polakov <polachok@gmail.com>
Sat, 5 Sep 2009 09:50:38 +0000 (13:50 +0400)
sys/libiconv/iconv.c
sys/sys/iconv.h

index b3b1e1e..2c172d1 100644 (file)
@@ -518,7 +518,6 @@ iconv_lookupcp(char **cpp, const char *s)
        return ENOENT;
 }
 
-#if 0
 /*
  * Return if fsname is in use of not
  */
@@ -527,9 +526,8 @@ iconv_vfs_refcount(const char *fsname)
 {
        struct vfsconf *vfsp;
 
-       getvfsbyname(fsname, vfsp);
+       vfsp = vfsconf_find_by_name(fsname);
        if (vfsp != NULL && vfsp->vfc_refcount > 0)
                return (EBUSY);
        return (0);
 }
-#endif
index dcbb5df..eed1477 100644 (file)
@@ -169,9 +169,7 @@ int iconv_convchr_case(void *handle, const char **inbuf,
        size_t *inbytesleft, char **outbuf, size_t *outbytesleft, int casetype);
 char* iconv_convstr(void *handle, char *dst, const char *src);
 void* iconv_convmem(void *handle, void *dst, const void *src, int size);
-#if 0
 int iconv_vfs_refcount(const char *fsname);
-#endif
 
 /*
  * Bridge struct of iconv functions
@@ -210,8 +208,7 @@ struct iconv_functions {
                        fsname ## _iconv = & fsname ## _iconv_core;     \
                        break;                                          \
                case MOD_UNLOAD:                                        \
-                       /* error = iconv_vfs_refcount(#fsname); */      \
-                        error = module_lookupbyname(#fsname);           \
+                       error = iconv_vfs_refcount(#fsname);            \
                        if (error)                                      \
                                return (EBUSY);                         \
                        fsname ## _iconv = NULL;                        \