On Mon, 7 Dec 2015 12:03:41 +0100
Bernhard Nortmann <[email protected]> wrote:

> Am 30.11.2015 um 12:30 schrieb Siarhei Siamashka:
> > What if "name" is, for example, a directory instead of a file?
> >
> > [...]
> > If the file does not exist, what is the "sunxi-fel" tool supposed to do?
> > Do we want to silently ignore this?  
> 
> Agreed. That was too much on the "quick and dirty side". I've reworked
> file_size() to give proper error messages, requiring <filename> to specify
> a regular file. It's size may be 0 (no error).
> 
> Considering your other comments for the patches that build on file_upload(),
> I had to rethink that one too. What we actually want is a "multi_upload",
> where the file count is possibly 1 (for the single-file commands), and the
> ability to specify the progress callback routine to use. I've now chosen an
> implementation of file_upload() that works on multiple file arguments (each
> being an offset + filename pair), while accessing the command line arguments
> as needed.

Thanks for making these corrections. I have pushed your updated patches
to the sunxi-tools git repository. If there are still some minor
problems, they can be corrected separately before tagging the next
sunxi-tools release.

For example, I can see that the 'size_t' vs. 'unsigned int' problem
strikes again:

fel.c: In function ‘aw_write_buffer’:
fel.c:299:4: warning: format ‘%X’ expects argument of type ‘unsigned int’, but 
argument 4 has type ‘size_t’ [-Wformat=]
    uboot_entry, uboot_entry + uboot_size);
    ^

But this had been already introduced as a part of the earlier patch
set. I'm going to do a more thorough testing of this new code and
will prepare the necessary fixes. It might be a good idea to also
do some extra tests with valgrind and static code analysis tools.

Thanks again.

-- 
Best regards,
Siarhei Siamashka

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to