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

Bugfix constants with no comma at EOL #3

Merged
merged 1 commit into from Feb 10, 2015
Merged

Bugfix constants with no comma at EOL #3

merged 1 commit into from Feb 10, 2015

Conversation

ksallberg
Copy link
Contributor

Fixed problem, script did not include the value of
constants with no comma at end of line. Also
included a usage comment in the script.

Fixed problem, script did not include the value of
constants with no comma at end of line. Also
included a usage comment in the script.
@msantos msantos merged commit 1110a97 into msantos:master Feb 10, 2015
msantos added a commit that referenced this pull request Feb 10, 2015
When a value defined in the header file does not have an exact match for
an Erlang term, exit immediately and write the value to stderr.

Remove preceding/trailing whitespace from the name/values. A trailing
tab caused an empty value to be used as the constant.

Note because of the way shell pipes work (unless set -o pipefail is
used), when the output of the script is piped through "sort | uniq", an
error will not cause the whole pipeline to exit, i.e., the output of the
script preceding the error will be written to libvirt_constants.hrl.

Reported by @ksallberg in:

#2

Builds on the fix also provided by ksallberg in:

#3

Thanks Kristian!
@msantos
Copy link
Owner

msantos commented Feb 10, 2015

Thank you! The problem here was the script was silently failing when it couldn't match the value to convert into a term. I changed the script to fail in this case.

The cause of the term failure was a tab at the end of the line (the ensure_comma() function adds a comma to the input if one isn't there). I folded in your tab substitution.

Thanks again for catching this and for the fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants