Skip to content

Instantly share code, notes, and snippets.

@cvam0000
Last active December 22, 2019 03:58
Show Gist options
  • Save cvam0000/577e505f9fe145a37137dc2f6ba4380e to your computer and use it in GitHub Desktop.
Save cvam0000/577e505f9fe145a37137dc2f6ba4380e to your computer and use it in GitHub Desktop.
if(alloc_memory() != 0 )
return -ENOMEM;
if (user_parameter_valid()!=0)
return -EINVAL;
/*
Some of the examples of the macros are
#define ENOTEMPTY 39 /* Directory not empty */
#define ELOOP 40 /* Too many symbolic links encountered */
#define EWOULDBLOCK EAGAIN /* Operation would block */
#define ENOMSG 42 /* No message of desired type */
#define EIDRM 43 /* Identifier removed */
#define ECHRNG 44 /* Channel number out of range */
#define EL2NSYNC 45 /* Level 2 not synchronized */
#define EL3HLT 46 /* Level 3 halted */
#define EL3RST 47 /* Level 3 reset */
#define ELNRNG 48 /* Link number out of range */
#define EUNATCH 49 /* Protocol driver not attached */
If you want more details about these Errors you can find it here
/usr/include/asm-generic/errno.h
/usr/include/asm-generic/errno-base.h
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment