git: fdisk(8): Clear errno in read_disk() to avoid confusing others

Aaron LI aly at crater.dragonflybsd.org
Thu May 8 22:14:11 PDT 2025


commit 07312d4d39126aa35b128aa1c7cc69392175a710
Author: Aaron LI <aly at aaronly.me>
Date:   Fri May 9 12:26:10 2025 +0800

    fdisk(8): Clear errno in read_disk() to avoid confusing others
    
    For example, even read_disk() succeeded in detecting the sector size and
    reading, the errno would remain EIO, which could confuse the later code
    that calls err() or others.

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

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/07312d4d39126aa35b128aa1c7cc69392175a710


-- 
DragonFly BSD source repository


More information about the Commits mailing list