summaryrefslogtreecommitdiffstats
path: root/src/corelib/io
Commit message (Collapse)AuthorAgeFilesLines
* QSettings: use QSaveFile and QLockFile to write the settingsOlivier Goffart2014-07-241-235/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | The old unix locking code is no longer working on unix since it locks on a file descriptor, but QSaveFile creates a new file, and as a result we get the lock on the wrong file. Also there is no need to keep the lock held only for reading as QSaveFile is atomic. It just needs to be held when doing a read before writing. As a result, since we don't hold the same lock, there could be a race with an application running an older version of Qt if they are writing on the same configuration file. [ChangeLog][QtCore][QSettings] Fixed data loss while writing the config to the disk fails. [ChangeLog][Important behavior changes] The locking mechanism inside QSettings has changed and is no longer compatible with the one of previous versions of Qt. There might be corruption if two applications running different versions of Qt are writing to the same config file at the same time. You must also now have write permissions in the directory containing the settings file in order to write settings Task-number: QTBUG-21739 Change-Id: I0844a5e96c8bc1e1222a3dac6cc48170ca77fe1b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Make QTextStream respect QLocale with OmitGroupSeparatorsThiago Macieira2014-07-241-1/+1
| | | | | | | | | | | | The default in QTextStream is to use the C locale, so default QTextStream are not affected. When you set a QLocale on it, the default was to use group separators (which is the QLocale default too). This commit makes QTextStream respect a QLocale in which the OmitGroupSeparators option had been set. Task-number: QTBUG-39956 Change-Id: I00fbe12fca7f0287c7217deb487ded6582a03b52 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QSettings: use QStandardPaths to get XDG_CONFIG_HOME.David Faure2014-07-231-0/+6
| | | | | | | | | This allows to use the "test mode" of QStandardPaths in unittests, to stay away from the user's real settings. Change-Id: I1cb1f63a4bff35dfe236924c4dcd7cf761ee50c1 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Support setting a default severity level for QLoggingCategoryKai Koehne2014-07-234-35/+92
| | | | | | | | | | | | | | | | | | | | | | | | | Allow to alter the default configuration for categories by passing a message type: All message types with lower severity are disabled in this category. This is useful for libraries, which shouldn't mess with the category registry itself: Setting rules, a category filter ... might cause conflicts and ordering problems, so this API should be reserved to the specific application. For the Qt categories, we have code in the default category filter that disables the 'debug' category. However, this is hardcoded, and there's no way so far for other libraries to get the same behavior. With this patch one can get the same behavior: Q_LOGGING_CATEGORY(DRIVER_USB_EVENTS, "driver.usb.events", QtWarningMsg); [ChangeLog][QtCore][Logging] Added QtMsgType argument to QLoggingCategory constructor and Q_LOGGING_CATEGORY macro that controls the default category configuration. Change-Id: Ib2902f755f9f7285d79888ec30e8f3cef95ae628 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* QDebugStateSaver: Fix trailing space issuesKai Koehne2014-07-231-1/+8
| | | | | | | | | | | | | | ~QDebug() removes any trailing space if autoInsertSpaces() is true. However, if one uses QDebugStateSaver the global autoInsertSpaces might be false, but a space was added by a custom operator<<. Explicitly check for this in QDebugStateSaverPrivate::restoreState. Remove any trailing space if the local state asks for adding trailing spaces, but the original one doesn't. Add a trailing space if the local state doesn't ask for one, but the global state does. Change-Id: I243b5c76d5ed2c1ec4820da35ab6e254da1551d9 Reviewed-by: David Faure <david.faure@kdab.com>
* QLockFile/Windows: Determine host name from environment variable COMPUTERNAME.Friedemann Kleint2014-07-231-9/+16
| | | | | | | | Useful when using shared directories. Task-number: QTBUG-39967 Change-Id: I2c082e33133b00306378b6ff58478e94119e6a0e Reviewed-by: David Faure <david.faure@kdab.com>
* Be more specific in "Loading logging rules" debug outputKai Koehne2014-07-231-1/+1
| | | | | Change-Id: I8a6f1797cbcfabc6df76ce17115a678f729ac711 Reviewed-by: hjk <hjk121@nokiamail.com>
* Introduce Q_DECL_UNUSED_MEMBER for clangKai Koehne2014-07-232-6/+4
| | | | | | | | | | | | | | | | Since version 3.2, clang warns about unused member variables (-Wunused-private-field). Marking such members with Q_DECL_UNUSED_MEMBER will silence this warning. This is a cleaner way than using Q_UNUSED() somewhere in the class methods (like we did previously in qloggingcategory.cpp). It mirrors Q_DECL_UNUSED for unused variables, which however can't be used unconditionally for member variables because e.g. gcc will complain. Change-Id: I2afff683a7c3bae3bdcd684e5085a643887bb2a0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: hjk <hjk121@nokiamail.com>
* Add QFileDevice::MemoryMapFlags::MapPrivateOption flag.Simon Sasburg2014-07-234-7/+36
| | | | | | | | | | Passing this flag to QFileDevice::map() will allow writes to the mapped memory without modifying the file that was mapped. These writes will be lost when the memory is unmapped. Change-Id: I7d46b044fc370585de8c06fdb4059f1f1be12d7d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Fix warnings about integer conversion in qloggingregistry.cpp.Friedemann Kleint2014-07-221-3/+3
| | | | | | | | | io\qloggingregistry.cpp(134) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data io\qloggingregistry.cpp(138) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data io\qloggingregistry.cpp(142) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data Change-Id: Ic9787aa8acb5cb4440c62bbb143f7c2b7fdad385 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* QDebug: Add a doc section about formatting optionsKai Koehne2014-07-221-0/+12
| | | | | Change-Id: I43cb965f9f45e8a50c767c7e9035811c90e6aab3 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Improve debugging output for QLoggingCategoryKai Koehne2014-07-211-6/+6
| | | | | | | | | Make sure that the source the rules are loaded from is printed before any syntax errors. Change-Id: Id7ced1a346dd0d8501eab93ac00e1f432ca6b703 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>
* Add example qtlogging.conf file to QLoggingCategory documentationKai Koehne2014-07-211-1/+7
| | | | | | Change-Id: I0ceeb8afa711cc7bc1378287b0d550871e5bfd9d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>
* QDebug: Add resetFormat()Kai Koehne2014-07-152-2/+19
| | | | | | | | | | Similar to QTextStream::reset(), this resets the stream format to the defaults. Its primary use is inside custom operator<< implementations, where you'd want to have a fixed format regardless of the current stream state. Change-Id: I421d76c61f164579bb90cf4195cc5376e2dcf0f3 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* QLoggingCategory documentation improvementsKai Koehne2014-07-141-1/+3
| | | | | Change-Id: I9cc16d01f62d94fa3e7869bf9bb7734c774f82e3 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Add QDebug::noquote() stream modifierKai Koehne2014-07-102-7/+67
| | | | | | | | | | | | | | | Allow the user to disable the quoting of QString, QByteArray, QStringLiteral by passing a "noquote()" stream modifier. This requires another flag to be added to QDebug::Stream. To keep BC we're using the QMessageLogContext::version field to differentiate between QDebug streams created by earlier versions. Task-number: QTBUG-37146 Change-Id: I9b215eabfcfd754af16ea87f3ef928d698e37d77 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Make QTextStream use group separators in floating-point numbersThiago Macieira2014-07-051-0/+2
| | | | | | | | | | | | | Like for integers, this is activated only on QLocales other than C. [ChangeLog][QtCore][QTextStream] QTextStream now uses group separators when writing floating-point numbers when the locale is not the C locale. The old behavior can be restored by setting QLocale::OmitGroupSeparator on the locale. Change-Id: Ie451b91017746c3a9b11b6211b2ddd09cd295cd2 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Ensure that QTemporaryFile clears all file mappings.Friedemann Kleint2014-07-033-3/+17
| | | | | | | | | | | Factor out code to clear all mappings into QFSFileEnginePrivate::unmapAll() and call that from QTemporaryFile. Task-number: QTBUG-39976 Change-Id: Ic1ceeba0ba4451866f1081fee430e5c458c0819d Reviewed-by: Jonathan Liu <net147@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/5.3' into devFrederik Gladhorn2014-07-0111-279/+281
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/qnx-x86-qcc/qplatformdefs.h src/corelib/global/qglobal.h src/network/socket/qnativesocketengine_winrt.cpp src/plugins/platforms/android/androidjniaccessibility.cpp src/plugins/platforms/windows/qwindowswindow.cpp Manually adjusted: mkspecs/qnx-armle-v7-qcc/qplatformdefs.h to include 9ce697f2d54be6d94381c72af28dda79cbc027d4 Thanks goes to Sergio for the qnx mkspecs adjustments. Change-Id: I53b1fd6bc5bc884e5ee2c2b84975f58171a1cb8e
| * WinRT: no read-only paths in QStandardpaths::writableLocationOliver Wolff2014-06-261-5/+14
| | | | | | | | | | | | | | | | | | | | | | As FontsLocation, HomeLocation and RuntimeLocation are read- only on WinRT WritableLocation should return empty strings in these cases. In addition all the other options were added to the switch statement in writableLocation. Task-number: QTBUG-38581 Change-Id: Iab994556844e713c6fa02028a0ec824ecb5ee82b Reviewed-by: Andrew Knight <andrew.knight@digia.com>
| * Mark behavior of QFileInfo::absoluteFilePath as undefined in corner casesKai Koehne2014-06-251-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current description was misleading, since e.g. QFileInfo().absoluteFilePath() will always return an empty string. QFileInfo("").absoluteFilePath() however will return the current working directory ... Instead of documenting these small quirks we should rather mark the exact behavior as undefined, like we already do for absolutePath(). Change-Id: I70358413528429c2c2dee37480ad018aae26e6cb Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
| * Fix logging file location docsFrederik Gladhorn2014-06-251-2/+2
| | | | | | | | | | | | | | The location mentioned in the docs didn't work because it was wrong. Change-Id: I80bbc16bfecc5662317f9963299981266b95bba8 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
| * Fix memory leaks in QFseventsFileSystemWatcherEngineErik Verbruggen2014-06-241-0/+28
| | | | | | | | | | | | | | | | Sprinkle in some NSAutoReleasePools. Task-number: QTBUG-38637 Change-Id: I0cb42d9d1cbcc4e9d273d0d43e4925fc02885b66 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
| * Fix data race on QLoggingCategory when using qDebug from multiple threadsDavid Faure2014-06-202-18/+53
| | | | | | | | | | | | | | setEnabled() would race with isEnabled()/isDebugEnabled()/etc. Change-Id: I2004cba81d5417a634b97f5c2f98d3a4ab71770d Reviewed-by: David Faure <david.faure@kdab.com>
| * QProcess: Handle spurious socket notifications for stdout and stderrThiago Macieira2014-06-123-10/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Unix systems where the GUI event dispatcher uses a notification system for socket notifiers that is out of band compared to select(), it's possible for the QSocketNotifier to activate after the pipe has been read from. When that happened, the ioctl(2) call with FIONREAD might return 0 bytes available, which we interpreted to mean EOF. Instead of doing that, always try to read at least one byte and examine the returned byte count from read(2). If it returns 0, that's a real EOF; if it returns -1 EWOULDBLOCK, we simply ignore the situation. That's the case on OS X: the Cocoa event dispatcher uses CFSocket to get notifications and those use kevent (and, apparently, an auxiliary thread) instead of an in-thread select() or poll(). That means the event loop would activate the QSocketNotifier even though there is nothing to be read. Task-number: QTBUG-39488 Change-Id: I1a58b5b1db7a47034fb36a78a005ebff96290efb Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
| * Don't try to read from invalid file descriptors in QProcessThiago Macieira2014-06-123-6/+10
| | | | | | | | | | | | | | | | | | strace reveals that we do ioctl(-1, FIONREAD) and get EBADF. The only case where this could happen is inside _q_processDied, which calls the read functions without checking if the pipe is still open. Change-Id: I67637fc4267be73fc03d40c444fdfea89e1ef715 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
| * QProcessPrivate: merge the functions dealing with stdout and stderrThiago Macieira2014-06-125-131/+54
| | | | | | | | | | | | | | Simplifies the code. Change-Id: I4b3a6e725eb245d3531d1d11d959fb3b85862778 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
| * Rename QProcessPrivate::destroyChannel to closeChannelThiago Macieira2014-06-125-20/+20
| | | | | | | | | | | | | | | | | | | | | | The QProcessPrivate::Channel object contains some structures that may survive the closing of the pipe, so calling this function "destroy" is incorrect. Let it be just the closing. For symmetry, the createChannel() function is renamed to openChannel(). Change-Id: I2899214c6e4c25835390b10ccf3931315a91589e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
| * Move the QProcessPrivate Windows objects into QProcessPrivate::ChannelThiago Macieira2014-06-123-67/+56
| | | | | | | | | | | | | | Similar to the previous commit, this simplifies the code. Change-Id: Ia02b9b5174b4bc6fd04ec2534231b7db5fc914fa Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
| * Move the QProcessPrivate channel buffers into QProcessPrivate::ChannelThiago Macieira2014-06-124-40/+37
| | | | | | | | | | | | | | Simplifies the code. Change-Id: I70b26af69332f364d856042f114c37a70504d66f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* | QDebug: Remove handling of FORCE_UREF defineKai Koehne2014-06-251-35/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the only place in Qt source code we use FORCE_UREF, and can be traced back to the very first qt.git commit. In any case, it's broken: It returns a reference to a local variable, since the debug argument is _not_ a reference. Using a reference both for the argument and the return value would be actually the canonical solution, but that breaks with QDebug << operator(QDebug, const QVariant &), exported in QtCore. The C++ lookup rules apparently prefer this overload then to be used for outputting containers ... Change-Id: Iaf5e5dd89d4f3ebe6454eba219046b4f25b0d717 Reviewed-by: hjk <hjk121@nokiamail.com>
* | Merge remote-tracking branch 'origin/stable' into devJ-P Nurmi2014-06-055-91/+93
|\| | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/features/qt.prf src/plugins/platforms/xcb/qxcbwindow.h src/tools/qdoc/qdocindexfiles.cpp src/widgets/kernel/qwidget_qpa.cpp Change-Id: I214f57b03bc2ff86cf3b7dfe2966168af93a5a67
| * Properly escape bytearray data outside the ascii range when using a codecLars Knoll2014-06-041-2/+5
| | | | | | | | | | | | | | | | | | Some codecs can't handle the range outside ascii properly and would then fail to read the data back in correctly. Task-number: QTBUG-15543 Change-Id: I4c02921e787a939eeec0c7a11603b5896d756aef Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * remove HSTRING instancesMaurice Kalinowski2014-06-033-12/+12
| | | | | | | | | | | | | | | | | | | | | | HSTRING needs to be released or handles will be leaked. Instead use HString which takes care of resource management on its own. Task-Number: QTBUG-38115 Change-Id: I2c767776c1f22f45acd8dd77b693f30d63d894b9 Reviewed-by: Andrew Knight <andrew.knight@digia.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
| * fix and de-duplicate qprocess apidocsOswald Buddenhagen2014-05-232-77/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - rectify confusion and outright disinformation about argument quoting - say that open() is an alias for start(), not the other way round, as this is more consistent - apply some trickery to hide mergeable startDetached() overload - rename program -> command where it stands for a joined command line, for consistency - copy less information to the various overloads - misc language fixes and reshuffling Change-Id: I1b9c8dbed003f551ee6855044bbfc0aedddb4757 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* | QSaveFile: error out in open when the file is a directoryOlivier Goffart2014-06-041-0/+6
| | | | | | | | | | Change-Id: Ifb1697fedf6dd28fe317282c8b4824f34ec61981 Reviewed-by: David Faure <david.faure@kdab.com>
* | QSaveFile: follow symbolic linksOlivier Goffart2014-05-302-3/+16
| | | | | | | | | | | | | | | | | | [ChangeLog][QtCore][QSaveFile] Now follows symbolic links while writing to a link instead of replacing the link with the contents. Change-Id: I5afd519cb9f96ae68fa4c23c33a18de75671a301 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: David Faure <david.faure@kdab.com>
* | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Simon Hausmann2014-05-221-1/+1
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/stable' into devSimon Hausmann2014-05-221-1/+1
| |\| | | | | | | | | | Change-Id: Ia36e93771066d8abcf8123dbe2362c5c9d9260fc
| | * Fix error when reading newlinesFrederik Gladhorn2014-05-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix error 'operation priorities' identified by static analysis from http://www.viva64.com/en/b/0251/ '!=' operator's priority is higher than that of the '=' Change-Id: I2668171acb506992e3a15b113682ac04ba309532 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | De-inline QDebug destructorKai Koehne2014-05-222-12/+15
|/ / | | | | | | | | | | | | | | | | This injected quite some code on every use of qDebug and friends, while not giving any measurable performance benefits. Change-Id: I7b51f99130f18f1252da01e313f7b97c43a5480d Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QWinOverlappedIoNotifier: Add an extended waitForAnyNotified() methodDenis Shienkov2014-05-212-18/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | The existing waitForNotified method has the design limitation that it doesn't allow the tracking of multiple I/O operations on a single file handle. Therefore we introduce an additional method waitForAnyNotified that returns a pointer to the triggered OVERLAPPED object. Change-Id: I536ed7f6828daa2b0ce03f2d662eeb10aa89ca99 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-05-132-8/+10
|\| | | | | | | | | | | | | Conflicts: src/gui/kernel/qguiapplication.cpp Change-Id: Ibe75603dc8a51769db6550ea3f07bc8d19b0be85
| * Doc: change the name of the QTemporaryDir parameter nameThiago Macieira2014-05-111-7/+7
| | | | | | | | | | | | | | | | | | Make it very clear that this is a path, so it's relative to the working dir, not relative to tempPath(). Task-number: QTBUG-38266 Change-Id: Ib7ca8df76b5a03c1631fe00d6b329d86538d4b5a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
| * Don't assume QLocale::codecForLocale always returns non-nullThiago Macieira2014-05-111-1/+3
| | | | | | | | | | | | | | | | | | | | | | It may return null during program exit, due to QCoreGlobalData global static already having been destroyed. If that's the case, QTextStream needs to fall back to Latin 1, like QString::toLocal8Bit and fromLocal8Bit already do. Task-number: QTBUG-38316 Change-Id: I5949c8dec15b60f4a13b5d9307ed6abfc799fe20 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Frederik Gladhorn2014-05-132-0/+11
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-05-132-0/+11
| |\| | | | | | | | | | | | | | | | | | | Manually changed enum to LibGL in src/plugins/platforms/xcb/qglxintegration.cpp Change-Id: If34ee6cce3d1d51fb4bb1fdfa59c30389ea0d207
| | * Merge "Merge remote-tracking branch 'origin/release' into stable" into ↵Frederik Gladhorn2014-05-051-0/+6
| | |\ | | | | | | | | | | | | refs/staging/stable
| | | * Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2014-05-031-0/+6
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Manually fixed up: isES -> isOpenGLES src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp Change-Id: I57d2ef26c3d4a7b40ace09f4e8560b7686650ea5
| | | | * Logging: Mention 'best practices' for using QLoggingCategoryKai Koehne2014-04-291-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QLoggingCategory objects are meant to be mere 'handles' for the registry. It's therefore not recommended to - manipulate them directly (via setEnabled()), except in a filter - export them across module boundaries - subclass them Subclassing QLoggingCategory also breaks compilations in a certain circumstances (no variadic macros). Task-number: QTBUG-37283 Change-Id: Ib12fb43d955902c7fa4583296d64afc5eca01200 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>