Denys Vlasenko wrote: >I added code to only do a reading pass if the file is a regular file: >think about "less /dev/SOMETHING".
If the file can't be opened or isn't regular num_lines should be set to something other than READING_FILE (READING_STDIN would do, or some other negative value). Otherwise the next call to m_status_print will just try to read it again. Better, though, might be to put the test in open_file_and_read_lines, where all input files are opened. This would prevent read_lines from trying to read non-regular files. The real 'less' does this: [rmy@vulcan ~]$ less /dev/zero /dev/zero is not a regular file (use -f to see it) [rmy@vulcan ~]$ Ron _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
