Changeset 19
- Timestamp:
- 11/02/07 22:26:15 (10 months ago)
- Files:
-
- tarfs/tarfs.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
tarfs/tarfs.c
r16 r19 202 202 memcpy(&header, buffer, HEADER_SIZE); 203 203 204 204 205 /* Check that the header is valid */ 205 206 if(!memcmp(header.magic,"\0\0\0\0\0",5)) break; … … 214 215 i=file_tree; 215 216 while( result != NULL ){ 217 eprintf("%s ",result); 218 216 219 while(i){ 217 220 if(i->subdir){ … … 230 233 result=strtok(NULL, delims); 231 234 } 232 235 236 eprintf("\n"); 237 fflush(stderr); 238 239 if( !result ) 240 if( header.typeflag == '5' ) 241 continue; 242 else 243 return NULL; 244 233 245 /* Add inode attributes */ 234 memcpy(new->file_name, result, NAME_SIZE); 246 int name_size=strlen(result); 247 memmove(new->file_name, result, name_size); 248 new->file_name[name_size]='\0'; 235 249 236 250 switch(header.typeflag){ … … 331 345 return 1; 332 346 }*/ 333 tar_file = fopen("./SourceImages.tar", "r"); 347 tar_file = fopen("./contrib.tar", "r"); 348 334 349 file_tree=tarfs_init(tar_file); 335 return fuse_main(argc, argv, &tarfs_oper); 336 } 350 351 if( !file_tree ){ 352 eprintf("A fatal error occoured...\n"); 353 return 1; 354 } 355 else{ 356 return fuse_main(argc, argv, &tarfs_oper); 357 } 358 }
