diff options
author | nima <nima@abc39116-655e-4be6-ad55-d661dc543056> | 2008-07-01 06:04:02 +0000 |
---|---|---|
committer | nima <nima@abc39116-655e-4be6-ad55-d661dc543056> | 2008-07-01 06:04:02 +0000 |
commit | 64bcd594dd652d58133ec69659ed89c700e8964c (patch) | |
tree | 41684d8e6f50703f2887df315996497bb12b5268 /dmidecodebin.c | |
parent | eb7958574ce98601433022d7d23343025c1e34b8 (diff) | |
download | python-dmidecode-64bcd594dd652d58133ec69659ed89c700e8964c.tar.gz python-dmidecode-64bcd594dd652d58133ec69659ed89c700e8964c.tar.xz python-dmidecode-64bcd594dd652d58133ec69659ed89c700e8964c.zip |
Better named.
git-svn-id: svn://svn.autonomy.net.au/python-dmidecode@4 abc39116-655e-4be6-ad55-d661dc543056
Diffstat (limited to 'dmidecodebin.c')
-rw-r--r-- | dmidecodebin.c | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/dmidecodebin.c b/dmidecodebin.c new file mode 100644 index 0000000..3046298 --- /dev/null +++ b/dmidecodebin.c @@ -0,0 +1,38 @@ +//. This file now produces the executable `dmidecode', and dynamically links +//. against libdmidecode.so. +#include <Python.h> + +#include <stdio.h> +#include <string.h> +#include <stdlib.h> +#include <unistd.h> + +#include "version.h" +#include "config.h" +#include "types.h" +#include "util.h" +#include "dmidecode.h" +#include "dmiopt.h" +#include "dmioem.h" + +#define EFI_NOT_FOUND (-1) +#define EFI_NO_SMBIOS (-2) + +#include "global.h" +#include "catsprintf.h" + +extern void dmi_dump(struct dmi_header *h, const char *prefix); +extern void dmi_decode(struct dmi_header *h, u16 ver); +extern int address_from_efi(size_t *address); +extern void to_dmi_header(struct dmi_header *h, u8 *data); +extern void dmi_table(u32 base, u16 len, u16 num, u16 ver, const char *devmem); +extern int smbios_decode(u8 *buf, const char *devmem); +extern int legacy_decode(u8 *buf, const char *devmem); +extern int submain(int argc, char * const argv[]); + +int main(int argc, char * const argv[]) { + bzero(buffer, 50000); + int r = submain(argc, argv); + printf("%s", buffer); + return r; +} |