ref: 7e6af6b00ee3034daa6a1a1e9c6cb97c94b57196
dir: /err.c/
#include <ext4.h> char * errno2s(int err) { switch(err){ case EROFS: case EPERM: case EACCES: return "permission denied"; case ENOMEM: return "out of memory"; case ENOENT: return "file not found"; case EISDIR: return "is a directory"; case EIO: return "i/o error"; case ENODEV: case ENXIO: return "no such device"; case E2BIG: return "argument list too long"; case EFAULT: return "bad address"; case EEXIST: return "file exists"; case ENOTDIR: return "not a directory"; case EINVAL: return "invalid argument"; case EFBIG: return "file too large"; case ENOSPC: return "no space left on device"; case EMLINK: return "too many links"; case ERANGE: return "math result not representable"; case ENOTEMPTY: return "directory not empty"; case ENODATA: return "no data available"; case ENOTSUP: return "not supported"; } return "???"; }