aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/watch
Commit message (Collapse)AuthorAgeFilesLines
* usr.sbin: Automated cleanup of cdefs and other formattingWarner Losh2023-11-271-1/+0
| | | | | | | | | | | | | | | | Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row. Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/ Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/ Remove /\n+#if.*\n#endif.*\n+/ Remove /^#if.*\n#endif.*\n/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/ Sponsored by: Netflix
* Remove $FreeBSD$: two-line nroff patternWarner Losh2023-08-161-2/+0
| | | | Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/
* Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-162-2/+0
| | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
* Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-161-2/+0
| | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
* Update/fix Makefile.depend for userlandSimon J. Gerraty2023-04-191-2/+1
|
* ncurses: chase dependency changes in the source treeBaptiste Daroussin2021-10-041-1/+1
| | | | Differential Revision: https://reviews.freebsd.org/D32098
* Remove sio(4).Gleb Smirnoff2019-11-211-1/+0
| | | | | | | | | It had been disconnected from build in r181233 in 2008. Reviewed by: imp Notes: svn path=/head/; revision=354929
* Revert r327005 - SPDX tags for license similar to BSD-2-Clause.Pedro F. Giffuni2017-12-201-2/+0
| | | | | | | | | | | | | | | | | | After consultation with SPDX experts and their matching guidelines[1], the licensing doesn't exactly match the BSD-2-Clause. It yet remains to be determined if they are equivalent or if there is a recognized license that matches but it is safer to just revert the tags. Let this also be a reminder that on FreeBSD, SPDX tags are only advisory and have no legal value (but IANAL). Pointyhat to: pfg Thanks to: Rodney Grimes, Gary O'Neall [1] https://spdx.org/spdx-license-list/matching-guidelines Notes: svn path=/head/; revision=327040
* SPDX: These are fundamentally BSD-2-Clause.Pedro F. Giffuni2017-12-191-1/+1
| | | | | | | They just omit the introductory line and numbering. Notes: svn path=/head/; revision=327005
* SPDX: mostly fixes to previous changes.Pedro F. Giffuni2017-12-131-1/+1
| | | | | | | | Introduce the recently approved BSD-1-Clause and replace 0BSD which never did fit well our use cases. Notes: svn path=/head/; revision=326823
* SPDX: Fix some cases wrongly attributed to MIT.Pedro F. Giffuni2017-11-301-1/+1
| | | | | | | | In the cases of BSD-style license variants without clauses, use 0BSD for the time being in lack of a better description. Notes: svn path=/head/; revision=326398
* various: general adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-271-1/+3
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. No functional change intended. Notes: svn path=/head/; revision=326276
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2017-10-311-1/+0
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325188
* Use strlcpy() when the string is expected to be nul-terminated.Xin LI2015-10-061-2/+2
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=288960
* Add META_MODE support.Simon J. Gerraty2015-06-131-0/+19
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp Notes: svn path=/head/; revision=284345
| * dirdeps.mk now sets DEP_RELDIRSimon J. Gerraty2015-06-081-2/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=284172
| * Merge sync of headSimon J. Gerraty2015-05-271-2/+1
| |\ | |/ |/| | | Notes: svn path=/projects/bmake/; revision=283595
| * Merge head from 7/28Simon J. Gerraty2014-08-193-4/+3
| |\ | | | | | | | | | Notes: svn path=/projects/bmake/; revision=270164
| * | Updated dependenciesSimon J. Gerraty2014-05-161-1/+0
| | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=266219
| * | Updated dependenciesSimon J. Gerraty2014-05-101-0/+2
| | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265802
| * | Merge headSimon J. Gerraty2013-09-111-1/+2
| |\ \ | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=255477
| * | | Updated dependenciesSimon J. Gerraty2013-03-111-0/+1
| | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=248169
| * | | Updated dependenciesSimon J. Gerraty2013-02-161-2/+0
| | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=246868
| * | | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.Marcel Moolenaar2012-08-221-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net> Notes: svn path=/projects/bmake/; revision=239572
* | | | Convert usr.sbin to LIBADDBaptiste Daroussin2014-11-251-2/+1
| |_|/ |/| | | | | | | | | | | | | | | | | Reduce overlinking Notes: svn path=/head/; revision=275054
* | | Replace all uses of libncurses and libtermcap with their wide characterBrooks Davis2014-07-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | variants. This allows usable file system images (i.e. those with both a shell and an editor) to be created with only one copy of the curses library. Exp-run: antoine PR: 189842 Discussed with: bapt Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=268804
* | | use .Mt to mark up email addresses consistently (part2)Baptiste Daroussin2014-06-201-1/+1
| |/ |/| | | | | | | | | | | | | PR: 191174 Submitted by: Franco Fichtner <franco@lastsummer.de> Notes: svn path=/head/; revision=267668
* | watch: Do not mess up the tty modes on early error.Jilles Tjoelker2013-09-051-1/+2
|/ | | | | | | | | | | | | Record the initial state earlier, so it is always safe to restore it. One way this happens is if watch(8) is started by a user that does not have access to /dev/snp. The result is "staircase effect" during later commands. PR: bin/153052 MFC after: 1 week Notes: svn path=/head/; revision=255261
* Perform even more style changes.Ed Schouten2012-03-101-4/+8
| | | | | | | | | | | - 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 Notes: svn path=/head/; revision=232781
* Fix whitespace.Ed Schouten2012-03-101-35/+29
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=232780
* Convert the snp(4) driver to use cdevpriv.Ed Schouten2008-08-151-16/+7
| | | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=181755
* Allow watch(8) to use more than 10 snp* devices. This limitation was purelyRink Springer2008-01-301-6/+5
| | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=175824
* Close the tty file descriptor once we're done with it.Olivier Houchard2005-09-211-8/+8
| | | | | | | | | | Use O_NONBLOCK when opening the tty device. Suggested by: bde Submitted by: ru Notes: svn path=/head/; revision=150417
* Restore the ability to detach from a tty via SIOCSTTY and documentRuslan Ermilov2005-09-191-3/+3
| | | | | | | | | recent changes in a manpage. Reviewed by: cognet Notes: svn path=/head/; revision=150322
* Open the tty device and pass the fd for SNPSTTY.Olivier Houchard2005-09-181-2/+8
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=150299
* Sort sections.Ruslan Ermilov2005-01-181-5/+5
| | | | Notes: svn path=/head/; revision=140442
* By default, the watch utility will attempt to open /dev/snp0, ifChristian S.J. Peron2004-08-101-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | 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) Notes: svn path=/head/; revision=133419
* Eliminated double whitespace.Ruslan Ermilov2004-07-031-1/+1
| | | | Notes: svn path=/head/; revision=131531
* Mechanically kill hard sentence breaks.Ruslan Ermilov2004-07-021-4/+8
| | | | Notes: svn path=/head/; revision=131500
* Remove constant which makes the assumption that the length ofChristian S.J. Peron2004-05-291-2/+3
| | | | | | | | | | | | _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 Notes: svn path=/head/; revision=129849
* Userland signed char fixes for PPC build. Problems were using a charPeter Grehan2004-01-221-2/+2
| | | | | | | | | | | | 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 Notes: svn path=/head/; revision=124830
* Use __FBSDID over rcsid[]. Protect copyright[] where needed.David E. O'Brien2003-05-031-4/+2
| | | | Notes: svn path=/head/; revision=114601
* style.Makefile(5)David E. O'Brien2003-04-041-1/+1
| | | | Notes: svn path=/head/; revision=113091
* Fix typos, mostly s/ an / a / where appropriate and a few s/an/and/Jens Schweikhardt2002-12-301-1/+1
| | | | | | | Add FreeBSD Id tag where missing. Notes: svn path=/head/; revision=108470
* The FIONREAD sysctl operates on an int *, not a size_t *.Thomas Moestl2002-11-111-9/+8
| | | | | | | Reviewed by: dd Notes: svn path=/head/; revision=106769
* Add break's to case blocks.Mike Heffner2002-08-101-0/+2
| | | | | | | | PR: bin/41511 Submitted by: Daniel Hagan <dhagan@acm.vt.edu> Notes: svn path=/head/; revision=101636
* The .Nm utilityPhilippe Charnier2002-07-141-6/+9
| | | | Notes: svn path=/head/; revision=99968
* de __PWarner Losh2002-06-121-39/+30
| | | | | | | | ANSI functions minor knf Notes: svn path=/head/; revision=98140
* #include <time.h> for the definition of time functions instead ofBruce Evans2002-02-251-0/+1
| | | | | | | depending on namespace pollution 2 layers deep in <sys/stat.h>. Notes: svn path=/head/; revision=91229
* Talk about what the user needs to do to get the snp devices, and howDima Dorfman2001-11-241-2/+12
| | | | | | | | | watch(8) will try to help them by loading the module. PR: 25420 Notes: svn path=/head/; revision=86867