Skip to content

Commit

Permalink
Sync with dmidecode 3.6 upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
vit9696 committed May 7, 2024
1 parent 293291d commit 24f3705
Show file tree
Hide file tree
Showing 18 changed files with 1,430 additions and 267 deletions.
3 changes: 3 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Acidanthera dmidecode Changelog
===============================

#### v3.6a
- Synced with dmidecode 51b1ecc2

#### v3.4a
- Synced with dmidecode a1a2258f
- Added Apple Silicon support
Expand Down
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ sbindir = $(prefix)/sbin
mandir = $(prefix)/share/man
man8dir = $(mandir)/man8
docdir = $(prefix)/share/doc/dmidecode
compdir = $(shell pkg-config --variable=completionsdir bash-completion 2>/dev/null || echo $(prefix)/etc/bash_completion.d)

INSTALL := install
INSTALL_DATA := $(INSTALL) -m 644
Expand Down Expand Up @@ -119,9 +120,9 @@ util.o : util.c types.h util.h config.h
strip : $(PROGRAMS)
strip $(PROGRAMS)

install : install-bin install-man install-doc
install : install-bin install-man install-doc install-completion

uninstall : uninstall-bin uninstall-man uninstall-doc
uninstall : uninstall-bin uninstall-man uninstall-doc uninstall-completion

install-bin : $(PROGRAMS)
$(INSTALL_DIR) $(DESTDIR)$(sbindir)
Expand Down
33 changes: 33 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,3 +1,36 @@
Version 3.6 (Wed Apr 24 2024)
- [PORTABILITY] Use -DALIGNMENT_WORKAROUND on arm.
- [PORTABILITY] Read SMBIOS entry point via kenv on DragonFly BSD.
- Support for SMBIOS 3.6.0. This includes new memory device types, new
processor upgrades, and Loongarch support.
- Support for SMBIOS 3.7.0. This includes new port types, new processor
upgrades, new slot characteristics and new fields for memory modules.
- Add bash completion.
- Decode HPE OEM records 197, 239 and 245.
- Implement options --list-strings and --list-types.
- Update HPE OEM records 203, 212, 216, 221, 233, 236, 237, 238 and 242.
- Update Redfish support.
- Bug fixes:
Fix option --from-dump for user root
Fix enabled slot characteristics not being printed
- Minor improvements:
Print slot width on its own line
Use standard strings for slot width

Version 3.5 (Tue Mar 14 2023)
- Decode HPE OEM records 216, 224, 230, 238 and 242.
- Fortify entry point length checks.
- Add a --no-quirks option.
- Drop the CPUID exception list.
- Do not let --dump-bin overwrite an existing file.
- Ensure /dev/mem is a character device file.
- Bug fixes:
Fix segmentation fault in HPE OEM record 240
- Minor improvements:
Typo fixes
Write the whole dump file at once
Fix a build warning when USE_MMAP isn't set

Version 3.4 (Mon Jun 27 2022)
- Support for SMBIOS 3.4.0. This includes new memory device types, new
processor upgrades, new slot types and characteristics, decoding of memory
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dmidecode

This dmidecode version supports Apple-specific table decoding as well
as native macOS SMBIOS reading through I/O Registry. Synced with
[upstream](git://git.savannah.gnu.org/dmidecode.git) up to a1a2258f.
[upstream](git://git.savannah.gnu.org/dmidecode.git) up to 51b1ecc2.

**INTRODUCTION**

Expand Down
40 changes: 40 additions & 0 deletions completion/biosdecode.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# bash completion for biosdecode -*- shell-script -*-

_comp_cmd_biosdecode() {
local cur prev
COMPREPLY=()
cur=${COMP_WORDS[COMP_CWORD]}
prev=${COMP_WORDS[COMP_CWORD - 1]}

case $prev in
-d | --dev-mem)
: "${cur:=/dev/}"
local IFS=$'\n'
compopt -o filenames
COMPREPLY=($(compgen -f -- "$cur"))
return 0
;;
--pir)
COMPREPLY=($(compgen -W '
full
' -- "$cur"))
return 0
;;
-[hV] | --help | --version)
return 0
;;
esac

if [[ $cur == -* ]]; then
COMPREPLY=($(compgen -W '
--dev-mem
--pir
--help
--version
' -- "$cur"))
return 0
fi

} && complete -F _comp_cmd_biosdecode biosdecode

# ex: filetype=sh
60 changes: 60 additions & 0 deletions completion/dmidecode.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# bash completion for dmidecode -*- shell-script -*-

_comp_cmd_dmidecode() {
local cur prev
COMPREPLY=()
cur=${COMP_WORDS[COMP_CWORD]}
prev=${COMP_WORDS[COMP_CWORD - 1]}

case $prev in
-d | --dev-mem | --dump-bin | --from-dump)
if [[ $prev == -d || $prev == --dev-mem ]]; then
: "${cur:=/dev/}"
fi
local IFS=$'\n'
compopt -o filenames
COMPREPLY=($(compgen -f -- "$cur"))
return 0
;;
-s | --string)
COMPREPLY=($(compgen -W '$("$1" --list-strings)' -- "$cur"))
return 0
;;
-t | --type)
COMPREPLY=($(compgen -W '$("$1" --list-types)' -- "$cur"))
return 0
;;
--dump-bin | --from-dump)
local IFS=$'\n'
compopt -o filenames
COMPREPLY=($(compgen -f -- "$cur"))
return 0
;;
-[hVH] | --help | --version | --handle | --oem-string)
return 0
;;
esac

if [[ $cur == -* ]]; then
COMPREPLY=($(compgen -W '
--dev-mem
--help
--quiet
--string
--list-strings
--type
--list-types
--handle
--dump
--dump-bin
--from-dump
--no-sysfs
--oem-string
--version
' -- "$cur"))
return 0
fi

} && complete -F _comp_cmd_dmidecode dmidecode

# ex: filetype=sh
33 changes: 33 additions & 0 deletions completion/ownership.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# bash completion for ownership -*- shell-script -*-

_comp_cmd_ownership() {
local cur prev
COMPREPLY=()
cur=${COMP_WORDS[COMP_CWORD]}
prev=${COMP_WORDS[COMP_CWORD - 1]}

case $prev in
-d | --dev-mem)
: "${cur:=/dev/}"
local IFS=$'\n'
compopt -o filenames
COMPREPLY=($(compgen -f -- "$cur"))
return 0
;;
-[hV] | --help | --version)
return 0
;;
esac

if [[ $cur == -* ]]; then
COMPREPLY=($(compgen -W '
--dev-mem
--help
--version
' -- "$cur"))
return 0
fi

} && complete -F _comp_cmd_ownership ownership

# ex: filetype=sh
43 changes: 43 additions & 0 deletions completion/vpddecode.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# bash completion for vpddecode -*- shell-script -*-

_comp_cmd_vpddecode() {
local cur prev
COMPREPLY=()
cur=${COMP_WORDS[COMP_CWORD]}
prev=${COMP_WORDS[COMP_CWORD - 1]}

case $prev in
-d | --dev-mem)
: "${cur:=/dev/}"
local IFS=$'\n'
compopt -o filenames
COMPREPLY=($(compgen -f -- "$cur"))
return 0
;;
-s | --string)
COMPREPLY=($(compgen -W '$(
"$1" --string 2>&1 | while IFS=\$'\\n' read -r line ; do
[[ $line == " "* ]] && printf "%s\n" "$line"
done
' -- "$cur"))
return 0
;;
-[hV] | --help | --version)
return 0
;;
esac

if [[ $cur == -* ]]; then
COMPREPLY=($(compgen -W '
--dev-mem
--help
--string
--dump
--version
' -- "$cur"))
return 0
fi

} && complete -F _comp_cmd_vpddecode vpddecode

# ex: filetype=sh
Loading

0 comments on commit 24f3705

Please sign in to comment.