Diff

Differences From Artifact [69177869fa]:

To Artifact [1c0ba85f13]:


385
386
387
388
389
390
391
392

393
394
395
396
397
398
399
385
386
387
388
389
390
391

392
393
394
395
396
397
398
399







-
+








		interp = NULL;

		pthread_ret = pthread_setspecific(interpKey, interp);
	}

	if (global_interp_reset_key == -1) {
		APPFS_DEBUG("Not creating a new interpreter since we are terminating.");
		APPFS_DEBUG("Returning NULL since we are in the process of terminating all threads.");

		return(NULL);
	}

	thread_interp_reset_key = global_interp_reset_key;

	if (interp == NULL) {
1072
1073
1074
1075
1076
1077
1078
1079

1080
1081

1082
1083
1084
1085
1086
1087
1088
1072
1073
1074
1075
1076
1077
1078

1079
1080

1081
1082
1083
1084
1085
1086
1087
1088







-
+

-
+







	}

	global_interp_reset_key = __sync_fetch_and_add(&interp_reset_key, 0);
	if (global_interp_reset_key != -1) {
		APPFS_DEBUG("Error sending kill signal to all threads, aborting anyway.");
	}

	fuse_exit(fuse_get_context()->fuse);
	appfs_get_path_info_cache_flush(-1, -1);

	appfs_get_path_info_cache_flush(-1, -1);
	fuse_exit(fuse_get_context()->fuse);

	return;
}
#endif

static int appfs_fuse_readlink(const char *path, char *buf, size_t size) {
	struct appfs_pathinfo pathinfo;
1390
1391
1392
1393
1394
1395
1396
1397

1398
1399
1400
1401
1402
1403
1404
1405
1406
1390
1391
1392
1393
1394
1395
1396

1397


1398
1399
1400
1401
1402
1403
1404







-
+
-
-







		size -= read_ret;
		buf  += read_ret;
		offset += read_ret;
		retval += read_ret;
	}

	if (size != 0) {
		APPFS_DEBUG("error: incomplete read (this is an error because FUSE will request the exact length of the file)");
		APPFS_DEBUG("error: incomplete read (this might be an error because FUSE will request the exact length of the file)");

		return(0);
	}

	APPFS_DEBUG("Returning: %i", retval);

	return(retval);
}