You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Laurent Charmet <la...@atempo.com> on 2009/07/16 15:43:44 UTC
simple way to match error code value with error code define ?
Hi,
On linux when filesystem is full, apr_file_write return 28 and windows
return 720112
I don't want to write this code:
res = apr_file_write(...);
if (res != APR_SUCCESS) {
if (res == 28 || res == 720112) {
/* manage fs full */
}
}
What is the right way to do that ? Is there an APR_STATUS_IS_FSFULL()
macro for example ?
Regards,
Laurent
Note: sorry if this mailing list is only for internal Apr dev and not
related to dev using Apr in general
Re: simple way to match error code value with error code define ?
Posted by Laurent Charmet <la...@atempo.com>.
Dan Poirier wrote:
> Laurent Charmet <la...@atempo.com> writes:
>
>
>> On linux when filesystem is full, apr_file_write return 28 and windows
>> return 720112
>>
>>
>> What is the right way to do that ? Is there an APR_STATUS_IS_FSFULL()
>> macro for example ?
>>
>
> Search apr/include/*.h for FULL.
>
>
I find APR_STATUS_IS_ENOSPC. But even if grep is my friend, it's not
obvious to determine that error code 28 or 720112 is manage by
#define APR_STATUS_IS_ENOSPC(s) ((s) == APR_ENOSPC \
|| (s) == APR_OS_START_SYSERR + ERROR_DISK_FULL)
Thx for your answer, and congratulation to all for this very usefull
framework.
Laurent
Re: simple way to match error code value with error code define ?
Posted by Dan Poirier <po...@pobox.com>.
Laurent Charmet <la...@atempo.com> writes:
> On linux when filesystem is full, apr_file_write return 28 and windows
> return 720112
>
>
> What is the right way to do that ? Is there an APR_STATUS_IS_FSFULL()
> macro for example ?
Search apr/include/*.h for FULL.
--
Dan Poirier <po...@pobox.com>