scripts: sd_fusing: wait for udev after sfdisk
authorJacek Kryszyn <j.kryszyn@samsung.com>
Mon, 10 Jun 2024 06:45:41 +0000 (08:45 +0200)
committerŁukasz Stelmach <l.stelmach@samsung.com>
Wed, 4 Dec 2024 11:00:01 +0000 (12:00 +0100)
commit0ed5e73b674203c3fbd700fe0e3c2d160b293aea
tree766d2d96773771fa9c7444437e7406b556d1dc5f
parent5ae45e67bd7ad75124e113b0e50146aeed791a85
scripts: sd_fusing: wait for udev after sfdisk

It was observed that errors related to wrong partition table
were thrown from time to time after repartitoning the device
with sfdisk. It seems that this was due to udev trying to
automatically rescan devices after being notified that some
changes were made.

This commit adds execution of udevadm settle after sfdisk.
The added command exits only after the udev event queue is
empty (or the timeout occured).

This commit reverts changes made by commit 5a7f3c8 (Invoke
ioctl to reread partitions directly) which are not needed
anymore. Running blockdev after sfdisk is also unnecessary
since sfdisk rereads the partition table anyway.

Change-Id: Ic89ea65846b4e064c85a316fdf6c07be42eb51e7
Signed-off-by: Jacek Kryszyn <j.kryszyn@samsung.com>
sd_fusing.py