blob: f1c76758ccb9b72ea2c5ed37551518775bd6f1e1 (
plain) (
tree)
|
|
/* See LICENSE file for copyright and license details. */
#include "../libsyscalls.h"
#include <limits.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
int
main(int argc, char *argv[])
{
enum libsyscalls_os os = (enum libsyscalls_os)atoi(argv[1]);
enum libsyscalls_arch arch = (enum libsyscalls_arch)atoi(argv[2]);
enum libsyscalls_datatype type = (enum libsyscalls_datatype)atoi(argv[3]);
struct libsyscalls_datatype_description desc;
enum libsyscalls_error err;
size_t i;
err = libsyscalls_get_datatype_description(os, arch, type, &desc);
if (err == LIBSYSCALLS_E_ISSTRUCT) {
return 0;
} else if (err) {
fprintf(stderr, "libsyscalls_get_datatype_description %s %s %s: ", argv[4], argv[5], argv[6]);
libsyscalls_perror(NULL, err);
return 2;
}
return 1;
}
|