Overview
Comment: | Basic functionality to the point where Tcl_Channel types need to be implemented |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
d1219703011f2e2bc222e8713ef84b13 |
User & Date: | rkeene on 2019-05-02 23:06:10 |
Other Links: | manifest | tags |
Context
2019-05-02
| ||
23:11 | Added start of split into standalone/client/flexible modes check-in: acfc5037c6 user: rkeene tags: trunk | |
23:06 | Basic functionality to the point where Tcl_Channel types need to be implemented check-in: d121970301 user: rkeene tags: trunk | |
21:08 | Minimal support to be loaded and not crash the process check-in: e5b6962adf user: rkeene tags: trunk | |
Changes
Modified Makefile from [8907b35042] to [ff706ebdb4].
︙ | |||
15 16 17 18 19 20 21 | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | - + + | xvfs-core.o: xvfs-core.c xvfs-core.h Makefile $(CC) $(CPPFLAGS) $(CFLAGS) -o xvfs-core.o -c xvfs-core.c example.so: example.o xvfs-core.o Makefile $(CC) $(CFLAGS) $(LDFLAGS) -shared -o example.so example.o xvfs-core.o $(LIBS) test: example.so |
Modified xvfs-core.c from [b7bfd15588] to [449d9d44b1].
1 2 3 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 | + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + | #include <xvfs-core.h> #include <string.h> #include <tcl.h> #define XVFS_ROOT_MOUNTPOINT "//xvfs:/" |
︙ |
Modified xvfs-core.h from [ac3847ed22] to [9145593486].
1 2 3 4 5 6 7 8 9 10 11 12 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | + - + + | #ifndef XVFS_COMMON_H_1B4B28D60EBAA11D5FF85642FA7CA22C29E8E817 #define XVFS_COMMON_H_1B4B28D60EBAA11D5FF85642FA7CA22C29E8E817 1 #include <tcl.h> #define XVFS_PROTOCOL_VERSION 1 typedef const char **(*xvfs_proc_getChildren_t)(const char *path, Tcl_WideInt *count); typedef const unsigned char *(*xvfs_proc_getData_t)(const char *path, Tcl_WideInt start, Tcl_WideInt *length); typedef int (*xvfs_proc_getInfo_t)(const char *path, Tcl_StatBuf *statBuf); struct Xvfs_FSInfo { int protocolVersion; |
Modified xvfs.c.rvt from [6b271a3398] to [eb4591d1ce].
1 2 3 4 5 6 7 8 9 10 11 | 1 2 3 4 5 6 7 8 9 10 11 12 | + | #include <xvfs-core.h> #include <unistd.h> #include <string.h> #include <tcl.h> #include <sys/stat.h> #define XVFS_NAME_LOOKUP_ERROR (-1) #define MIN(a, b) (((a) < (b)) ? (a) : (b)) typedef enum { XVFS_FILE_TYPE_REG, XVFS_FILE_TYPE_DIR |
︙ | |||
127 128 129 130 131 132 133 134 | 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 | + + + + + + + + + + + + + + + + + + + - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + | *length = resultLength; /* * Return the data */ return(fileInfo->data.fileContents + start); } static int xvfs_<?= $::xvfs::fsName ?>_getInfo(const char *path, Tcl_StatBuf *statBuf) { struct xvfs_file_data *fileInfo; long inode; /* * Validate input parameters */ if (!statBuf) { return(-1); } /* * Get the inode from the lookup function */ inode = xvfs_<?= $::xvfs::fsName ?>_nameToIndex(path); if (inode == XVFS_NAME_LOOKUP_ERROR) { return(-1); } |