diff options
Diffstat (limited to 'extras/errno.c')
-rw-r--r-- | extras/errno.c | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/extras/errno.c b/extras/errno.c deleted file mode 100644 index 050af5b..0000000 --- a/extras/errno.c +++ /dev/null @@ -1,24 +0,0 @@ -/* SPDX-License-Identifier: GPL-3.0+ */ -/* - * Copyright (C) 2022, 2023 Ferass El Hafidi <vitali64pmemail@protonmail.com> - */ -#include <string.h> -#include <errno.h> -#include <stdio.h> -#include <stdlib.h> - -#define REQ_PRINT_USAGE /* Require print_usage() from ../common/common.h */ -#define DESCRIPTION "Give information about error codes." -#define OPERANDS "code" -#include "../common/common.h" - -int main(int argc, char *argv[]) { - long int error_code = 0; - setvbuf(stdout, NULL, _IONBF, 0); - if (argc == 2) { - error_code = strtol(argv[1], NULL, 10); - printf("errno %ld: %s\n", error_code, strerror(error_code)); - } - else return print_usage(argv[0], DESCRIPTION, OPERANDS, VERSION); - return 0; -} |