Tweak gsetpid() to restore partition info in case of an error,
authorkrw <krw@openbsd.org>
Sun, 13 Jun 2021 14:39:05 +0000 (14:39 +0000)
committerkrw <krw@openbsd.org>
Sun, 13 Jun 2021 14:39:05 +0000 (14:39 +0000)
commit142a1f8c4cfcac2a05dcf89563cb8b2896d72354
treebe48cb17713ceaf6a4662442e697d12797fe4319
parent34a24b142be75888bb4c3be8b36409d5eaaeaf0d
Tweak gsetpid() to restore partition info in case of an error,
and mark the partition dirty only if something changed.

More aligned with gedit() and safer when invoked directly from
Xsetpid().
sbin/fdisk/cmd.c