| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
- Remove unneeded whitespace for function calls.
- Add empty line at the top of functions without local variables.
- Change while (1) to for (;;).
MFC after: 1 week
|
|
|
|
| |
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now we have a single /dev/snp device node, which can be opened by
watch(8) multiple times. Even though snp(4) will be dead as of next
week, it's nice having this in SVN, because:
- We may want to MFC it to RELENG_7.
- By the time we fix snp(4) again, it's already there, existing watch(8)
binaries should already work.
Just like bpf(4), I'm adding a symlink from snp0 to snp to remain binary
compatible.
|
|
|
|
|
|
|
|
|
|
| |
due to the way watch(8) looks for available snoop devices.
PR: bin/118286
Submitted by: Mykola Zubach <zuborg@advancedhosters.com>
Reviewed by: rwatson, csjp, imp (all a long time ago)
Approved by: imp (mentor) (long time ago)
MFC after: 1 week
|
|
|
|
|
|
|
| |
Use O_NONBLOCK when opening the tty device.
Suggested by: bde
Submitted by: ru
|
|
|
|
|
|
| |
recent changes in a manpage.
Reviewed by: cognet
|
|
|
|
| |
MFC after: 3 days
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
another process already has /dev/snp0 open, the snp(4) will return
EBUSY, in which case watch will try to open /dev/snp1..9. Currently
watch does not check errno to see if the failure was a result of EBUSY.
This results in watch making futile attempts to open snp0..snp9 even
though devices may not exist or the caller does not have permissions
to access the device.
In addition to this, it attempts to setup the screen for snooping even
though it may not ever get an snp device.
So this patch does two things
1) Checks errno for EBUSY, if open(2) fails for another reason
print that reason and exit.
2) setup the terminal for snooping after the snp descriptor has
been obtained.
Approved by: bmilekic (mentor)
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
_PATH_DEV will never change. In the un-likely event that _PATH_DEV
should ever change, watch(8) would have broke because of a
mis-generated device name.
Approved by: bmilekic (mentor)
Pointed out by: Yvan Boily
|
|
|
|
|
|
|
|
|
| |
return for getopt() and comparing to -1, ditto with fgetc() and EOF,
and using the kg_nice value from <sys/user.h>
Submitted by: Stefan Farfeleder <stefan@fafoe.narf.at>
Reviewed by: obrien, bde (a while back)
Tested lightly on: ppc, i386, make universe
|
| |
|
| |
|
|
|
|
| |
Add FreeBSD Id tag where missing.
|
|
|
|
| |
Reviewed by: dd
|
|
|
|
|
| |
PR: bin/41511
Submitted by: Daniel Hagan <dhagan@acm.vt.edu>
|
| |
|
|
|
|
|
| |
ANSI functions
minor knf
|
|
|
|
| |
depending on namespace pollution 2 layers deep in <sys/stat.h>.
|
|
|
|
|
|
| |
watch(8) will try to help them by loading the module.
PR: 25420
|
|
|
|
| |
delta. Remove fake SCCS id while I'm here.
|
|
|
|
|
|
|
|
| |
was never technically true (it's snp(4) that required root, not
watch(8)), and after snp.c 1.64, isn't even effectively true, since
who can run watch(8) depends on the permissions of the snp device(s).
Sort options in SYNOPSIS and DESCRIPTION while I'm here.
|
|
|
|
|
|
|
| |
Previously, watch would always use the first device it could
successfully open, but this isn't always desired. Specifically, it
may not be desired during debugging (of snp), or if a particular snp
device has different permissions (which makes since after snp.c 1.64).
|
|
|
|
|
|
| |
change terminals being watched. This change makes watch pass the
<control-X> through to the terminal if it's not being intercepted--
previously, the keypress would simply be dropped.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
These are not perfectly in agreement with each other style-wise, but they
are orders of orders of magnitude more consistent style-wise than before.
|
|
|
|
|
|
|
| |
functions, remove an unused function, and silence other assorted
warnings.
Set WARNS=2.
|
|
|
|
| |
specify the command name.
|
|
|
|
| |
- MAN[1-9] -> MAN.
|
|
|
|
|
|
| |
added security benefit, as it doesn't provide extra privilege.
Protection against inappropriate snooping is done by protecting
/dev/snp* properly.
|
| |
|
|
|
|
| |
Use _PATH_* where where possible.
|
| |
|
|
|
|
| |
-Wall cleaning.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
track.
The Id line is normally at the bottom of the main comment block in the
man page, separated from the rest of the manpage by an empty comment,
like so;
.\" $Id$
.\"
If the immediately preceding comment is a @(#) format ID marker than the
the $Id$ will line up underneath it with no intervening blank lines.
Otherwise, an additional blank line is inserted.
Approved by: bde
|
| |
|
| |
|
|
|
|
| |
posix standard on the topic.
|
| |
|
|
|
|
|
|
|
|
|
| |
2. fix a potential buffer oflow,
3. makes watch(8) conform to sysexits(3).
Not a strong 2.2 candidate even if it would be nice.
Reviewed by: joerg, imp
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.
Boy, I'm glad we're not using sup anymore. This update would have been
insane otherwise.
|