/[hurd]/hurd/libstore/module.c
ViewVC logotype

Diff of /hurd/libstore/module.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by roland, Thu Mar 14 21:09:49 2002 UTC revision 1.3 by roland, Wed May 8 09:24:31 2002 UTC
# Line 34  open_class (int need_open, Line 34  open_class (int need_open,
34    
35    /* Construct the name of the shared object for this module.  */    /* Construct the name of the shared object for this module.  */
36    if (asprintf (&modname,    if (asprintf (&modname,
37                  "libstore_%.*s%s", clname_end - name, name,                  "libstore_%.*s%s", (int) (clname_end - name), name,
38                  STORE_SONAME_SUFFIX) < 0)                  STORE_SONAME_SUFFIX) < 0)
39      return ENOMEM;      return ENOMEM;
40    
# Line 57  open_class (int need_open, Line 57  open_class (int need_open,
57    if (mod == NULL)    if (mod == NULL)
58      return errno ?: ENOENT;      return errno ?: ENOENT;
59    
60    if (asprintf (&clsym, "store_%.*s_class", clname_end - name, name) < 0)    if (asprintf (&clsym, "store_%.*s_class",
61                    (int) (clname_end - name), name) < 0)
62      {      {
63        dlclose (mod);        dlclose (mod);
64        return ENOMEM;        return ENOMEM;
# Line 68  open_class (int need_open, Line 69  open_class (int need_open,
69    if (*classp == NULL)    if (*classp == NULL)
70      {      {
71        error (0, 0, "invalid store module %.*s: %s",        error (0, 0, "invalid store module %.*s: %s",
72               clname_end - name, name, dlerror ());               (int) (clname_end - name), name, dlerror ());
73        dlclose (mod);        dlclose (mod);
74        return EGRATUITOUS;        return EGRATUITOUS;
75      }      }

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26