Add versionCode parser for package list.
Bug: 123186697 Change-Id: I9194cc55abd943c4b8b2f9d29dcad035170f2736
This commit is contained in:
parent
d5345f58fd
commit
bda4041912
|
@ -54,6 +54,7 @@ struct pkg_info {
|
|||
gid_list gids;
|
||||
void *private_data;
|
||||
bool profileable_from_shell;
|
||||
long version_code;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -239,6 +239,15 @@ extern bool packagelist_parse(pfn_on_package callback, void *userdata)
|
|||
|
||||
pkg_info->profileable_from_shell = (bool)tmp;
|
||||
}
|
||||
cur = strsep(&next, " \t\r\n");
|
||||
if (cur) {
|
||||
tmp = strtoul(cur, &endptr, 10);
|
||||
if (*endptr != '\0') {
|
||||
errmsg = "Could not convert field \"versionCode\" to integer value";
|
||||
goto err;
|
||||
}
|
||||
pkg_info->version_code = tmp;
|
||||
}
|
||||
|
||||
rc = callback(pkg_info, userdata);
|
||||
if (rc == false) {
|
||||
|
|
Loading…
Reference in New Issue