summaryrefslogtreecommitdiffstats
path: root/dmidecodemodule.c
diff options
context:
space:
mode:
authornima <nima@abc39116-655e-4be6-ad55-d661dc543056>2008-07-01 07:05:57 +0000
committernima <nima@abc39116-655e-4be6-ad55-d661dc543056>2008-07-01 07:05:57 +0000
commita7a5cb531b86a75265f106b91d7033e45d754612 (patch)
tree2550a0c9adc95d3e6286b9ec69fd057491ac8064 /dmidecodemodule.c
parent2a070d8c8e3ea6ca24684a62016a46d928481eb7 (diff)
downloadpython-dmidecode-a7a5cb531b86a75265f106b91d7033e45d754612.tar.gz
python-dmidecode-a7a5cb531b86a75265f106b91d7033e45d754612.tar.xz
python-dmidecode-a7a5cb531b86a75265f106b91d7033e45d754612.zip
Removed junk comments.
git-svn-id: svn://svn.autonomy.net.au/python-dmidecode@6 abc39116-655e-4be6-ad55-d661dc543056
Diffstat (limited to 'dmidecodemodule.c')
-rw-r--r--dmidecodemodule.c98
1 files changed, 0 insertions, 98 deletions
diff --git a/dmidecodemodule.c b/dmidecodemodule.c
index a4ea48f..278a13c 100644
--- a/dmidecodemodule.c
+++ b/dmidecodemodule.c
@@ -81,101 +81,3 @@ static PyObject* dmidecode_xget(PyObject *self, PyObject *args) {
return list;
}
*/
-
-
-/*
-int submain(char* buffer, int argc, char * const argv[])
-{
- int ret=0; /* Returned value * /
- int found=0;
- size_t fp;
- int efi;
- u8 *buf;
-
- if(sizeof(u8)!=1 || sizeof(u16)!=2 || sizeof(u32)!=4 || '\0'!=0)
- {
- fprintf(stderr, "%s: compiler incompatibility\n", argv[0]);
- exit(255);
- }
-
- /* Set default option values * /
- opt.devmem=DEFAULT_MEM_DEV;
- opt.flags=0;
-
- if(parse_command_line(argc, argv)<0)
- {
- ret=2;
- goto exit_free;
- }
-
- if(opt.flags & FLAG_HELP)
- {
- print_help();
- goto exit_free;
- }
-
- if(opt.flags & FLAG_VERSION)
- {
- printf("%s\n", VERSION);
- goto exit_free;
- }
-
- if(!(opt.flags & FLAG_QUIET))
- printf("# dmidecode %s\n", VERSION);
-
- /* First try EFI (ia64, Intel-based Mac) * /
- efi=address_from_efi(&fp);
- switch(efi)
- {
- case EFI_NOT_FOUND:
- goto memory_scan;
- case EFI_NO_SMBIOS:
- ret=1;
- goto exit_free;
- }
-
- if((buf=mem_chunk(fp, 0x20, opt.devmem))==NULL)
- {
- ret=1;
- goto exit_free;
- }
-
- if(smbios_decode(buf, opt.devmem))
- found++;
- goto done;
-
-memory_scan:
- /* Fallback to memory scan (x86, x86_64) * /
- if((buf=mem_chunk(0xF0000, 0x10000, opt.devmem))==NULL)
- {
- ret=1;
- goto exit_free;
- }
-
- for(fp=0; fp<=0xFFF0; fp+=16)
- {
- if(memcmp(buf+fp, "_SM_", 4)==0 && fp<=0xFFE0)
- {
- if(smbios_decode(buf+fp, opt.devmem))
- found++;
- fp+=16;
- }
- else if(memcmp(buf+fp, "_DMI_", 5)==0)
- {
- if (legacy_decode(buf+fp, opt.devmem))
- found++;
- }
- }
-
-done:
- free(buf);
-
- if(!found && !(opt.flags & FLAG_QUIET))
- printf("# No SMBIOS nor DMI entry point found, sorry.\n");
-
-exit_free:
- free(opt.type);
-
- return ret;
-}
-*/