diff options
author | Ovidiu Panait <ovidiu.panait@windriver.com> | 2017-09-26 12:00:46 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-10-06 12:03:31 +0100 |
commit | f68fca4776a38a1bdf7ed37ce87cddbb21ff74f8 (patch) | |
tree | f4715beb1ed58f92641599ea507e2b99e600a302 /meta-skeleton | |
parent | 23155b607c509b799775949774ad7da23c10b373 (diff) | |
download | openembedded-core-f68fca4776a38a1bdf7ed37ce87cddbb21ff74f8.tar.gz openembedded-core-f68fca4776a38a1bdf7ed37ce87cddbb21ff74f8.tar.bz2 openembedded-core-f68fca4776a38a1bdf7ed37ce87cddbb21ff74f8.zip |
libparted: Use read only when probing devices on linux
When a device is opened for RW closing it can trigger other actions,
like udev scanning it for partition changes. Use read only for the
init_* methods and RW for actual changes to the device.
This adds _device_open which takes mode flags as an argument and turns
linux_open into a wrapper for it with RW_MODE.
_device_open_ro is added to open the device with RD_MODE and increment
the open_counter. This is used in the init_* functions.
_device_close is a wrapper around linux_close that decrements the
open_counter and is used in the init_* functions.
All of these changes are self-contained with no external API changes.
The only visible change in behavior is that when a new PedDevice is
created the device is opened in RO_MODE instead of RW_MODE.
Resolves: rhbz#1245144
Reference:
https://bugzilla.redhat.com/show_bug.cgi?id=1283112
Upstream patch:
http://git.savannah.gnu.org/cgit/parted.git/commit/?id=44d5ae0115c4ecfe3158748309e9912c5aede92d
Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta-skeleton')
0 files changed, 0 insertions, 0 deletions