Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement --no-sysfs #26

Closed
jrgerber opened this issue Mar 25, 2021 · 1 comment · Fixed by #33
Closed

Implement --no-sysfs #26

jrgerber opened this issue Mar 25, 2021 · 1 comment · Fixed by #33
Assignees
Labels
enhancement New feature or request

Comments

@jrgerber
Copy link
Owner

       --no-sysfs
          Do not attempt to read DMI data from sysfs files. This is mainly
          useful for debugging.

Read the code to find out what this does exactly: https://github.com/mirror/dmidecode/blob/master/dmidecode.c

@jrgerber jrgerber added the enhancement New feature or request label Mar 25, 2021
@jrgerber
Copy link
Owner Author

The feature apparently is used to test on a *nix system that has both sysfs files and another methodology, forcing other methodologies to be tried.

	if (!(opt.flags & FLAG_NO_SYSFS)
	 && (buf = read_file(0, &size, SYS_ENTRY_FILE)) != NULL)

other methodologies:

	/* Next try EFI (ia64, Intel-based Mac, arm64) */
	efi = address_from_efi(&fp);
	switch (efi)
	{
		case EFI_NOT_FOUND:
			goto memory_scan;
		case EFI_NO_SMBIOS:
			ret = 1;
			goto exit_free;
	}

or:

#if defined __i386__ || defined __x86_64__
	if (!(opt.flags & FLAG_QUIET))
		pr_info("Scanning %s for entry point.", opt.devmem);
	/* Fallback to memory scan (x86, x86_64) */
	if ((buf = mem_chunk(0xF0000, 0x10000, opt.devmem)) == NULL)
	{
		ret = 1;
		goto exit_free;
	}

@jrgerber jrgerber self-assigned this Mar 29, 2021
@jrgerber jrgerber linked a pull request Apr 27, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant