Skip to content

Commit

Permalink
file_list: Add ubi flag
Browse files Browse the repository at this point in the history
This flag is added to better support flashing UBI image with Android
sparse images. Android fastboot splits images which are bigger than the
free memory into multiple images which are then transferred in multiple
fastboot sessions. In a session which is not the first one we can no
longer detect if an image is a UBI image or not, so we need a flag to
make this explicit.

Signed-off-by: Sascha Hauer <[email protected]>
  • Loading branch information
saschahauer committed Jan 17, 2018
1 parent c5ebb4d commit 1930c3d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions common/file-list.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ static int file_list_parse_one(struct file_list *files, const char *partstr, con
case 'c':
flags |= FILE_LIST_FLAG_CREATE;
break;
case 'u':
flags |= FILE_LIST_FLAG_UBI;
break;
default:
pr_err("Unknown flag '%c'\n", *partstr);
return -EINVAL;
Expand Down
1 change: 1 addition & 0 deletions include/file-list.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#define FILE_LIST_FLAG_SAFE (1 << 0)
#define FILE_LIST_FLAG_READBACK (1 << 1)
#define FILE_LIST_FLAG_CREATE (1 << 2)
#define FILE_LIST_FLAG_UBI (1 << 3)

struct file_list_entry {
char *name;
Expand Down

0 comments on commit 1930c3d

Please sign in to comment.