diff options
author | David Sommerseth <davids@redhat.com> | 2009-06-18 15:00:57 +0200 |
---|---|---|
committer | David Sommerseth <davids@redhat.com> | 2009-06-18 15:03:24 +0200 |
commit | a95af5acd4f2591e2c0d42f0284897cd3de90230 (patch) | |
tree | c0ecfc48ed635f11c27336a177df35178cdfb6a1 /src | |
parent | 3849ca0a4abf5eb661758e1341a6e595d3013c2c (diff) | |
download | python-dmidecode-a95af5acd4f2591e2c0d42f0284897cd3de90230.tar.gz python-dmidecode-a95af5acd4f2591e2c0d42f0284897cd3de90230.tar.xz python-dmidecode-a95af5acd4f2591e2c0d42f0284897cd3de90230.zip |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/dmidump.c | 13 |
1 files changed, 13 insertions, 0 deletions
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 </dev/mem device> <destfile>\n", argv[0]); + return 1; + } + dump(argv[1], argv[2]); + + return 0; +} #endif |