git: DragonFly_RELEASE_6_4 gpt(8): Clear errno before retrying open() in gpt_open()

Aaron LI aly at crater.dragonflybsd.org
Sat Feb 21 17:07:06 PST 2026


commit 94f4175ef0798eee6643b209115f2032afb7cd01
Author: Aaron LI <aly at aaronly.me>
Date:   Tue Sep 2 19:26:38 2025 +0800

    gpt(8): Clear errno before retrying open() in gpt_open()
    
    Otherwise, the stale errno would go through gpt_read() when it failed
    with a partial read, and the program would print a weird error message
    like:
    ```
    gpt show: unable to open device 'vn4': No such file or directory
    ```
    
    Suggested-by: swildner

Summary of changes:
 sbin/gpt/gpt.c | 1 +
 1 file changed, 1 insertion(+)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/94f4175ef0798eee6643b209115f2032afb7cd01


-- 
DragonFly BSD source repository


More information about the Commits mailing list