Commit graph

99 commits

Author SHA1 Message Date
Warner Losh 4d65a7c695 usr.sbin: Automated cleanup of cdefs and other formatting
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
2023-11-26 22:24:01 -07:00
Warner Losh fa9896e082 Remove $FreeBSD$: two-line nroff pattern
Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/
2023-08-16 11:55:10 -06:00
Warner Losh d0b2dbfa0e Remove $FreeBSD$: one-line sh pattern
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
2023-08-16 11:55:03 -06:00
Warner Losh 1d386b48a5 Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
2023-08-16 11:54:42 -06:00
Simon J. Gerraty d9a4274795 Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
Baptiste Daroussin cbc83e378a ncurses: chase dependency changes in the source tree
Differential Revision:	https://reviews.freebsd.org/D32098
2021-10-04 11:38:24 +02:00
Gleb Smirnoff 71f0077631 Remove sio(4).
It had been disconnected from build in r181233 in 2008.

Reviewed by:	imp
2019-11-21 01:24:49 +00:00
Pedro F. Giffuni 33d72c30f1 Revert r327005 - SPDX tags for license similar to BSD-2-Clause.
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
2017-12-20 20:25:28 +00:00
Pedro F. Giffuni d17aef79bb SPDX: These are fundamentally BSD-2-Clause.
They just omit the introductory line and numbering.
2017-12-19 22:40:16 +00:00
Pedro F. Giffuni 9b10f59a10 SPDX: mostly fixes to previous changes.
Introduce the recently approved BSD-1-Clause and replace 0BSD which
never did fit well our use cases.
2017-12-13 16:13:17 +00:00
Pedro F. Giffuni 8820ecc040 SPDX: Fix some cases wrongly attributed to MIT.
In the cases of BSD-style license variants without clauses, use 0BSD for
the time being in lack of a better description.
2017-11-30 15:10:11 +00:00
Pedro F. Giffuni 1de7b4b805 various: general adoption of SPDX licensing ID tags.
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.
2017-11-27 15:37:16 +00:00
Bryan Drewery ea825d0274 DIRDEPS_BUILD: Update dependencies.
Sponsored by:	Dell EMC Isilon
2017-10-31 00:07:04 +00:00
Xin LI ec15b81be1 Use strlcpy() when the string is expected to be nul-terminated.
MFC after:	2 weeks
2015-10-06 22:49:25 +00:00
Simon J. Gerraty ccfb965433 Add META_MODE support.
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
2015-06-13 19:20:56 +00:00
Simon J. Gerraty 44d314f704 dirdeps.mk now sets DEP_RELDIR 2015-06-08 23:35:17 +00:00
Simon J. Gerraty 98e0ffaefb Merge sync of head 2015-05-27 01:19:58 +00:00
Baptiste Daroussin c6db8143ed Convert usr.sbin to LIBADD
Reduce overlinking
2014-11-25 16:57:27 +00:00
Simon J. Gerraty ee7b0571c2 Merge head from 7/28 2014-08-19 06:50:54 +00:00
Brooks Davis 80189b3b09 Replace all uses of libncurses and libtermcap with their wide character
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
2014-07-17 18:24:34 +00:00
Baptiste Daroussin 01c2b8ac0d use .Mt to mark up email addresses consistently (part2)
PR:		191174
Submitted by:	Franco Fichtner  <franco@lastsummer.de>
2014-06-20 09:57:27 +00:00
Simon J. Gerraty fae50821ae Updated dependencies 2014-05-16 14:09:51 +00:00
Simon J. Gerraty 76b28ad6ab Updated dependencies 2014-05-10 05:16:28 +00:00
Simon J. Gerraty d466a5b069 Merge head 2013-09-11 18:16:18 +00:00
Jilles Tjoelker 79e6a2c01e watch: Do not mess up the tty modes on early error.
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
2013-09-05 19:02:03 +00:00
Simon J. Gerraty 7cf3a1c6b2 Updated dependencies 2013-03-11 17:21:52 +00:00
Simon J. Gerraty f5f7c05209 Updated dependencies 2013-02-16 01:23:54 +00:00
Marcel Moolenaar 7750ad47a9 Sync FreeBSD's bmake branch with Juniper's internal bmake branch.
Requested by: Simon Gerraty <sjg@juniper.net>
2012-08-22 19:25:57 +00:00
Ed Schouten 0ba64b2731 Perform even more style changes.
- 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
2012-03-10 14:38:34 +00:00
Ed Schouten f10070765a Fix whitespace.
MFC after:	1 week
2012-03-10 14:35:09 +00:00
Ed Schouten 2e37c8eacb Convert the snp(4) driver to use cdevpriv.
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.
2008-08-15 13:07:07 +00:00
Rink Springer 868f9ca26a Allow watch(8) to use more than 10 snp* devices. This limitation was purely
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
2008-01-30 13:55:32 +00:00
Olivier Houchard cb74d4b2b4 Close the tty file descriptor once we're done with it.
Use O_NONBLOCK when opening the tty device.

Suggested by:   bde
Submitted by:   ru
2005-09-21 14:30:14 +00:00
Ruslan Ermilov 6ed0b39d28 Restore the ability to detach from a tty via SIOCSTTY and document
recent changes in a manpage.

Reviewed by:	cognet
2005-09-19 13:48:45 +00:00
Olivier Houchard b615d79f9b Open the tty device and pass the fd for SNPSTTY.
MFC after:	3 days
2005-09-18 19:24:05 +00:00
Ruslan Ermilov 59a3c79da6 Sort sections. 2005-01-18 20:02:45 +00:00
Christian S.J. Peron f8da56fda8 By default, the watch utility will attempt to open /dev/snp0, if
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)
2004-08-10 01:49:46 +00:00
Ruslan Ermilov 455fb174df Eliminated double whitespace. 2004-07-03 18:35:53 +00:00
Ruslan Ermilov 07bfccd71e Mechanically kill hard sentence breaks. 2004-07-02 23:13:00 +00:00
Christian S.J. Peron 0f27b90770 Remove constant which makes the assumption that the length of
_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
2004-05-29 21:03:00 +00:00
Peter Grehan 5cfe0423e6 Userland signed char fixes for PPC build. Problems were using a char
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
2004-01-22 07:23:36 +00:00
David E. O'Brien b728350ee6 Use __FBSDID over rcsid[]. Protect copyright[] where needed. 2003-05-03 21:06:42 +00:00
David E. O'Brien 052238b16c style.Makefile(5) 2003-04-04 17:49:21 +00:00
Jens Schweikhardt d64ada501a Fix typos, mostly s/ an / a / where appropriate and a few s/an/and/
Add FreeBSD Id tag where missing.
2002-12-30 21:18:15 +00:00
Thomas Moestl ba964e50b0 The FIONREAD sysctl operates on an int *, not a size_t *.
Reviewed by:	dd
2002-11-11 10:56:57 +00:00
Mike Heffner 2f92b79ff6 Add break's to case blocks.
PR:		bin/41511
Submitted by:	Daniel Hagan <dhagan@acm.vt.edu>
2002-08-10 08:42:10 +00:00
Philippe Charnier 490d5836b5 The .Nm utility 2002-07-14 14:47:15 +00:00
Warner Losh 48462fb1b7 de __P
ANSI functions
minor knf
2002-06-12 04:28:15 +00:00
Bruce Evans 4c995cc66e #include <time.h> for the definition of time functions instead of
depending on namespace pollution 2 layers deep in <sys/stat.h>.
2002-02-25 05:31:49 +00:00
Dima Dorfman d3573aab8e Talk about what the user needs to do to get the snp devices, and how
watch(8) will try to help them by loading the module.

PR:		25420
2001-11-24 17:02:58 +00:00