Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions deploy/gen_messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,27 @@ class %(fac)s%(msgnam)s(%(fac)sException):%(depr)s
\t}
}"""

# The status code is 32 bits, with these three fields:
# 16 bit facility code in high order bits,
# 13 bit message number,
# 3 bit severity (low order bits).
#
# The severity scheme is similar to that used by VAX VMS.
# Every odd severity is a flavor of success ("status & 0x1" is easy check).
# Every even severity is a flavor of error.
# W = warning = 0 -- bad
# S = success = 1 -- OK
# E = error = 2 -- bad
# I = info = 3 -- OK
# F = fatal = 4 -- bad
# ? = unused = 5 -- OK
# ? = unused = 6 -- bad
# ? = internal = 7 -- OK (see usage in mdsshr/mdsshr_messages.xml)
#
# SsINTERNAL is merely a synonym for -1; it is not a status code.
# If the status variable is ever erroneously set to SsINTERNAL, note
# that the STATUS_OK macro will treat it as success (because the low-order
# bit is set). See PR #2617 for details.

import xml.etree.ElementTree as ET
import sys
Expand Down
1 change: 1 addition & 0 deletions mdsshr/mdsshr_messages.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<facility name="Ss" value="0">
<status name="SUCCESS" value="0" severity="Success" text="Success"/>
<status name="INTOVF" value="143" severity="Fatal" text="Integer overflow"/>
<!-- SsINTERNAL is merely a synonym for -1 (i.e., 0xFFFFFFFF). It is not a status code and should not be used with STATUS_OK, etc. -->
<status name="INTERNAL" value="-1" severity="Internal" text="This status is meant for internal use only, you should never have seen this message."/>
</facility>
</messages>