diff options
| author | Karel Zak <kzak@redhat.com> | 2021-04-15 14:39:11 +0200 |
|---|---|---|
| committer | Karel Zak <kzak@redhat.com> | 2021-04-15 14:39:11 +0200 |
| commit | d527e8cf701fd324b70cec75ca6dd683b6572a20 (patch) | |
| tree | 5ed9900f4bd97c546ab50d43a39d3179aeeecab5 /disk-utils/cfdisk.c | |
| parent | 82e5156a380e03088b84b4fbd1bfe6a70f064e55 (diff) | |
| download | util-linux-d527e8cf701fd324b70cec75ca6dd683b6572a20.tar.gz | |
cfdisk: warn if disk on use
Fixes: https://github.com/karelzak/util-linux/issues/1278
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'disk-utils/cfdisk.c')
| -rw-r--r-- | disk-utils/cfdisk.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/disk-utils/cfdisk.c b/disk-utils/cfdisk.c index 5ae21e73a6..747953b22a 100644 --- a/disk-utils/cfdisk.c +++ b/disk-utils/cfdisk.c @@ -2570,6 +2570,8 @@ static int ui_run(struct cfdisk *cf) if (fdisk_is_readonly(cf->cxt)) ui_warnx(_("Device is open in read-only mode. Changes will remain in memory only.")); + else if (cf->device_is_used) + ui_warnx(_("Device is currently in use, repartitioning is probably a bad idea.")); else if (cf->wrong_order) ui_info(_("Note that partition table entries are not in disk order now.")); |
