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-07 23:20:39 +0100 |
commit | a2201f192aa79bf8ebde54d764307325a3f0f09c (patch) | |
tree | 47526654188aebe0b75efe4893b5ee9b54439e33 /meta/recipes-extended/parted/files/fix-doc-mandir.patch | |
parent | 59a238f3d75cbdd7a22e12445e440d5c29eaf6ee (diff) | |
download | poky-a2201f192aa79bf8ebde54d764307325a3f0f09c.tar.gz |
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
(From OE-Core rev: f68fca4776a38a1bdf7ed37ce87cddbb21ff74f8)
Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/parted/files/fix-doc-mandir.patch')
0 files changed, 0 insertions, 0 deletions