Changeset c56c4576 in mainline for uspace/srv/fs/exfat/exfat_directory.c
- Timestamp:
- 2011-08-18T18:09:11Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 7234617
- Parents:
- 602c3d8c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/exfat/exfat_directory.c
r602c3d8c rc56c4576 283 283 if (rc != EOK) 284 284 return rc; 285 memcpy((uint8_t *)&array[i], (uint8_t *)de, sizeof(exfat_dentry_t));285 array[i] = *de; 286 286 rc = exfat_directory_next(di); 287 287 if (rc!=EOK) { … … 297 297 298 298 /* Sync */ 299 array[0].file.attr = df->attr;300 array[1].stream.firstc = ds->firstc;299 array[0].file.attr = host2uint16_t_le(df->attr); 300 array[1].stream.firstc = host2uint32_t_le(ds->firstc); 301 301 array[1].stream.flags = ds->flags; 302 array[1].stream.valid_data_size = ds->valid_data_size;303 array[1].stream.data_size = ds->data_size;302 array[1].stream.valid_data_size = host2uint64_t_le(ds->valid_data_size); 303 array[1].stream.data_size = host2uint64_t_le(ds->data_size); 304 304 array[0].file.checksum = host2uint16_t_le(exfat_directory_set_checksum((uint8_t *)array, 305 305 count*sizeof(exfat_dentry_t))); … … 310 310 if (rc != EOK) 311 311 return rc; 312 memcpy((uint8_t *)de, (uint8_t *)&array[i], sizeof(exfat_dentry_t));312 *de = array[i]; 313 313 di->b->dirty = true; 314 314 rc = exfat_directory_next(di); … … 318 318 } 319 319 } 320 free(array); 320 321 321 322 return EOK; … … 369 370 uint16_t wname[EXFAT_FILENAME_LEN+1]; 370 371 int rc, i; 371 size_t uctable_chars ;372 size_t uctable_chars, j; 372 373 aoff64_t pos; 373 374 … … 420 421 if (rc != EOK) 421 422 return rc; 422 memcpy(de, &df, sizeof(exfat_dentry_t));423 *de = df; 423 424 di->b->dirty = true; 424 425 rc = exfat_directory_next(di); … … 430 431 if (rc != EOK) 431 432 return rc; 432 memcpy(de, &ds, sizeof(exfat_dentry_t));433 *de = ds; 433 434 di->b->dirty = true; 434 435 … … 451 452 return rc; 452 453 de->type = EXFAT_TYPE_NAME; 453 memcpy((uint8_t*)de->name.name, (uint8_t*)sname, sizeof(uint16_t)*chars); 454 /* test */ 455 for (j=0; j<chars; j++){ 456 de->name.name[j] = *sname; 457 sname++; 458 } 459 454 460 di->b->dirty = true; 455 461 sname += chars;
Note:
See TracChangeset
for help on using the changeset viewer.