Skip to content
Commit fd9102a9 authored by Kir Kolyshkin's avatar Kir Kolyshkin Committed by Cyrill Gorcunov
Browse files

gen-offsets.h: refactor



These changes are mostly for better readability and style.
The only actual difference (in the output produced) is the last item.

(1) Use UPPERCASE variable names

(2) Simplify names (get rid of name_ prefix for everything)

(3) Rename variables:
- name_ifndef to INC_GUARD,
- name_prefix_offset to PREFIX,
- name_bin to BINARY.

(4) Replace sed with tr for simplicity

(5) Replace grep with awk condition

(6) Don't escape every $ and " inside AWK_CMD, just quote the full string

(7) Use cat and 'here document' instead of many echoes

(8) Simplify hexdump arguments, use single -e option

(9) Insert our name into 'Generated by' comment.

Signed-off-by: default avatarKir Kolyshkin <kir@openvz.org>
Signed-off-by: default avatarCyrill Gorcunov <gorcunov@openvz.org>
parent 8a8ce9b3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment