aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/lib
Commit message (Collapse)AuthorAgeFilesLines
* clang analyzer: Don't warn about Xmalloc(0)Jeremy Huddleston2016-10-191-1/+1
| | | | | | | | This will prevent a number of false positives in where clang's static analysis reports about calls to malloc(0). Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* Silence clang static analysis warnings for SetReqLenJeremy Huddleston2016-10-191-0/+5
| | | | | | | | | | | | | | | | | | | This provides a simplified version of the SetReqLen macro when using clang for static analysis. Prior to this change, we would see many Idempotent operation warnings inside this macro due to the common case of calling with arg2 and arg3 being the same variable. This has no effect on code produced during compilation, but it silences a number of false positives in static analysis. XIPassiveGrab.c:170:5: warning: Assigned value is always the same as the existing value SetReqLen(req, num_modifiers, num_modifiers); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from XIPassiveGrab.c:26: .../nx-X11/lib/X11/Xlibint.h:580:8: note: instantiated from: n = badlen; \ ^ Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* Fix man page and comment references to use XFreeModifiermap (lowercase map)Alan Coopersmith2016-10-191-1/+1
| | | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* Mark XKeycodeToKeysym as _X_DEPRECATEDJeremy Huddleston2016-10-191-0/+1
| | | | | Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* libX11: Fixing modifier key range in Xutil.h (Bug #21910)Bodo Graumann2016-10-191-1/+1
| | | | | | | | | | | | | | | | | IsModifierKey, defined in include/X11/Xutil.h, is a macro determining, which keys are regarded as modifiers. The constants ISO_Level5_Shift, ISO_Level5_Latch and ISO_Level5_Lock where excluded previously, leaving some Neo2 modifiers functionless in combination with compose. This patch adjusts the range to include the correct, full range of modifier constants. Neo2 Bug 277 <http://wiki.neo-layout.org/ticket/277> X.Org Bug 21910 <http://bugs.freedesktop.org/show_bug.cgi?id=21910> Signed-off-by: Bodo Graumann <mail@bodograumann.de> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* Switch GetEmptyReq and GetResReq to call _XGetRequestPeter Hutterer2016-10-191-30/+6
| | | | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jamey Sharp <jamey@minilop.net> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* include: Add GetReqSized() for request buffers of specific sizePeter Hutterer2016-10-191-0/+12
| | | | | | | | | | Some XI2 requests change in size over different versions and libXi would need to hack around GetReq and GetReqExtra. Add a new GetReqSized so the library can explicitly specify the size of the request in 4-byte units. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jamey Sharp <jamey@minilop.net> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* Use GetReqSized for GetReq and GetReqExtraPeter Hutterer2016-10-191-4/+4
| | | | | | | | | | GetEmptyReq and GetResReq cannot do this due to the final typecast - typically requests that need either of those do not have their own typedef in the protocol headers. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jamey Sharp <jamey@minilop.net> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* ximcp/imRmAttr: Handle leaking missing_listErkki Seppälä2016-10-191-1/+2
| | | | | | | | | | | | Fixed memory leak by adding Xfree and initializing missing_list with NULL Variable "missing_list" goes out of scope Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com> Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* ximcp/imRm: Handle leaking colormap_retErkki Seppälä2016-10-191-0/+4
| | | | | | | | | | | | Fixed memory leak by adding Xfree for colormap_ret Variable "colormap_ret" goes out of scope Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com> Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* ximcp/imTrX: Handle failing XGetWindowPropertyErkki Seppälä2016-10-191-12/+21
| | | | | | | | | | | Checked return value of XGetWindowProperty and return false if it fails. Return value of "XGetWindowProperty(im->core.display, spec->lib_connect_wid, prop, 0L, (length + bytes_after_ret + 3UL) / 4UL, 1, 0UL, &type_ret, &format_ret, &nitems, &bytes_after_ret, &prop_ret)" is not checked Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* ximcp/imLckup: Handle negative return value from _XlcwctombErkki Seppälä2016-10-191-0/+4
| | | | | | | | | | | | | | | | | | Fixed by negative value to memcpy by checking for the negative return value of _Xlcwctomb and returning 0/XLookupNone in that case. a negative value was passed to memcpy Unfortunately the other return values for *status don't fit into the error (which appears to indicate some internal error or running out of memory). The other valid status codes are XBufferOverflow, XLookupNone, XLookupChars, XLookupKeySym, and XLookupBoth. Each of these has a specific meaning attached. Reviewed-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com> Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* lc/def/lcDefConv: Use Xcalloc to avoid use of uninitialized memoryAnder Conselvan de Oliveira2016-10-192-2/+2
| | | | | | | | | | | | | Fixed by zero'ing conv on allocation with Xcalloc. Then close_converter works properly. Using uninitialized value "conv->state" in call to function "close_converter" Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Erkki Seppälä <erkki.seppala@vincit.fi> Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* Fix status reporting for braille patternsSamuel Thibault2016-10-191-6/+20
| | | | | | | | | _XimLocalMbLookupString can return a braille keysym even if _Xlcwctomb can't convert to the current MB charset. _XimLocalUtf8LookupString needs to set the braille keysym and status too. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* Make the Local XIM request key releases for brailleSamuel Thibault2016-10-191-1/+1
| | | | | | | | | Braille chords management needs key release events. We need to explicitly request then, else GTK would not pass them throught XFilterEvent and braille wouldn't work. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* im/ximcp: release modifiermap before returningErkki Seppälä2016-10-191-2/+9
| | | | | | | | | | | Variable "map" goes out of scope Release modifiermap before returning. Reordered code to call XGetModifierMapping after the first return from the function. Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi> Reviewed-by: Dirk Wallenstein <halsmit@t-online.de> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* Fix "attrinute" typo in comments in ximcpAlan Coopersmith2016-10-191-2/+2
| | | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* Fix leaks in _XimEncodingNegotiation error paths.Ander Conselvan de Oliveira2016-10-191-26/+25
| | | | | | | | | name_ptr and detail_ptr weren't free'd in some cases before returning False. Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* Fix memory leaks on _XimProtoCreateIC error paths.Ander Conselvan de Oliveira2016-10-191-2/+2
| | | | | | Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* Fix memory leaks on _XimWriteCachedDefaultTree error paths.Ander Conselvan de Oliveira2016-10-191-1/+4
| | | | | | Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* Fix memory leak on _XimCommitRecv error path.Ander Conselvan de Oliveira2016-10-191-1/+3
| | | | | | Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* Fix memory leaks on _XimCbDispatch error path.Ander Conselvan de Oliveira2016-10-191-0/+2
| | | | | | Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* om: Fix memory leak on read_EncodingInfo error path.Ander Conselvan de Oliveira2016-10-191-1/+3
| | | | | | Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* om: Fix potential memory leak in init_om.Ander Conselvan de Oliveira2016-10-191-10/+12
| | | | | | Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* om: Fix memory leaks on get_font_name error paths.Ander Conselvan de Oliveira2016-10-191-8/+6
| | | | | | | | While at it, remove unneeded check for NULL before Xfree. Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* Fix potential uninitialized variable access in _XimMakeICAttrIDListJeremy Huddleston2016-10-191-2/+5
| | | | | | | Found by clang static analysis Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* Return name instead of value in XGetIMValues() and XSetIMValues()Yann Droneaud2016-10-191-6/+6
| | | | | | | | | | | | | | | | | | As stated in man page (XOpenIM) and Xlib documentation (chapter 13.5.3), XGetIMValues() and XSetImValues() "returns the name of the first argument that could not be obtained." But currently, err = XGetIMValues(im, "invalid", &arg, NULL); returns &arg instead of "invalid". This patch fixes https://bugs.freedesktop.org/show_bug.cgi?id=12897 Signed-off-by: Yann Droneaud <yann@droneaud.fr> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* Return name instead of False in XSetICValues()Yann Droneaud2016-10-191-3/+3
| | | | | | | | | | | | In case of error, XSetICValues() must return the first argument that failed to be set. But in some error paths, it returns False, which is converted to NULL, so the function returns OK in case of error. Signed-off-by: Yann Droneaud <yann@droneaud.fr> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* mbtocs should not truncate inputXue Wei2016-10-191-3/+0
| | | | | | | | Fixes pasting more than 1024 bytes into xterm, as described in https://bugs.freedesktop.org/show_bug.cgi?id=25209 Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* Fix "nomal" -> "normal" typo in several commentsAlan Coopersmith2016-10-191-3/+3
| | | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* XIM: Allow modifier releases in compose sequences (#26705)Andreas Wettstein2016-10-191-10/+42
| | | | | | | | | | | | | | | | | | | | | | | | Currently, only non-modifier keys (actually, keysyms) can be part of a compose sequence, and they are matched against the defined compose sequences at the time the key is pressed. The patch allows to use modifier keys an well, but matches them on key release, and only if no other key has been pressed after the modifier. Releasing a non-matched modifier during an ongoing compose sequence only aborts the sequence if any modifier release would have matched. In particular, if no compose sequences with modifiers are specified, the compose mechanism works exactly as without this patch. Even if modifiers are part of a compose sequence, they are not filtered. This is because modifiers affect the keyboard state no matter what we do here and, therefore, filtering them only could confuse clients. The purpose is this extension to the compose mechanism is to allow to make better use of keys in convenient reach for touch typing. Signed-off-by: Andreas Wettstein <wettstein509@solnet.ch> Signed-off-by: James Cloos <cloos@jhcloos.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* Match braille patterns with compose treeSamuel Thibault2016-10-191-12/+22
| | | | | | | | | Braille patterns should also be usable in Compose. This combines the implementation of braille chords and compose tree: only emit the braille pattern if it can not be found in the compose tree, if any. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* Typo fixPeter Hutterer2016-10-191-1/+1
| | | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* Remove "register" qualifier that annoys Solaris Studio compilerAlan Coopersmith2016-10-191-1/+1
| | | | | | | | Fixes warning: "Xrm.c", line 1094: warning: storage class after type is obsolescent Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* Block for other threads in _XUserLockDisplayKeith Packard2016-10-191-0/+2
| | | | | | | | | | | | Wait for all other threads to release the user-level lock when acquiring it. This ensures that only one thread at a time holds the user-level lock, necessary as it is a nesting lock and a single variable is used to determine when the lock is nesting and when it is contended. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Jamey Sharp <jamey@minilop.net> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* Provide translation from XK_permille (ad5) to Unicode (U2030)Marko Myllynen2016-10-191-1/+1
| | | | | | | | | https://bugs.freedesktop.org/show_bug.cgi?id=19687 Signed-off-by: Marko Myllynen <myllynen@redhat.com> Reviewed-by: Matt Dew <marcoz@osource.org> Signed-off-by: James Cloos <cloos@jhcloos.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* Use pthreads on MinGW alsoRyan Pavlik2016-10-191-3/+1
| | | | | | | | Use pthreads (provided by the pthreads-win32 compatability library which implements them using native Win32 threading) on MinGW Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* XQueryColors: Split a request into multiple requests if necessaryKusanagi Kouichi2016-10-191-4/+27
| | | | | | | | https://bugs.freedesktop.org/show_bug.cgi?id=9160 Signed-off-by: Kusanagi Kouichi <slash@ac.auone-net.jp> Signed-off-by: James Cloos <cloos@jhcloos.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* Reject negative string counts in copy_string_listAlan Coopersmith2016-10-191-1/+1
| | | | | | | | | | | Silences parfait warning of a potential memory leak: Memory leak of pointer 'dst' allocated with malloc(length) at line 160 of FSWrap.c in function 'copy_string_list'. 'dst' allocated at line 145 with malloc(length). dst leaks when count <= 0 at line 154. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* XlcSL.c: convert old-style function definitions to ANSI C89 styleAlan Coopersmith2016-10-191-4/+2
| | | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* Add _XGetRequest as substitute for GetReq/GetReqExtraPeter Hutterer2016-10-191-29/+17
| | | | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jamey Sharp <jamey@minilop.net> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* XIM: Make Xim handle NEED_SYNC_REPLY flagChoe Hwanjin2016-10-195-47/+27
| | | | | | | | | | | | | | | | NEED_SYNC_REPLY flag should be in Xim not in Xic. Because the focused Xic can be changed before sending sync reply. After focused Xic changed, the new Xic doesn't have NEED_SYNC_REPLY flag enabled, so libX11 doesn't send XIM_SYNC_REPLY packet. This patch adds sync reply flag to Xim and removes sync reply from Xic. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=7869 Signed-off-by: Choe Hwanjin <choe.hwanjin@gmail.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* XKB: XkbComputeSectionBounds: Check correct bounds in default switch-caseJeremy Huddleston2016-10-191-1/+2
| | | | | | | | | | | XKBGeom.c:191:25: warning: Access to field 'x1' results in a dereference of a null pointer (loaded from variable 'rbounds') _XkbCheckBounds(bounds,rbounds->x1,rbounds->y1); ^~~~~~~ Found-by: clang static analyzer Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* Dead code removalJeremy Huddleston2016-10-191-1/+0
| | | | | | | | | | | | | XKBGeom.c:118:27: warning: Assigned value is always the same as the existing value for (key=row->keys,pos=k=0;k<row->num_keys;k++,key++) { ~~~^~~~ XKBGeom.c:115:5: warning: Value stored to 'pos' is never read pos= 0; ^ ~ Found-by: clang static analyzer Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* Delete special case code to append "/sparcv9" to i18n module pathAlan Coopersmith2016-10-191-40/+0
| | | | | | | | | | | | | | | Was triggered by defined(__sparcv9) so only built on Solaris SPARC 64-bit. Inconsistent with all other platforms, and a bit overcomplicated. Should anyone need to continue using that path, simply build with a #define POSTLOCALELIBDIR "sparcv9" to get the same result. Fixes Solaris bug 7038737: sparcv9 Xlib looking in wrong path for i18n loadable modules Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* Convert malloc(strlen()); strcpy() sets to strdupAlan Coopersmith2016-10-1915-130/+59
| | | | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* Replace Xmalloc+bzero pairs with Xcalloc callsAlan Coopersmith2016-10-1918-83/+39
| | | | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* Fix memory leaks on _XimGetAttributeID error paths.Ander Conselvan de Oliveira2016-10-191-2/+6
| | | | | | Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* xcms: Fix memory leaks on LINEAR_RGB_InitSCCData error path.Ander Conselvan de Oliveira2016-10-191-3/+3
| | | | | | | | | | | pScreenData is replaced when building per visual intensity tables. If malloc failed the old value of pScreenData (stored also in pScreenDefaultData) was being leaked. Also, property_return wasn't free'd in that case. Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* xcms: Fix error on LINEAR_RGB_InitSCCData error path.Ander Conselvan de Oliveira2016-10-191-1/+1
| | | | | | | | | Due to what looks like a copy & paste error, pScreenData->pBlueTbl would be accessed after being free'd. Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>