bug#79171: -s is ignored when using resizepart for shrinking a partition

Casey Fitzpatrick <[email protected]> Mon, 4 Aug 2025 16:19:02 -0400
Newsgroups gmane.comp.gnu.parted.bugs
Message-ID <CAEp-SHUmrydHJn2cNkrKPBFkzkhCE-Ua-EODMgXKu5AyUr=9kQ@mail.gmail.com>
--00000000000074026d063b8fe058
Content-Type: text/plain; charset="UTF-8"

When using resizepart with "-s" a warning prompt is still printed when
shrinking a partition. Then the command fails without actually prompting
for Yes/No.

Seen using parted version 3.6:
```
$ sudo parted -s /dev/loop0 unit B resizepart 1 420478975
Warning: Shrinking a partition can cause data loss, are you sure you want
to continue?
$ echo $?
1
```

--00000000000074026d063b8fe058
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>When using resizepart with &quot;-s&quot; a warning p=
rompt is still printed when shrinking a partition. Then the command fails w=
ithout actually prompting for Yes/No.</div><div><br></div><div>Seen using p=
arted version 3.6:</div>```<div>$ sudo parted -s /dev/loop0 unit B resizepa=
rt 1 420478975<br>Warning: Shrinking a partition can cause data loss, are y=
ou sure you want to continue?<br>$ echo $?<br>1<br><div>```</div></div><div=
><br></div><div><br></div></div>

--00000000000074026d063b8fe058--