Re: [PATCH v4 1/9] loop:refactor: extract subfunction open_file()

2022-12-12 Thread Denys Vlasenko
On Mon, Nov 21, 2022 at 2:58 PM Xiaoming Ni wrote: > +static int open_file(const char *file, unsigned flags, int *mode) > +{ > + int ffd; > + /* open the file. barf if this doesn't work. */ > + *mode = (flags & BB_LO_FLAGS_READ_ONLY) ? O_RDONLY : O_RDWR; > + retry_open_ffd: >

[PATCH v4 1/9] loop:refactor: extract subfunction open_file()

2022-11-21 Thread Xiaoming Ni
Step 1 of micro-refactoring the set_loop(): Extract subfunction open_file() from set_loop() function old new delta set_loop 760 758 -2