Re: [PATCH 1/7] libfile: introduce copy_file_2 for copying starting with offset

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 12, 2019 at 03:37:49PM +0200, Ahmad Fatoum wrote:
> Hello Uwe,
> 
> On 9/12/19 3:06 PM, Uwe Kleine-König wrote:
> > Hello Ahmad,
> > 
> > On Thu, Sep 12, 2019 at 12:28:59PM +0200, Ahmad Fatoum wrote:
> >> barebox already has a copy_file for copying files. Extend the API by a
> >> copy_file_2 that takes a source offset into account.
> > 
> > Can you give that function a more descriptive name? Something like
> > copy_file_from_offset()?
> 
> I chose copy_file_2 for consistency with the read_file function, which
> had a copy renamed to read_file_2 when it gained a (max) offset parameter.
> 
> Should read_file_2 be renamed as well? 

read_file_2 is named like that because it is a better read_file.
copy_file_2 more looks like another type of copy_file, so I too would
prefer copy_file_from_offset, or even better with an additional size
or end argument and named copy_file_window ;)

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux