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 1636 1637 1637 chmod_ret = chmod(real_path, mode); 1638 1638 1639 1639 appfs_simulate_user_fs_leave(); 1640 1640 1641 1641 return(chmod_ret); 1642 1642 } 1643 + 1644 +static int appfs_fuse_symlink(const char *oldpath, const char *newpath) { 1645 + char *real_path; 1646 + int symlink_ret; 1647 + 1648 + APPFS_DEBUG("Enter (path = %s, %s)", oldpath, newpath); 1649 + 1650 + real_path = appfs_prepare_to_create(newpath); 1651 + if (real_path == NULL) { 1652 + return(-EIO); 1653 + } 1654 + 1655 + appfs_simulate_user_fs_enter(); 1656 + 1657 + symlink_ret = symlink(oldpath, real_path); 1658 + 1659 + appfs_simulate_user_fs_leave(); 1660 + 1661 + free(real_path); 1662 + 1663 + if (symlink_ret != 0) { 1664 + return(errno * -1); 1665 + } 1666 + 1667 + return(0); 1668 +} 1643 1669 1644 1670 /* 1645 1671 * SQLite3 mode: Execute raw SQL and return success or failure 1646 1672 */ 1647 1673 static int appfs_sqlite3(const char *sql) { 1648 1674 Tcl_Interp *interp; 1649 1675 const char *sql_ret; ................................................................................ 1904 1930 .mknod = appfs_fuse_mknod, 1905 1931 .create = appfs_fuse_create, 1906 1932 .truncate = appfs_fuse_truncate, 1907 1933 .unlink = appfs_fuse_unlink_rmdir, 1908 1934 .rmdir = appfs_fuse_unlink_rmdir, 1909 1935 .mkdir = appfs_fuse_mkdir, 1910 1936 .chmod = appfs_fuse_chmod, 1937 + .symlink = appfs_fuse_symlink, 1911 1938 }; 1912 1939 1913 1940 /* 1914 1941 * FUSE option parsing callback 1915 1942 */ 1916 1943 static int appfs_fuse_opt_cb(void *data, const char *arg, int key, struct fuse_args *outargs) { 1917 1944 static int seen_cachedir = 0;