Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
rust-card10
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
R. Nestler
rust-card10
Commits
e9207299
Commit
e9207299
authored
5 years ago
by
rnd
Browse files
Options
Downloads
Patches
Plain Diff
[API] Introduce errno constants.
parent
5df464bc
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
l0dable/src/lib.rs
+44
-0
44 additions, 0 deletions
l0dable/src/lib.rs
with
44 additions
and
0 deletions
l0dable/src/lib.rs
+
44
−
0
View file @
e9207299
...
@@ -58,6 +58,50 @@ pub mod ctypes {
...
@@ -58,6 +58,50 @@ pub mod ctypes {
pub
use
core
::
ffi
::
c_void
;
pub
use
core
::
ffi
::
c_void
;
}
}
pub
mod
errno
{
#![allow(non_snake_case)]
use
crate
::
ctypes
::
c_int
;
pub
const
EPERM
:
c_int
=
1
;
// Operation not permitted
pub
const
ENOENT
:
c_int
=
2
;
// No such file or directory
pub
const
ESRCH
:
c_int
=
3
;
// No such process
pub
const
EINTR
:
c_int
=
4
;
// Interrupted system call
pub
const
EIO
:
c_int
=
5
;
// I/O error
pub
const
ENXIO
:
c_int
=
6
;
// No such device or address
pub
const
E2BIG
:
c_int
=
7
;
// Argument list too long
pub
const
ENOEXEC
:
c_int
=
8
;
// Exec format error
pub
const
EBADF
:
c_int
=
9
;
// Bad file number
pub
const
ECHILD
:
c_int
=
10
;
// No child processes
pub
const
EAGAIN
:
c_int
=
11
;
// Try again
pub
const
ENOMEM
:
c_int
=
12
;
//Out of memory
pub
const
EACCES
:
c_int
=
13
;
//Permission denied
pub
const
EFAULT
:
c_int
=
14
;
//Bad address
pub
const
ENOTBLK
:
c_int
=
15
;
//Block device required
pub
const
EBUSY
:
c_int
=
16
;
//Device or resource busy
pub
const
EEXIST
:
c_int
=
17
;
//File exists
pub
const
EXDEV
:
c_int
=
18
;
//Cross-device link
pub
const
ENODEV
:
c_int
=
19
;
//No such device
pub
const
ENOTDIR
:
c_int
=
20
;
//Not a directory
pub
const
EISDIR
:
c_int
=
21
;
//Is a directory
pub
const
EINVAL
:
c_int
=
22
;
//Invalid argument
pub
const
ENFILE
:
c_int
=
23
;
//File table overflow
pub
const
EMFILE
:
c_int
=
24
;
//Too many open files
pub
const
ENOTTY
:
c_int
=
25
;
//Not a typewriter
pub
const
ETXTBSY
:
c_int
=
26
;
//Text file busy
pub
const
EFBIG
:
c_int
=
27
;
//File too large
pub
const
ENOSPC
:
c_int
=
28
;
//No space left on device
pub
const
ESPIPE
:
c_int
=
29
;
//Illegal seek
pub
const
EROFS
:
c_int
=
30
;
//Read-only file system
pub
const
EMLINK
:
c_int
=
31
;
//Too many links
pub
const
EPIPE
:
c_int
=
32
;
//Broken pipe
pub
const
EDOM
:
c_int
=
33
;
//Math argument out of domain of func
pub
const
ERANGE
:
c_int
=
34
;
//Math result not representable
pub
const
EAFNOSUPPORT
:
c_int
=
97
;
//Address family not supported by protocol
pub
const
ECONNRESET
:
c_int
=
104
;
//Connection timed out
pub
const
ETIMEDOUT
:
c_int
=
110
;
//Connection timed out
pub
const
EINPROGRESS
:
c_int
=
115
;
//Operation now in progress
}
pub
mod
bindings
{
pub
mod
bindings
{
#![allow(non_upper_case_globals)]
#![allow(non_upper_case_globals)]
#![allow(non_camel_case_types)]
#![allow(non_camel_case_types)]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment