ref: b0bb531412865e658e9a3efbf990d7e5c108d12f
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 "???"; }