* [PATCH 09/10] fdisk: API: fix fdisk_label_create
@ 2012-07-22 17:05 Davidlohr Bueso
2012-07-24 11:40 ` Karel Zak
0 siblings, 1 reply; 2+ messages in thread
From: Davidlohr Bueso @ 2012-07-22 17:05 UTC (permalink / raw)
To: Karel Zak, Petr Uzel; +Cc: util-linux
From: Davidlohr Bueso <dave@gnu.org>
It wasn't actually calling create_label(), silly me!
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
---
fdisks/utils.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/fdisks/utils.c b/fdisks/utils.c
index 62cd6aa..510d641 100644
--- a/fdisks/utils.c
+++ b/fdisks/utils.c
@@ -143,11 +143,13 @@ int fdisk_label_create(struct fdisk_context *cxt, const char *name)
#else
errcode = fdisk_label_change(cxt, "dos");
#endif
- if (errcode)
- goto done;
- }
-
- errcode = fdisk_label_change(cxt, name);
+ } else
+ errcode = fdisk_label_change(cxt, name);
+
+ if (errcode)
+ goto done;
+
+ errcode = cxt->label->create_label(cxt);
done:
return errcode;
}
--
1.7.4.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 09/10] fdisk: API: fix fdisk_label_create
2012-07-22 17:05 [PATCH 09/10] fdisk: API: fix fdisk_label_create Davidlohr Bueso
@ 2012-07-24 11:40 ` Karel Zak
0 siblings, 0 replies; 2+ messages in thread
From: Karel Zak @ 2012-07-24 11:40 UTC (permalink / raw)
To: Davidlohr Bueso; +Cc: Petr Uzel, util-linux
On Sun, Jul 22, 2012 at 07:05:45PM +0200, Davidlohr Bueso wrote:
> + } else
> + errcode = fdisk_label_change(cxt, name);
> +
> + if (errcode)
> + goto done;
> +
> + errcode = cxt->label->create_label(cxt);
> done:
> return errcode;
Unnecessary for the current code.
karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-07-24 11:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-22 17:05 [PATCH 09/10] fdisk: API: fix fdisk_label_create Davidlohr Bueso
2012-07-24 11:40 ` Karel Zak
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).