Message ID | 20210513071311.84629-1-james.hilliard1@gmail.com |
---|---|
State | Accepted |
Headers | show |
Series | [1/1] diskpart: disable fdisk dialog driven partitioning | expand |
On 13.05.21 09:13, James Hilliard wrote: > Since we don't support dialog driven partitioning we should ensure > it is disabled as it can cause failures under some circumstances. > > Signed-off-by: James Hilliard <james.hilliard1@gmail.com> > --- > handlers/diskpart_handler.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/handlers/diskpart_handler.c b/handlers/diskpart_handler.c > index 65010c1..641c6f9 100644 > --- a/handlers/diskpart_handler.c > +++ b/handlers/diskpart_handler.c > @@ -194,6 +194,16 @@ static int diskpart(struct img_type *img, > return -ENOMEM; > } > > + /* > + * The library uses dialog driven partitioning by default. > + * Disable as we don't support interactive dialogs. > + */ > + ret = fdisk_disable_dialogs(cxt, 1); > + if (ret) { > + ERROR("Failed to disable dialogs"); > + goto handler_release; > + } > + > ret = fdisk_assign_device(cxt, img->device, 0); > if (ret == -EACCES) { > ERROR("no access to %s", img->device); > Reviewed-by: Stefano Babic <sbabic@denx.de> Best regards, Stefano Babic
diff --git a/handlers/diskpart_handler.c b/handlers/diskpart_handler.c index 65010c1..641c6f9 100644 --- a/handlers/diskpart_handler.c +++ b/handlers/diskpart_handler.c @@ -194,6 +194,16 @@ static int diskpart(struct img_type *img, return -ENOMEM; } + /* + * The library uses dialog driven partitioning by default. + * Disable as we don't support interactive dialogs. + */ + ret = fdisk_disable_dialogs(cxt, 1); + if (ret) { + ERROR("Failed to disable dialogs"); + goto handler_release; + } + ret = fdisk_assign_device(cxt, img->device, 0); if (ret == -EACCES) { ERROR("no access to %s", img->device);
Since we don't support dialog driven partitioning we should ensure it is disabled as it can cause failures under some circumstances. Signed-off-by: James Hilliard <james.hilliard1@gmail.com> --- handlers/diskpart_handler.c | 10 ++++++++++ 1 file changed, 10 insertions(+)