Browse files

stos: sync() after critical writes to disk

  • Loading branch information...
1 parent 299e17e commit e848f1904b04421adb7ba460c43001a4b67020f2 @andoma committed Dec 13, 2013
Showing with 12 additions and 1 deletion.
  1. +1 −1 configure.rpi
  2. +3 −0 src/htsmsg/htsmsg_store.c
  3. +4 −0 src/plugins.c
  4. +4 −0 src/upgrade.c
View
2 configure.rpi
@@ -103,7 +103,7 @@ cat >> ${CONFIG_MAK} <<EOF
CFLAGS_cfg += -fgnu89-inline
CFLAGS_cfg += -mfpu=vfp -mcpu=arm1176jzf-s -funwind-tables
CFLAGS_cfg += -DOMX_SKIP64BIT
-CFLAGS_cfg += -DRPISTOS
+CFLAGS_cfg += -DRPISTOS -DSTOS
CFLAGS_cfg += -I${VCROOT}/include
CFLAGS_cfg += -I${VCROOT}/include/IL
CFLAGS_cfg += -I${VCROOT}/include/interface/vcos/pthreads/
View
3 src/htsmsg/htsmsg_store.c
@@ -177,6 +177,9 @@ htsmsg_store_flush(void)
pending_store_destroy(ps);
}
hts_mutex_unlock(&pending_store_mutex);
+#ifdef STOS
+ sync();
+#endif
}
View
4 src/plugins.c
@@ -1250,6 +1250,10 @@ plugin_install(plugin_t *pl, const char *package)
return -1;
}
+#ifdef STOS
+ sync();
+#endif
+
snprintf(path, sizeof(path),
"zip://file://%s/installedplugins/%s.zip", gconf.persistent_path,
pl->pl_id);
View
4 src/upgrade.c
@@ -417,6 +417,10 @@ attempt_upgrade(int accept_patch)
fail |= !!close(fd);
buf_release(b);
+#ifdef STOS
+ sync();
+#endif
+
if(fail) {
install_error("Unable to write to file");
return -1;

0 comments on commit e848f19

Please sign in to comment.