Re: Improve fw_update(9) output on errors somewhat

2023-10-01 Thread Andrew Hewus Fresh
I have not gotten nearly enough positive feedback for the previous iterations of this to be really comfortable this close to release. This version doesn't solve any of the less common failure cases, but it makes the normal "fw_update" when there is no network look nicer. I can look at bringing ba

Re: Improve fw_update(9) output on errors somewhat

2023-09-30 Thread Andrew Hewus Fresh
Here's the next iteration. I'll probably commit it later this weekend unless someone finds issues with it. Here we trap errors from `ftp` unless we're using the verbose modes with progress bars. We then parse those to guess whether we might be able to find a different firmware (currently only 40

Re: Improve fw_update(9) output on errors somewhat

2023-09-27 Thread Andrew Hewus Fresh
Here's a slightly simpler try suggested by deraadt@. I capture ftp's STDERR and move it to the special "WARN_FD" that groups errors without confusing the status line. I also strip the "name" off the error as it looks a bit nicer than repeating it everywhere. If the fetch fails, we return 1 if we