[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE:Help with libstore
From: |
Harley D. Eades III |
Subject: |
RE:Help with libstore |
Date: |
14 Aug 2004 13:02:11 -0500 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 |
> LOL,
> It seems we do detect ENOENT when we can't open a shared lib because
> of it not being there. But, we do still have a problem and it is here
> mod = dlopen (modname, RTLD_LAZY);
> if (mod == NULL)
> {
> const char *errstring = dlerror (); /* Must always call or it leaks! */
> if (errno != ENOENT)
> /* XXX not good, but how else to report the error? */
> error (0, 0, "cannot load %s: %s", modname, errstring);
> }
It seems errno never gets set even tho the shared lib does not exists.
This is the reason for the output of the error.
free (modname);
if (mod == NULL)
return errno ?: ENOENT;
It seems here if mod is NULL return the errno or ENOENT?(Not sure) but it when
printing the error that is return by that return we get ENOSYS.Why?
Thanks
hde
> If the shared lib does not exists shouldn't we return ENOENT and not output
> it using error (..);?
>
> Thanks
> hde
>
> P.S. Sorry about that.
>
>
>
> _______________________________________________
> Bug-hurd mailing list
> Bug-hurd@gnu.org
> http://lists.gnu.org/mailman/listinfo/bug-hurd
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- RE:Help with libstore,
Harley D. Eades III <=