Page MenuHomeFreeBSD

D30667.1783474358.diff
No OneTemporary

Size
763 B
Referenced Files
None
Subscribers
None

D30667.1783474358.diff

Index: usr.bin/tail/tail.c
===================================================================
--- usr.bin/tail/tail.c
+++ usr.bin/tail/tail.c
@@ -268,8 +268,22 @@
if (rflag)
reverse(stdin, fn, style, off, &sb);
- else
- forward(stdin, fn, style, off, &sb);
+ 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);

File Metadata

Mime Type
text/plain
Expires
Wed, Jul 8, 1:32 AM (2 h, 19 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29026887
Default Alt Text
D30667.1783474358.diff (763 B)

Event Timeline