Skip to content
Snippets Groups Projects
Commit dd09092a authored by Andre Maroneze's avatar Andre Maroneze
Browse files

Merge branch 'fix/libc/stat-missing-errno-codes' into 'master'

[Libc] add a few missing errno codes in stat.h

See merge request frama-c/frama-c!3709
parents 0073da3f 17618aba
No related branches found
No related tags found
No related merge requests found
...@@ -37,8 +37,9 @@ __BEGIN_DECLS ...@@ -37,8 +37,9 @@ __BEGIN_DECLS
\from indirect:path, indirect:path[0 .. strlen(path)], \from indirect:path, indirect:path[0 .. strlen(path)],
indirect:mode; //missing: \from 'filesystem' indirect:mode; //missing: \from 'filesystem'
ensures errno_set: __fc_errno == \old(__fc_errno) || ensures errno_set: __fc_errno == \old(__fc_errno) ||
__fc_errno \in {EACCES, ELOOP, ENAMETOOLONG, ENOENT, __fc_errno \in {EACCES, EINTR, EINVAL, ELOOP,
ENOTDIR, EPERM, EROFS}; ENAMETOOLONG, ENOENT, ENOTDIR, EPERM,
EROFS};
ensures result_ok_or_error: \result == 0 || \result == -1; ensures result_ok_or_error: \result == 0 || \result == -1;
*/ */
extern int chmod(const char *path, mode_t mode); extern int chmod(const char *path, mode_t mode);
...@@ -51,7 +52,7 @@ extern int chmod(const char *path, mode_t mode); ...@@ -51,7 +52,7 @@ extern int chmod(const char *path, mode_t mode);
indirect:mode, indirect:flag; //missing: \from 'filesystem' indirect:mode, indirect:flag; //missing: \from 'filesystem'
ensures errno_set: __fc_errno == \old(__fc_errno) || ensures errno_set: __fc_errno == \old(__fc_errno) ||
__fc_errno \in {EACCES, EBADF, EINTR, EINVAL, ELOOP, __fc_errno \in {EACCES, EBADF, EINTR, EINVAL, ELOOP,
ENAMETOOLONG, ENOENT, EOPNOTSUPP, ENOTDIR, ENAMETOOLONG, ENOENT, ENOTDIR, EOPNOTSUPP,
EPERM, EROFS}; EPERM, EROFS};
ensures result_ok_or_error: \result == 0 || \result == -1; ensures result_ok_or_error: \result == 0 || \result == -1;
*/ */
...@@ -87,7 +88,7 @@ extern int fstat(int fildes, struct stat *buf); ...@@ -87,7 +88,7 @@ extern int fstat(int fildes, struct stat *buf);
\from indirect:fd, indirect:path, indirect:path[0 .. strlen(path)], \from indirect:fd, indirect:path, indirect:path[0 .. strlen(path)],
indirect:flag; //missing: \from 'filesystem' indirect:flag; //missing: \from 'filesystem'
ensures errno_set: __fc_errno == \old(__fc_errno) || ensures errno_set: __fc_errno == \old(__fc_errno) ||
__fc_errno \in {EACCES, EBADF, EINVAL, ELOOP, __fc_errno \in {EACCES, EBADF, EINVAL, EIO, ELOOP,
ENAMETOOLONG, ENOENT, ENOMEM, ENOTDIR, ENAMETOOLONG, ENOENT, ENOMEM, ENOTDIR,
EOVERFLOW}; EOVERFLOW};
ensures result_ok_or_error: \result == 0 || \result == -1; ensures result_ok_or_error: \result == 0 || \result == -1;
......
...@@ -9370,7 +9370,7 @@ extern int select(int nfds, fd_set *readfds, fd_set *writefds, ...@@ -9370,7 +9370,7 @@ extern int select(int nfds, fd_set *readfds, fd_set *writefds,
ensures ensures
errno_set: errno_set:
__fc_errno ≡ \old(__fc_errno) ∨ __fc_errno ≡ \old(__fc_errno) ∨
__fc_errno ∈ {13, 40, 36, 2, 20, 1, 30}; __fc_errno ∈ {13, 4, 22, 40, 36, 2, 20, 1, 30};
ensures result_ok_or_error: \result ≡ 0 ∨ \result ≡ -1; ensures result_ok_or_error: \result ≡ 0 ∨ \result ≡ -1;
assigns \result, __fc_errno; assigns \result, __fc_errno;
assigns \result assigns \result
...@@ -9386,7 +9386,7 @@ extern int chmod(char const *path, mode_t mode); ...@@ -9386,7 +9386,7 @@ extern int chmod(char const *path, mode_t mode);
ensures ensures
errno_set: errno_set:
__fc_errno ≡ \old(__fc_errno) ∨ __fc_errno ≡ \old(__fc_errno) ∨
__fc_errno ∈ {13, 9, 4, 22, 40, 36, 2, 95, 20, 1, 30}; __fc_errno ∈ {13, 9, 4, 22, 40, 36, 2, 20, 95, 1, 30};
ensures result_ok_or_error: \result ≡ 0 ∨ \result ≡ -1; ensures result_ok_or_error: \result ≡ 0 ∨ \result ≡ -1;
assigns \result, __fc_errno; assigns \result, __fc_errno;
assigns \result assigns \result
...@@ -9427,7 +9427,7 @@ extern int fstat(int fildes, struct stat *buf); ...@@ -9427,7 +9427,7 @@ extern int fstat(int fildes, struct stat *buf);
ensures ensures
errno_set: errno_set:
__fc_errno ≡ \old(__fc_errno) ∨ __fc_errno ≡ \old(__fc_errno) ∨
__fc_errno ∈ {13, 9, 22, 40, 36, 2, 12, 20, 75}; __fc_errno ∈ {13, 9, 22, 5, 40, 36, 2, 12, 20, 75};
ensures result_ok_or_error: \result ≡ 0 ∨ \result ≡ -1; ensures result_ok_or_error: \result ≡ 0 ∨ \result ≡ -1;
assigns \result, *buf, __fc_errno; assigns \result, *buf, __fc_errno;
assigns \result assigns \result
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment