CaptiveFileParentObject *captive_file_parent_object;
GnomeVFSResult r;
gint retried=0;
+gint retried_commit=0;
g_return_val_if_fail(CAPTIVE_FILE_PARENT_IS_OBJECT(captive_file_object),GNOME_VFS_ERROR_BAD_PARAMETERS);
g_return_val_if_fail(buffer!=NULL,GNOME_VFS_ERROR_BAD_PARAMETERS);
return r;
if (GNOME_VFS_ERROR_SERVICE_NOT_AVAILABLE
!=(r=captive_sandbox_parent_file_write(captive_file_parent_object,buffer,num_bytes,bytes_written_return))) {
+ /* Occured: ExRaiseStatus(STATUS_LOG_FILE_FULL); */
+ if (GNOME_VFS_ERROR_LAUNCH==r) {
+ if (!retried_commit++) {
+puts("committing...");
+ if (GNOME_VFS_OK!=(r=captive_vfs_commit(captive_file_object->vfs)))
+ return r;
+puts("committed");
+ retried=0;
+ continue;
+ }
+ }
+ g_assert(*bytes_written_return==num_bytes); /* Not GNOME_VFS_ERROR_LAUNCH. */
if (GNOME_VFS_OK==r)
captive_parent_connector_set_dirty(CAPTIVE_PARENT_CONNECTOR(captive_file_parent_object));
return r;
NULL); /* Key; NULL means no file locking key */
g_return_val_if_fail(NT_SUCCESS(err)==NT_SUCCESS(file_IoStatusBlock.Status),GNOME_VFS_ERROR_GENERIC);
g_return_val_if_fail(NT_SUCCESS(err),GNOME_VFS_ERROR_GENERIC);
+ if (!file_IoStatusBlock.Information) {
+ /* FIXME: Check ExRaiseStatus(STATUS_LOG_FILE_FULL);
+ * really occured. We expect so and we will remount the volume.
+ */
+ *bytes_written_return=0;
+ return GNOME_VFS_ERROR_LAUNCH;
+ }
g_return_val_if_fail(file_IoStatusBlock.Information==num_bytes,GNOME_VFS_ERROR_GENERIC);
captive_file_slave_object->offset+=file_IoStatusBlock.Information;