Date: Wed, 11 Aug 1999 08:21:02 -0400 (EDT) From: James Howard <howardjp@wam.umd.edu> To: FreeBSD-gnats-submit@freebsd.org Subject: bin/13072: Extensions to biff(1) Message-ID: <199908111221.IAA04680@rac10.wam.umd.edu>
index | next in thread | raw e-mail
>Number: 13072
>Category: bin
>Synopsis: Extensions to biff(1)
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Wed Aug 11 05:30:03 PDT 1999
>Closed-Date:
>Last-Modified:
>Originator: James Howard
>Release: FreeBSD 3.2-STABLE i386
>Organization:
University of Maryland
>Environment:
FreeBSD byzantine 3.2-STABLE FreeBSD 3.2-STABLE #5: Sat Aug 7 23:43:54 GMT 1999 root@byzantine:/usr/src/sys/compile/BYZANTINE i386
>Description:
Often when I am logged in via telnet to a FreeBSD host, I use Lynx to
download files. If it is a large download, the arrival of mail
notifications can mess up the display of Lynx's status. This patch
to biff(1) will allow you to use "biff -t tty" report or change the
status of tty instead of the current. I do this often from a second
telnet session.
>How-To-Repeat:
Irrelevant.
>Fix:
diff -c /usr/src/usr.bin/biff/biff.1 /usr/local/src/usr.bin/biff/biff.1
*** /usr/src/usr.bin/biff/biff.1 Mon Jun 23 06:45:37 1997
--- /usr/local/src/usr.bin/biff/biff.1 Wed Aug 11 00:22:55 1999
***************
*** 40,45 ****
--- 40,46 ----
.Nd "be notified if mail arrives and who it is from"
.Sh SYNOPSIS
.Nm biff
+ .Op Fl t Ar tty
.Op Cm n | y
.Sh DESCRIPTION
.Nm Biff
***************
*** 48,54 ****
.Pp
Options supported by
.Nm biff :
! .Bl -tag -width 4n
.It Cm n
Disables notification.
.It Cm y
--- 49,59 ----
.Pp
Options supported by
.Nm biff :
! .Bl -tag -width 8n
! .It Fl t Ar tty
! Report or change the status of
! .Ar tty
! rather than the current terminal.
.It Cm n
Disables notification.
.It Cm y
diff -c /usr/src/usr.bin/biff/biff.c /usr/local/src/usr.bin/biff/biff.c
*** /usr/src/usr.bin/biff/biff.c Sun Dec 6 22:58:12 1998
--- /usr/local/src/usr.bin/biff/biff.c Wed Aug 11 00:30:25 1999
***************
*** 46,51 ****
--- 46,52 ----
#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
+ #include <paths.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
***************
*** 63,71 ****
int ch;
char *name;
!
! while ((ch = getopt(argc, argv, "")) != -1)
switch(ch) {
case '?':
default:
usage();
--- 64,75 ----
int ch;
char *name;
! name = NULL;
! while ((ch = getopt(argc, argv, "t:")) != -1)
switch(ch) {
+ case 't':
+ name = optarg;
+ break;
case '?':
default:
usage();
***************
*** 73,81 ****
argc -= optind;
argv += optind;
! if ((name = ttyname(STDERR_FILENO)) == NULL)
! err(2, "unknown tty");
if (stat(name, &sb))
err(2, "stat");
--- 77,87 ----
argc -= optind;
argv += optind;
! if (name == NULL)
! if ((name = ttyname(STDERR_FILENO)) == NULL)
! err(2, "unknown tty");
+ (void)chdir(_PATH_DEV);
if (stat(name, &sb))
err(2, "stat");
***************
*** 102,107 ****
static void
usage()
{
! (void)fprintf(stderr, "usage: biff [y | n]\n");
exit(2);
}
--- 108,113 ----
static void
usage()
{
! (void)fprintf(stderr, "usage: biff [-t tty] [y | n]\n");
exit(2);
}
>Release-Note:
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199908111221.IAA04680>
