Commit Graph

5 Commits

Author SHA1 Message Date
Alex Deymo 9a535b5188 fat16copy: Allow to copy files to an existing directory.
This patch re-uses existing directories when copying directories,
allowing to copy files to a directory previously created.

Bug: 34811400
Test: fat16copy.py fat.bin a/b/foo; fat16copy.py fat.bin c/d/foo

(cherry-picked from 0af24a27a8d0dc7e1782f36a5a9963021ff8b3f6)

Change-Id: I283184da18f3c4951d6c84aafa4185074791acd2
2017-02-13 16:00:07 +00:00
Alex Deymo a1c977735b fat16copy: Fix allocation logic when extending directories.
When extending a directory, empty directory entries were left behind
signaling the end of a directory.

Bug: 31570546
Test: make dist; mdir shows all the files.

(cherry picked from commit d4516300b010c8155861e310dac871e8c10d3382)

Change-Id: Ie3d82cfaad51be73911293a54d18746e8adf62a2
2016-09-23 14:21:43 -07:00
Alex Deymo 567c5d0f95 fat16copy: Sort new directory entries.
Sort the entries returned by os.listdir to give a consistent ordering
across build.

Bug: None
Test: `make dist`

(cherry picked from commit ef34e5dca216e61fd81020e818f247f6ce47d26e)

Change-Id: I2f80889684f108208f07e13d725acaa7bc0ab099
2016-09-23 14:21:38 -07:00
Casey Dahlin df71efe378 Make fat16copy.py add . and .. entries to directories
Test: fsck no longer complains
Bug: None

(cherry picked from commit 7d38ec37432c307d729b9a8fdb78dbf820427538)

Change-Id: I587f400df2f57b987df8b92d551c99f2f42a9af6
2016-09-23 14:21:31 -07:00
Casey Dahlin 29e2b21c0a Add tool to copy files in to fat16 images
fat16copy.py can be used to copy files or directories in to the root of
a fat16 image.

Usage: fat16copy <image> <file> [<file> ...]

Test: Used to compose a Raspberry Pi 3 boot image
Bug: 28912590
Change-Id: I29c9eec3786e2c5cc94f9a160360bac850809a93
2016-09-02 14:13:47 -07:00