[Cbe-oss-dev] libspe: errno handling
Jeremy Kerr
jk at ozlabs.org
Fri May 11 10:21:33 EST 2007
Hi libspe-ers,
We have a whole heap of this sort of construct in libspe:
priv->fd_spe_dir = spu_create(/* args omitted */);
if (priv->fd_spe_dir < 0) {
/* error handling code omitted*/
errno = EFAULT;
return NULL;
}
ie, we overwrite the kernel's errno with something else.
Is there a reason for this? generally, leaving errno as-is will give
users a much better idea of what went wrong.
Cheers,
Jeremy
More information about the cbe-oss-dev
mailing list