Check-in [f6af28366e]
Overview
Comment:Added symlink creation support
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:f6af28366e0a811890613819922a465720a8ca76
User & Date: rkeene on 2014-11-15 17:33:20
Other Links: manifest | tags
Context
2014-11-15
19:17
Added missing Tcl_Preserve() call check-in: 71bdb44ec6 user: rkeene tags: trunk
17:33
Added symlink creation support check-in: f6af28366e user: rkeene tags: trunk
17:33
Added dangling symlink support check-in: 538accae67 user: rkeene tags: trunk
Changes

Modified appfsd.c from [1c0ba85f13] to [ce9351a270].

1636
1637
1638
1639
1640
1641
1642


























1643
1644
1645
1646
1647
1648
1649
....
1904
1905
1906
1907
1908
1909
1910

1911
1912
1913
1914
1915
1916
1917

	chmod_ret = chmod(real_path, mode);

	appfs_simulate_user_fs_leave();

	return(chmod_ret);
}



























/*
 * SQLite3 mode: Execute raw SQL and return success or failure
 */
static int appfs_sqlite3(const char *sql) {
	Tcl_Interp *interp;
	const char *sql_ret;
................................................................................
	.mknod     = appfs_fuse_mknod,
	.create    = appfs_fuse_create,
	.truncate  = appfs_fuse_truncate,
	.unlink    = appfs_fuse_unlink_rmdir,
	.rmdir     = appfs_fuse_unlink_rmdir,
	.mkdir     = appfs_fuse_mkdir,
	.chmod     = appfs_fuse_chmod,

};

/*
 * FUSE option parsing callback
 */
static int appfs_fuse_opt_cb(void *data, const char *arg, int key, struct fuse_args *outargs) {
	static int seen_cachedir = 0;







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







 







>







1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
....
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944

	chmod_ret = chmod(real_path, mode);

	appfs_simulate_user_fs_leave();

	return(chmod_ret);
}

static int appfs_fuse_symlink(const char *oldpath, const char *newpath) {
	char *real_path;
	int symlink_ret;

	APPFS_DEBUG("Enter (path = %s, %s)", oldpath, newpath);

	real_path = appfs_prepare_to_create(newpath);
	if (real_path == NULL) {
		return(-EIO);
	}

	appfs_simulate_user_fs_enter();

	symlink_ret = symlink(oldpath, real_path);

	appfs_simulate_user_fs_leave();

	free(real_path);

	if (symlink_ret != 0) {
		return(errno * -1);
	}

	return(0);
}

/*
 * SQLite3 mode: Execute raw SQL and return success or failure
 */
static int appfs_sqlite3(const char *sql) {
	Tcl_Interp *interp;
	const char *sql_ret;
................................................................................
	.mknod     = appfs_fuse_mknod,
	.create    = appfs_fuse_create,
	.truncate  = appfs_fuse_truncate,
	.unlink    = appfs_fuse_unlink_rmdir,
	.rmdir     = appfs_fuse_unlink_rmdir,
	.mkdir     = appfs_fuse_mkdir,
	.chmod     = appfs_fuse_chmod,
	.symlink   = appfs_fuse_symlink,
};

/*
 * FUSE option parsing callback
 */
static int appfs_fuse_opt_cb(void *data, const char *arg, int key, struct fuse_args *outargs) {
	static int seen_cachedir = 0;