OpenBSD CVS

CVS log for src/usr.sbin/fdformat/fdformat.c


[BACK] Up to [local] / src / usr.sbin / fdformat

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.25 / (download) - annotate - [select for diffs], Sun Dec 4 23:50:50 2022 UTC (18 months ago) by cheloha
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, HEAD
Changes since 1.24: +2 -2 lines
Diff to previous 1.24 (colored)

userspace: remove vestigial '?' cases from top-level getopt(3) loops

getopt(3) returns '?' when it encounters a flag not present in the in
the optstring or if a flag is missing its option argument.  We can
handle this case with the "default" failure case with no loss of
legibility.  Hence, remove all the redundant "case '?':" lines.

Prompted by dlg@.  With help from dlg@ and millert@.

Link: https://marc.info/?l=openbsd-tech&m=167011979726449&w=2

ok naddy@ millert@ dlg@

Revision 1.24 / (download) - annotate - [select for diffs], Fri Jun 28 13:32:47 2019 UTC (4 years, 11 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.23: +6 -6 lines
Diff to previous 1.23 (colored)

When system calls indicate an error they return -1, not some arbitrary
value < 0.  errno is only updated in this case.  Change all (most?)
callers of syscalls to follow this better, and let's see if this strictness
helps us in the future.

Revision 1.23 / (download) - annotate - [select for diffs], Mon Sep 17 15:44:16 2018 UTC (5 years, 8 months ago) by jmc
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.22: +5 -21 lines
Diff to previous 1.22 (colored)

clean up the amount of printf in usage(): from sascha paunovic
move the descriptive text in usage() to the man page: from robert klein

Revision 1.22 / (download) - annotate - [select for diffs], Wed Mar 16 15:41:11 2016 UTC (8 years, 2 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0
Changes since 1.21: +2 -2 lines
Diff to previous 1.21 (colored)

More "(<blah> *)0" -> NULL, avoiding any stdarg functions.

Feedback millert@ kettenis@

Revision 1.21 / (download) - annotate - [select for diffs], Sat Dec 19 20:38:35 2015 UTC (8 years, 5 months ago) by mmcc
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.20: +2 -3 lines
Diff to previous 1.20 (colored)

Remove NULL-check before free().

Revision 1.20 / (download) - annotate - [select for diffs], Sat Apr 18 18:28:38 2015 UTC (9 years, 1 month ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.19: +27 -9 lines
Diff to previous 1.19 (colored)

Convert many atoi() calls to strtonum(), adding range checks and failure
handling along the way.
Reviews by Brendan MacDonell, Jeremy Devenport, florian, doug, millert

Revision 1.19 / (download) - annotate - [select for diffs], Wed Oct 8 04:55:03 2014 UTC (9 years, 8 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.18: +2 -2 lines
Diff to previous 1.18 (colored)

remove a space

Revision 1.18 / (download) - annotate - [select for diffs], Mon Nov 26 09:28:34 2007 UTC (16 years, 6 months ago) by martynas
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6, OPENBSD_5_5_BASE, OPENBSD_5_5, OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8, OPENBSD_4_7_BASE, OPENBSD_4_7, OPENBSD_4_6_BASE, OPENBSD_4_6, OPENBSD_4_5_BASE, OPENBSD_4_5, OPENBSD_4_4_BASE, OPENBSD_4_4, OPENBSD_4_3_BASE, OPENBSD_4_3
Changes since 1.17: +2 -2 lines
Diff to previous 1.17 (colored)

typos;  ok jmc@
sys/netinet/in_pcb.c and sys/net/bridgestp.c ok henning@
sys/dev/pci/bktr/* ok jakemsr@

Revision 1.17 / (download) - annotate - [select for diffs], Wed Feb 21 03:53:32 2007 UTC (17 years, 3 months ago) by ray
Branch: MAIN
CVS Tags: OPENBSD_4_2_BASE, OPENBSD_4_2, OPENBSD_4_1_BASE, OPENBSD_4_1
Changes since 1.16: +3 -4 lines
Diff to previous 1.16 (colored)

- Pass full buffer size to fgets.
- No need to initialize buffer.
- Spacing.

Based on diff from Charles Longeau <chl at tuxfamily dot org> long ago.

OK moritz@.

Revision 1.16 / (download) - annotate - [select for diffs], Mon Feb 19 21:32:35 2007 UTC (17 years, 3 months ago) by jmc
Branch: MAIN
Changes since 1.15: +10 -8 lines
Diff to previous 1.15 (colored)

tidy up synopsis and usage(); reported by Igor Sobrado

Revision 1.15 / (download) - annotate - [select for diffs], Mon Aug 7 18:20:57 2006 UTC (17 years, 10 months ago) by miod
Branch: MAIN
CVS Tags: OPENBSD_4_0_BASE, OPENBSD_4_0
Changes since 1.14: +3 -1 lines
Diff to previous 1.14 (colored)

Avoid divide by zero in visual effects; spotted by Tobias Stoeckmann.

Revision 1.14 / (download) - annotate - [select for diffs], Sun Apr 2 00:50:42 2006 UTC (18 years, 2 months ago) by deraadt
Branch: MAIN
Changes since 1.13: +2 -2 lines
Diff to previous 1.13 (colored)

use SEEK_* for lseek()

Revision 1.13 / (download) - annotate - [select for diffs], Sun Mar 12 02:45:45 2006 UTC (18 years, 3 months ago) by deraadt
Branch: MAIN
Changes since 1.12: +2 -1 lines
Diff to previous 1.12 (colored)

missing close(); dhill@mindcry.org

Revision 1.12 / (download) - annotate - [select for diffs], Thu Jun 26 21:36:39 2003 UTC (20 years, 11 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_9_BASE, OPENBSD_3_9, OPENBSD_3_8_BASE, OPENBSD_3_8, OPENBSD_3_7_BASE, OPENBSD_3_7, OPENBSD_3_6_BASE, OPENBSD_3_6, OPENBSD_3_5_BASE, OPENBSD_3_5, OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.11: +7 -11 lines
Diff to previous 1.11 (colored)

ansi and protos

Revision 1.11 / (download) - annotate - [select for diffs], Sat Mar 8 11:49:32 2003 UTC (21 years, 3 months ago) by matthieu
Branch: MAIN
CVS Tags: OPENBSD_3_3_BASE, OPENBSD_3_3
Changes since 1.10: +1 -2 lines
Diff to previous 1.10 (colored)

fix fdformat usage(). Ok deraadt@

Revision 1.10 / (download) - annotate - [select for diffs], Thu Mar 14 16:44:24 2002 UTC (22 years, 3 months ago) by mpech
Branch: MAIN
CVS Tags: OPENBSD_3_2_BASE, OPENBSD_3_2, OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.9: +2 -2 lines
Diff to previous 1.9 (colored)

kill more registers.

millert@ ok

Revision 1.8.8.1 / (download) - annotate - [select for diffs], Fri Oct 6 21:24:21 2000 UTC (23 years, 8 months ago) by jason
Branch: OPENBSD_2_7
Changes since 1.8: +2 -2 lines
Diff to previous 1.8 (colored) next main 1.9 (colored)

Pull in patch from current:
Fix (millert):
warnx?/errx? paranoia (use "%s" not a bare string unless it is a
constant).  These are not security holes but it is worth fixing
them anyway both for robustness and so folks looking for examples
in the tree are not misled into doing something potentially dangerous.
Furthermore, it is a bad idea to assume that pathnames will not
include '%' in them and that error routines don't return strings
with '%' in them (especially in light of the possibility of locales).

Revision 1.9 / (download) - annotate - [select for diffs], Fri Jun 30 16:00:25 2000 UTC (23 years, 11 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_0_BASE, OPENBSD_3_0, OPENBSD_2_9_BASE, OPENBSD_2_9, OPENBSD_2_8_BASE, OPENBSD_2_8
Changes since 1.8: +2 -2 lines
Diff to previous 1.8 (colored)

warnx?/errx? paranoia (use "%s" not a bare string unless it is a
constant).  These are not security holes but it is worth fixing
them anyway both for robustness and so folks looking for examples
in the tree are not misled into doing something potentially dangerous.
Furthermore, it is a bad idea to assume that pathnames will not
include '%' in them and that error routines don't return strings
with '%' in them (especially in light of the possibility of locales).

Revision 1.8 / (download) - annotate - [select for diffs], Thu Aug 13 05:36:56 1998 UTC (25 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_7_BASE, OPENBSD_2_6_BASE, OPENBSD_2_6, OPENBSD_2_5_BASE, OPENBSD_2_5, OPENBSD_2_4_BASE, OPENBSD_2_4
Branch point for: OPENBSD_2_7
Changes since 1.7: +2 -2 lines
Diff to previous 1.7 (colored)

fix exit code; fgsch@olimpo.com.br

Revision 1.7 / (download) - annotate - [select for diffs], Mon Jul 13 22:35:52 1998 UTC (25 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.6: +244 -228 lines
Diff to previous 1.6 (colored)

fix bar printing, indent

Revision 1.6 / (download) - annotate - [select for diffs], Fri Jun 19 16:09:35 1998 UTC (25 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.5: +5 -2 lines
Diff to previous 1.5 (colored)

print correct status bar; blank@fox.uni-trier.de

Revision 1.5 / (download) - annotate - [select for diffs], Sun Sep 21 00:30:11 1997 UTC (26 years, 8 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_3_BASE, OPENBSD_2_3, OPENBSD_2_2_BASE, OPENBSD_2_2
Changes since 1.4: +3 -3 lines
Diff to previous 1.4 (colored)

Make "fdformat fd0" work.

Revision 1.4 / (download) - annotate - [select for diffs], Mon Aug 18 03:11:30 1997 UTC (26 years, 9 months ago) by millert
Branch: MAIN
Changes since 1.3: +2 -2 lines
Diff to previous 1.3 (colored)

#include <string.h> not <strings.h> -- Yes, I'm a weanie...

Revision 1.3 / (download) - annotate - [select for diffs], Mon Jun 23 09:34:11 1997 UTC (26 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.2: +2 -2 lines
Diff to previous 1.2 (colored)

off_t botch

Revision 1.2 / (download) - annotate - [select for diffs], Fri Jun 28 00:53:38 1996 UTC (27 years, 11 months ago) by downsj
Branch: MAIN
CVS Tags: OPENBSD_2_1_BASE, OPENBSD_2_1, OPENBSD_2_0_BASE, OPENBSD_2_0
Changes since 1.1: +32 -64 lines
Diff to previous 1.1 (colored)

cleanup: K&R function declarations; use opendev(); use err().

Revision 1.1 / (download) - annotate - [select for diffs], Thu Jun 20 08:22:46 1996 UTC (27 years, 11 months ago) by downsj
Branch: MAIN

add fdformat for the i386: based on an old FreeBSD version, gotten from
jtk's port of dosemu; some cleaning by me, but it needs more.  Should
probably just be rewritten...

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.