Overview
Comment: | More work towards reading package data |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
e37bc482a978d0b4e19b06ed8f612a4e |
User & Date: | rkeene on 2014-09-08 06:48:44 |
Other Links: | manifest | tags |
Context
2014-09-08
| ||
07:17 | More work towards parsing directory entries check-in: 85bda525b9 user: rkeene tags: trunk | |
06:48 | More work towards reading package data check-in: e37bc482a9 user: rkeene tags: trunk | |
06:12 | Updated to print packages check-in: 654957c655 user: rkeene tags: trunk | |
Changes
Modified Makefile from [bf41e80612] to [51fd163395].
1 2 | 1 2 3 4 5 6 7 8 9 10 | - + | CC = gcc PKG_CONFIG = pkg-config |
︙ |
Modified appfs.c from [0ffa90a2b2] to [e4290f9d3b].
︙ | |||
45 46 47 48 49 50 51 52 53 54 55 56 57 58 | 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | + + + + + + + | appfs_os_t os; appfs_cpuArch_t cpuArch; int isLatest; int counter; struct appfs_package *_next; }; struct appfs_site { char name[256]; int counter; struct appfs_site *_next; }; static appfs_os_t appfs_convert_os_fromString(const char *os) { if (strcasecmp(os, "Linux") == 0) { return(APPFS_OS_LINUX); } if (strcasecmp(os, "Darwin") == 0 || strcasecmp(os, "Mac OS") == 0 || strcasecmp(os, "Mac OS X") == 0) { |
︙ | |||
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 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + - + - + - - + + | retval = Tcl_EvalObjv(interp, objc, objv, 0); ckfree((void *) objv); return(retval); } static int appfs_getsites_cb(void *_head, int columns, char **values, char **names) { struct appfs_site **head_p, *obj; head_p = _head; obj = (void *) ckalloc(sizeof(*obj)); snprintf(obj->name, sizeof(obj->name), "%s", values[0]); if (*head_p == NULL) { obj->counter = 0; } else { obj->counter = (*head_p)->counter + 1; } obj->_next = *head_p; *head_p = obj; return(0); } static struct appfs_site *appfs_getsites(int *site_count_p) { struct appfs_site *head = NULL; int sqlite_ret; if (site_count_p == NULL) { return(NULL); } sqlite_ret = sqlite3_exec(globalThread.db, "SELECT DISTINCT hostname FROM packages;", appfs_getsites_cb, &head, NULL); if (sqlite_ret != SQLITE_OK) { APPFS_DEBUG("Call to sqlite3_exec failed."); return(NULL); } if (head != NULL) { *site_count_p = head->counter + 1; } return(head); } |
︙ | |||
223 224 225 226 227 228 229 | 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 | - - + + + + + - + + + + + - - - + + + + - - + + + + | return(0); } static int appfs_getmanifest(const char *hostname, const char *sha1) { return(0); } |
︙ | |||
264 265 266 267 268 269 270 271 | 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 | + - + + + + + + + | static int appfs_fuse_read(const char *path, char *buf, size_t size, off_t offset, struct fuse_file_info *fi) { return(-ENOENT); } #ifdef APPFS_TEST_DRIVER static int appfs_test_driver(void) { struct appfs_site *sites, *site; struct appfs_package *packages, *package; |
︙ |