From a95af5acd4f2591e2c0d42f0284897cd3de90230 Mon Sep 17 00:00:00 2001 From: David Sommerseth Date: Thu, 18 Jun 2009 15:00:57 +0200 Subject: Added dmidump utility This is a simple utility which dumps DMI/SMBIOS data straight to a file, written i C and should not depend on anything extra. Useful to get DMI/SMBIOS data without installing python and/or python-dmidecode. The data dump can be parsed by python-dmidecode later on on a different box. --- src/dmidump.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src') diff --git a/src/dmidump.c b/src/dmidump.c index 4ecbb4d..a07c975 100644 --- a/src/dmidump.c +++ b/src/dmidump.c @@ -152,4 +152,17 @@ int dump(const char *memdev, const char *dumpfile) return ret == 0 ? found : ret; } + + +#ifdef _DMIDUMP_MAIN_ +int main(int argc, char **argv) +{ + if( argc != 3 ) { + fprintf(stderr, "Usage: %s \n", argv[0]); + return 1; + } + dump(argv[1], argv[2]); + + return 0; +} #endif -- cgit