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/recipes-extended/parted/parted_3.2.bb | |
parent | 23155b607c509b799775949774ad7da23c10b373 (diff) | |
download | openembedded-core-contrib-f68fca4776a38a1bdf7ed37ce87cddbb21ff74f8.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
Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/recipes-extended/parted/parted_3.2.bb')
-rw-r--r-- | meta/recipes-extended/parted/parted_3.2.bb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/meta/recipes-extended/parted/parted_3.2.bb b/meta/recipes-extended/parted/parted_3.2.bb index 2bfdfb5f8f..ab30108bf2 100644 --- a/meta/recipes-extended/parted/parted_3.2.bb +++ b/meta/recipes-extended/parted/parted_3.2.bb @@ -18,6 +18,7 @@ SRC_URI = "${GNU_MIRROR}/parted/parted-${PV}.tar.xz \ file://parted-3.2-sysmacros.patch \ file://run-ptest \ file://Makefile \ + file://0001-libparted-Use-read-only-when-probing-devices-on-linu.patch \ " SRC_URI[md5sum] = "0247b6a7b314f8edeb618159fa95f9cb" |