From 1272be04be0cb803eec87f602edb2e3e6f111aea Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 14 Apr 2024 21:33:34 +0200 Subject: Merging upstream version 2.40. Signed-off-by: Daniel Baumann --- libfdisk/src/context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libfdisk/src/context.c') diff --git a/libfdisk/src/context.c b/libfdisk/src/context.c index 0d22124..463a60f 100644 --- a/libfdisk/src/context.c +++ b/libfdisk/src/context.c @@ -773,7 +773,7 @@ int fdisk_deassign_device(struct fdisk_context *cxt, int nosync) cxt->dev_path); return -errno; } - if (!nosync) { + if (S_ISBLK(cxt->dev_st.st_mode) && !nosync) { fdisk_info(cxt, _("Syncing disks.")); sync(); } -- cgit v1.2.3