Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

udisks2: Be more tolerant of device-startup time #1359

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Apr 26, 2024

  1. udisks2: Be more tolerant of device-startup time

    When switching an SDWire to 'host' mode, it may take time for the
    partition to appear.
    
    During that time the device (e.g. '/dev/sdo1') may not exist, so trying
    to cat e.g. '/sys/call/block/sdo1' fails. Handle this by returning a
    zero size in that case, as is done when the returned size is empty.
    
    Even when the block device is present, udisks2 may take a short time to
    make the device available. Handle this by retrying a few times, until
    things settle.
    
    Add the call to _wait_for_medium() in write_files() while we are here,
    to match what is done in write_image(). Also fix the parameter type for
    write_files() and mention the exception it may raise.
    
    Fixes: labgrid-project#1357
    
    Signed-off-by: Simon Glass <sjg@chromium.org>
    sjg20 committed Apr 26, 2024
    Configuration menu
    Copy the full SHA
    6ab5163 View commit details
    Browse the repository at this point in the history