summaryrefslogtreecommitdiffstats
path: root/libfdisk/src/context.c
diff options
context:
space:
mode:
Diffstat (limited to 'libfdisk/src/context.c')
-rw-r--r--libfdisk/src/context.c2
1 files changed, 1 insertions, 1 deletions
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();
}