例如 _sopen_s 在磁盘空间不够的时候, 宏 errno 就会返回 ENOSPC(28)
MSDN 文档时只提到以下错误码
errno value | Condition |
---|---|
EACCES | The given path is a directory, or the file is read-only, but an open-for-writing operation was attempted. |
EEXIST | _O_CREAT and _O_EXCL flags were specified, but filename already exists. |
EINVAL | Invalid oflag, shflag, or pmode argument, or pfh or filename was a null pointer. |
EMFILE | No more file descriptors available. |
ENOENT | File or path not found. |