Index: usr.bin/tail/tail.c =================================================================== --- usr.bin/tail/tail.c +++ usr.bin/tail/tail.c @@ -268,8 +268,20 @@ if (rflag) reverse(stdin, fn, style, off, &sb); - else + else if (fflag) { + file = (struct file_info *) malloc(sizeof(struct file_info)); + if (!file) + err(1, "Couldn't malloc space for file descriptors."); + file->file_name = strdup(fn); + if (! file->file_name) + errx(1, "Couldn't malloc space for file name."); + file->fp = stdin; + follow(file, style, off); + free(file->file_name); + free(file); + } else { forward(stdin, fn, style, off, &sb); + } } fileargs_free(fa); exit(rval);