On 10/9/24 6:53 AM, Thomas Huth wrote:
On 08/10/2024 03.15, jro...@linux.ibm.com wrote:
[snip...]

load_eckd_segments() returns a value of type block_number_t which is an unsigned type, so returning a negative error value will likely not work as expected...

...
@@ -317,21 +352,28 @@ static void run_eckd_boot_script(block_number_t bmt_block_nr,
            do {
              block_nr = load_eckd_segments(block_nr, ldipl, &address);
-        } while (block_nr != -1);
+        } while (block_nr >= 0);
[snip...]

There already exists a special block number defined in bootmap.h, NULL_BLOCK_NR 0xffffffffffffffffULL. Therefore I would propose simply adding another as ERROR_BLOCK_NR 0xfffffffffffffffeULL.

ERROR_BLOCK_NR would replace the negative error codes and NULL_BLOCK_NR would represent expected end of chunk.  Does this seem reasonable?

    Jared


Reply via email to