From: Michal Sojka Date: Thu, 13 Aug 2009 13:19:01 +0000 (+0200) Subject: Use more descriptive error numbers X-Git-Url: http://rtime.felk.cvut.cz/gitweb/frescor/fwp.git/commitdiff_plain/9fc224b887dd884356a1318d419337e26712d1f4 Use more descriptive error numbers --- diff --git a/fwp/lib/fwp/fwp_vres.c b/fwp/lib/fwp/fwp_vres.c index 1bed4c9..7d18567 100644 --- a/fwp/lib/fwp/fwp_vres.c +++ b/fwp/lib/fwp/fwp_vres.c @@ -468,7 +468,7 @@ int fwp_vres_send(fwp_vres_d_t vresd, struct fwp_msgb* msgb) if (fwp_vres_is_valid(vres)) { return fwp_msgq_enqueue(&vres->tx_queue, msgb); } else { - errno = EPERM; /* TODO: Use more appropriate error than EPERM. */ + errno = EINVAL; return -1; } } @@ -487,7 +487,7 @@ int fwp_vres_bind(fwp_vres_d_t vresd, int sockd) } if (fwp_vres_get_flag(vres, FWP_VF_BOUND)) { /*if already bounded */ - errno = EPERM; + errno = EBUSY; rv = -1; goto err; }