From 965f1a172fb4296ce6144fce501070514005ac3d Mon Sep 17 00:00:00 2001 From: krw Date: Fri, 11 Jun 2021 23:49:49 +0000 Subject: [PATCH] Oops. Restore error message when no free space found. --- sbin/fdisk/gpt.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sbin/fdisk/gpt.c b/sbin/fdisk/gpt.c index 958fa2f9221..0687769e82d 100644 --- a/sbin/fdisk/gpt.c +++ b/sbin/fdisk/gpt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gpt.c,v 1.19 2021/06/11 20:28:12 krw Exp $ */ +/* $OpenBSD: gpt.c,v 1.20 2021/06/11 23:49:49 krw Exp $ */ /* * Copyright (c) 2015 Markus Muller * Copyright (c) 2015 Kenneth R Westerback @@ -556,8 +556,10 @@ GPT_get_lba_start(unsigned int pn) bs = letoh64(gp[pn].gp_lba_start); } else { rslt = lba_free(&bs, NULL); - if (rslt == -1) + if (rslt == -1) { + printf("no space for partition %u\n", pn); return -1; + } } bs = getuint64("Partition offset", bs, letoh64(gh.gh_lba_start), -- 2.20.1