History log of /freebsd-current/usr.sbin/fwcontrol/fwcontrol.c
Revision Date Author Comments
# 1d386b48 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# f1897613 08-Oct-2019 Brooks Davis <brooks@FreeBSD.org>

Fix various -Wpointer-compare warnings

This warning (comparing a pointer against a zero character literal
rather than NULL) has existed since GCC 7.1.0, and was recently added to
Clang trunk.

Almost all of these are harmless, except for fwcontrol's str2node, which
needs to both guard against dereferencing a NULL pointer (though in
practice it appears none of the callers will ever pass one in), as well
as ensure it doesn't parse the empty string as node 0 due to strtol's
awkward interface.

Submitted by: James Clarke <jtrc27@jrtc27.com>
Obtained from: CheriBSD
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D21914


# df57947f 18-Nov-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

spdx: initial adoption of licensing ID tags.

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.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.

Initially, only tag files that use BSD 4-Clause "Original" license.

RelNotes: yes
Differential Revision: https://reviews.freebsd.org/D13133


# 3df5ecac 30-Dec-2011 Ulrich Spörlein <uqs@FreeBSD.org>

Spelling fixes for usr.sbin/


# 520374b5 21-Dec-2011 Eitan Adler <eadler@FreeBSD.org>

- Remove extraneous null ptr deref checks
- Fix memory leak

Submitted by: Slono Slono <slonoman2011@yandex.ru>
Approved by: jhb
MFC after: 1 week


# f55df2a2 09-Dec-2010 Kevin Lo <kevlo@FreeBSD.org>

Closing fd when it's done

Reviewed by: sbruno


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# fe0506d7 09-Mar-2010 Marcel Moolenaar <marcel@FreeBSD.org>

Create the altix project branch. The altix project will add support
for the SGI Altix 350 to FreeBSD/ia64. The hardware used for porting
is a two-module system, consisting of a base compute module and a
CPU expansion module. SGI's NUMAFlex architecture can be an excellent
platform to test CPU affinity and NUMA-aware features in FreeBSD.


# cde9186f 17-Feb-2009 Sean Bruno <sbruno@FreeBSD.org>

Remove reference to phy_delay from fwcontrol. Thanks for the catch!

Submitted by: Giorgos Keramidas <keramida@ceid.upatras.gr>
MFC after: 2 weeks


# 96747dc0 02-Jan-2009 Warner Losh <imp@FreeBSD.org>

Add fd = -1 after close when we detect the format so that subsequent
open_dev will reopen the device.


# c1de48a3 12-Dec-2008 Sean Bruno <sbruno@FreeBSD.org>

Reviewed by: (Dieter)freebsd@sopwith.solgatos.com
Approved by: slong scottl@samsco.org
MFC after: 2 weeks

Final cleanup of fwcontrol.
NetBSD compatibility
Cleanup errors in usage() display
Finish up error handling via errx/warnx
Generate error on unparsed command line syntax
Change device(devbase) to open into the form /dev/fwX.X


# d7f03759 19-Oct-2008 Ulf Lilleengen <lulf@FreeBSD.org>

- Import the HEAD csup code which is the basis for the cvsmode work.


# 7f1b527c 10-Sep-2008 Sean Bruno <sbruno@FreeBSD.org>

Beginning of overhaul of fwcontrol:
- Documentation of send_phy_config()
- cleanup of malloc's() and added error checking throughout
- new capability to iterate over multiple firewire buses
- update usage() display
- cleanup command line parsing to allow out of order switches
- cleanup command line parsing to allow multiple switches per invocation
- cleanup grammar of man page a bit
- add some ranges to the man page to indicate what values are valid

Since fwcontrol's code is the same across 6/7/head this can be
applied to all branches after the MFC period.

Reviewed by: Dieter freebsd@sopwith.solgatos.com
Approved by: mentor Scott scottl@samsco.org
MFC after: 60 days


# 302176c7 04-Mar-2008 Hidetoshi Shimokawa <simokawa@FreeBSD.org>

- add '-f' option to force root node.
- fix byte order in read_write_quad()
- show hostnames in the list
- fix typo in manpage

MFC after: 1 week


# 6d815a7d 26-Oct-2006 Warner Losh <imp@FreeBSD.org>

Add MPEG2-TS/HDV support to fwcontrol.

Submitted by: Petr Holub" <hopet@ics.muni.cz>
Clean up by: mi@
Pr: 98134


# 3fe9d89a 19-May-2005 Philippe Charnier <charnier@FreeBSD.org>

Remove unused variables. Shorten the path to a WARNS=6 compliance.


# f6248231 28-Oct-2004 Hidetoshi Shimokawa <simokawa@FreeBSD.org>

Add usage of -m option.


# 1be7387c 23-Oct-2004 Hidetoshi Shimokawa <simokawa@FreeBSD.org>

Add -m option, set default fwmem target.


# cb5df0b2 26-May-2004 Brooks Davis <brooks@FreeBSD.org>

Use new eui64(3) functions to print EUI-64s and to allow access to nodes
by EUI-64 and name.

Reviewed by: simokawa


# 3d7b1b41 23-May-2004 Doug Rabson <dfr@FreeBSD.org>

Don't crash if the CROM is all zeros.


# cfa42d36 22-Oct-2003 Hidetoshi Shimokawa <simokawa@FreeBSD.org>

Add '0x' in front of EUI64 to avoid confusion.


# a8587980 25-Sep-2003 Hidetoshi Shimokawa <simokawa@FreeBSD.org>

Add -p option to dump phy registers.


# abd538f2 04-Aug-2003 Hidetoshi Shimokawa <simokawa@FreeBSD.org>

- Use /dev/fwX.Y rather than /dev/fwX.
- Add option -u to specify bus number.
- Try to open the device only if it's necessary.


# cf00a0da 12-Jul-2003 Hidetoshi Shimokawa <simokawa@FreeBSD.org>

- Allow retrieval of local Configuration ROM.
- Clear Configuration ROM buffer in advance for '-d' option.


# c6747f0f 09-Jun-2003 Hidetoshi Shimokawa <simokawa@FreeBSD.org>

Decode bus_info block.


# 5193feb6 29-Apr-2003 Hidetoshi Shimokawa <simokawa@FreeBSD.org>

Free asyreq.

Submitted by: ryuchi@ryuchi.org


# d1f7bcb5 29-Apr-2003 Hidetoshi Shimokawa <simokawa@FreeBSD.org>

Add functions for sending a link-on packet and a RESET_START request.


# 77ee030b 16-Apr-2003 Hidetoshi Shimokawa <simokawa@FreeBSD.org>

MFp4(simokawa_firewire):
Many internal structure changes for the FireWire driver.

- Compute CRC in CROM parsing.
- Add support for configuration ROM build.
- Simplify dummy buffer handling.
- busdma conversion
- Use swi_taskqueue_giant for -current. Mark the interrupt routine as MPSAFE.
- AR buffer handling.
Don't reallocate AR buffer but just recycle it.
Don't malloc and copy per packet in fwohci_arcv().
Pass packet to fw_rcv() using iovec.
Application must prepare receiving buffer in advance.
- Change fw_bind API so that application should pre-allocate xfer structure.
- Add fw_xfer_unload() for recycling struct fw_xfer.
- Add post_busreset hook
- Remove unused 'sub' and 'act_type' in struct fw_xfer.
- Remove npacket from struct fw_bulkxfer.
- Don't call back handlers in fwochi_arcv() if the packet has
not drained in AT queue
- Make firewire works on big endian platform.
- Use native endian for packet header and remove unnecessary ntohX/htonX.
- Remove FWXFERQ_PACKET mode. We don't use it anymore.
- Remove unnecessary restriction of FWSTMAXCHUNK.
- Don't set root node for phy config packet if the root node is
not cycle master capable but set myself for root node.
We should be the root node after next bus reset.

Spotted by: Yoshihiro Tabira <tabira@scd.mei.co.jp>
- Improve self id handling

Tested on: i386, sparc64 and i386 with forced bounce buffer


# e6aaafcd 09-Feb-2003 Hidetoshi Shimokawa <simokawa@FreeBSD.org>

Improve device listing.


# 91b4ea0c 29-Jan-2003 Hidetoshi Shimokawa <simokawa@FreeBSD.org>

Improve alignment in printf().


# 013490c5 28-Jan-2003 Hidetoshi Shimokawa <simokawa@FreeBSD.org>

- Search free device node to open. (fwcontrol.c)
- Exploit multiple packets read/write for DV stream. (fwdv.c)
- Add reference to libdv in the ports collection. (fwcontrol.8)


# c547b896 25-Jan-2003 Hidetoshi Shimokawa <simokawa@FreeBSD.org>

Change API of FW_GDEVLST ioctl.
- include information about itself.
- define struct fw_devinfo and use it in struct fw_devlstreq.
- unify EUI64 representation using struct fw_eui64.


# 8604e72a 23-Jan-2003 Hidetoshi Shimokawa <simokawa@FreeBSD.org>

Use stderr for message output.


# 937bcaa8 23-Jan-2003 Hidetoshi Shimokawa <simokawa@FreeBSD.org>

Merge DV(Digital Video) support.


# bce5729a 04-Jan-2003 Hidetoshi Shimokawa <simokawa@FreeBSD.org>

- Remove speed_map API because speed_map is obsoleted by 1394a.
- Add definition of OHCI_HCC_BIBIV in fwohcireg.h.


# 7ddbf617 04-Jan-2003 Hidetoshi Shimokawa <simokawa@FreeBSD.org>

- Handle zero sized directory right way.
- Staticize.


# a7a73b95 30-Dec-2002 Hidetoshi Shimokawa <simokawa@FreeBSD.org>

Import FireWire userland utility.