]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
fdisk: fix fdisk_sgi_set_bootfile return value
authormr-bronson <ghbugs@toeai.com>
Sun, 18 Aug 2024 01:06:44 +0000 (01:06 +0000)
committerKarel Zak <kzak@redhat.com>
Fri, 3 Jan 2025 11:21:42 +0000 (12:21 +0100)
Supposed to be '0 on success, <0 on error'.

(cherry picked from commit d10b038506936f3ad584fa2e017d2d860ed6d133)

libfdisk/src/sgi.c

index 2293a20b4080e5a1bab672237ad98ce2d6c395c6..71abedd3f9b9a3a9f46926141d34fde9a35119dc 100644 (file)
@@ -447,8 +447,10 @@ int fdisk_sgi_set_bootfile(struct fdisk_context *cxt)
        if (rc == 0)
                rc = sgi_check_bootfile(cxt, name);
        if (rc) {
-               if (rc == 1)
+               if (rc == 1) {
                        fdisk_info(cxt, _("Boot file is unchanged."));
+                       rc = 0;
+               }
                goto done;
        }