History log of /freebsd-current/usr.sbin/fdwrite/fdwrite.c
Revision Date Author Comments
# 16e5eb21 11-Apr-2024 rilysh <nightquick@proton.me>

fdwrite.c: initialize pointers to NULL and a few other cleanups

1. Both trackbuf and vrfybuf are initialized to
zero (NULL). While it's okay to initialize pointers
to zero, to keep consistency, as they're explicitly
pointers, it's better to just use NULL ((void *)0)
instead of 0 (both are equivalent to the compilers).

2. Call free() for both trackbuf and vrfybuf after
their job has been done.

3. Remove the register keyword. Compilers generally
ignore this keyword (except for very very old compilers
and CPUs).

4. Remove the ctype.h header. It's not being used
anywhere in the file.

Signed-off-by: rilysh <nightquick@proton.me>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1059


# b3e76948 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: two-line .h pattern

Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/


# 64de3fdd 30-Nov-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

SPDX: use the Beerware identifier.


# 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.


# 81f5cd99 24-Jun-2009 Joerg Wunsch <joerg@FreeBSD.org>

Drop the defunct FDOPT_NOERRLOG option from all the floppy utilities.
The kernel does not log floppy media errors anymore.

In fdcontrol, do always open the file descriptor in read-only mode so
it can operate on read-only media, as there is no longer a separate
control device to operate on.


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

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


# 4c1f1c62 08-Jan-2005 Xin LI <delphij@FreeBSD.org>

Cleanup usr.sbin/fd* so they can compile under WARNS=6.

fdcontrol/fdcontrol.c:
- Add const constraint to an intermediate value
which is not supposed to be changed elsewhere.
fdread/fdread.c:
- Use _devname in favor of devname to avoid name
conflicit.
- -1 is less than any positive number so in order
to get the block to function, we should get the
block a little earlier.
- Cast to remove signed when we are sure that a
return value is positive, or is compared with
an positive number (tracknumber of a floppy
disk is not likely to have UINT_MAX/2 anyway)
fdread/fdutil.c:
- Use more specific initializer
fdwrite/fdwrite.c:
- Use static on format_track since it's not
referenced in other places.
- Use const char* to represent string constant.

Bump WARNS accordingly.


# 2e3cf203 30-May-2004 Stefan Farfeleder <stefanf@FreeBSD.org>

Include <string.h> rather than <strings.h> for string function prototypes.

Approved by: das (mentor)


# 06229ad2 25-Mar-2002 Poul-Henning Kamp <phk@FreeBSD.org>

Modernize my email address


# a5cef3b4 26-Jun-2001 Joerg Wunsch <joerg@FreeBSD.org>

Now that we've got it, use FDOPT_NOERRLOG for fdformat and fdwrite to
avoid blasting the syslog with error messages from bad floppies. Both
tools have their own error reporting anyway (which could easily be
cluttered by the syslog output on your terminal).


# d137c337 06-Jun-2001 Joerg Wunsch <joerg@FreeBSD.org>

Part #2 of the <machine/ioctl_fd.h> => <sys/fdcio.h> move: handle the
tools in usr.sbin/fd*.


# 1a37aa56 09-Dec-2000 David E. O'Brien <obrien@FreeBSD.org>

Add `_PATH_DEVZERO'.
Use _PATH_* where where possible.


# 6ed16f20 26-Apr-2000 David E. O'Brien <obrien@FreeBSD.org>

/dev/r<FOO> => /dev/<FOO>


# 97d92980 27-Aug-1999 Peter Wemm <peter@FreeBSD.org>

$Id$ -> $FreeBSD$


# d682bccf 18-Sep-1997 Philippe Charnier <charnier@FreeBSD.org>

Use err(3). Document -y flag. Remove unused -s flag from getopt string.


# 476602a9 22-Feb-1997 Peter Wemm <peter@FreeBSD.org>

Revert $FreeBSD$ to $Id$


# 1130b656 14-Jan-1997 Jordan K. Hubbard <jkh@FreeBSD.org>

Make the long-awaited change from $Id$ to $FreeBSD$

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.


# 46889276 29-Sep-1996 Jordan K. Hubbard <jkh@FreeBSD.org>

Make this more usable from shell scripts and such by adding a non-interactive
flag and some checking to see if it's even reasonable to ask for confirmation
at all.


# 709e8f9a 29-May-1995 Rodney W. Grimes <rgrimes@FreeBSD.org>

Remove trailing whitespace.


# b365f236 14-Oct-1994 Joerg Wunsch <joerg@FreeBSD.org>

#include'ing mysterious stuff from ${DESTDIR}/sys/<somewhere> is no longer
necessary.
Requested by: phk


# b5173cbe 18-Sep-1994 Poul-Henning Kamp <phk@FreeBSD.org>

A small program, which can take a file of any size, format, write and verify
it onto a bunch of floppies in a semi-intelligent way.

Useful for things like: tar cf - . | gzip -9 | fdwrite -d /dev/rfd0.1720 -v

Where it will keep asking for floppies until tar is done.