Created
September 20, 2017 21:53
-
-
Save rayddteam/12a0dc2b0ab6f2f05d98e1cef7f92964 to your computer and use it in GitHub Desktop.
Linux has bad errno documentation, so instead of dig for code meaning just do strerror.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
int | |
main(int argc, char **argv) | |
{ | |
if (argc > 1) | |
printf("err %s\n", strerror(atoi(argv[1]))); | |
else | |
printf("Usage: %s errno\n", argv[0]); | |
return (0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment