/usr/bin/avos:AOS parse version()
From ArchosDocs
Description
Parse the VERS block.
References To
The Code
int AOS_parse_version(int fd /* -0x28 */)
{
char buf[8]; // -0x20
int ret; // -0x18
int pos; // -0x14
int read; // -0x10
ret = 0;
pos = 0;
read = 0;
pos = (uint32_t)ftell64(fd);
if(pos == AOS_file_length)
return 252;
read = _aos_read(fd, &buf, 8);
if(read != 8)
return 209;
pos += *(uint32_t *)&buf[4];
if(*(uint32_t *)&buf[0] != 0x56455253 /* VERS */)
ret = 236;
else {
ret = AOS_callback_compare_versions(fd);
}
_aos_seek(fd, SEEK_SET, pos);
return ret;
}

