2008年1月15日 星期二

ERR_PTR and IS_ERR

defined in linux/err.h

void *ERR_PTR(long error) :
A function returning a pointer type can return an error value

long IS_ERR(const void *ptr)
test whether a returned pointer is an error code or not:

long PTR_ERR(const void *ptr)
get the actual error code

沒有留言: