int ff_pread(int fd, byte *buffer, int sz)
{
    FIL *f = &fd_pool[fd].f;
    FRESULT ret;
    unsigned int rsz;
    if (fd_pool[fd].used == 0)
        return -1;
    ret = f_read(f, buffer, sz, &rsz);
    if (ret != FR_OK)
        return -1;
    return rsz;
}
int ff_pread(int fd, byte *buffer, int sz)
{
    FIL *f = &fd_pool[fd].f;
    FRESULT ret;
    unsigned int rsz;
    if (fd_pool[fd].used == 0)
        return -1;
    ret = f_read(f, buffer, sz, &rsz);
    if (ret != FR_OK)
        return -1;
    return rsz;
}