The description looked up the message of whatever errno was set when the description was built, so an error printed later read "Success (errno 28)".
23 lines
378 B
C
23 lines
378 B
C
#ifndef CINOTIFY_H
|
|
#define CINOTIFY_H
|
|
|
|
#include <stdlib.h>
|
|
#include <sys/inotify.h>
|
|
#include <unistd.h>
|
|
#include <errno.h>
|
|
#include <string.h>
|
|
|
|
static inline int cinotify_deinit(int fd) {
|
|
return close(fd);
|
|
}
|
|
|
|
static inline int cinotify_get_errno(void) {
|
|
return errno;
|
|
}
|
|
|
|
static inline char* cinotify_error_message(int error_number) {
|
|
return strerror(error_number);
|
|
}
|
|
|
|
#endif
|