OpenBSD CVS

CVS log for src/sbin/scsi/scsi.c


[BACK] Up to [local] / src / sbin / scsi

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.32 / (download) - annotate - [select for diffs], Sun Dec 4 23:50:47 2022 UTC (17 months, 4 weeks 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.31: +1 -2 lines
Diff to previous 1.31 (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.31 / (download) - annotate - [select for diffs], Tue Jun 22 14:51:29 2021 UTC (2 years, 11 months ago) by jmc
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
Changes since 1.30: +6 -15 lines
Diff to previous 1.30 (colored)

reduce verbosity of usage(); keep it the same as SYNOPSIS, wrapped at 80w.
lowercase for "usage", and add -e, which was missing;

ok kettenis

Revision 1.30 / (download) - annotate - [select for diffs], Tue Jun 7 01:29:38 2016 UTC (7 years, 11 months ago) by tedu
Branch: MAIN
CVS Tags: 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, OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4, 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.29: +3 -3 lines
Diff to previous 1.29 (colored)

per trending style, add continue to emtpy loop bodies.
ok mglocker

Revision 1.29 / (download) - annotate - [select for diffs], Thu Nov 20 15:22:39 2014 UTC (9 years, 6 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE, OPENBSD_5_9, OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.28: +2 -2 lines
Diff to previous 1.28 (colored)

remove sys/file.h includes in favor of fcntl.h where needed.
ok deraadt guenther

Revision 1.28 / (download) - annotate - [select for diffs], Tue Nov 12 04:59:02 2013 UTC (10 years, 6 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6, OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.27: +2 -1 lines
Diff to previous 1.27 (colored)

add a variety of missing prototypes

Revision 1.27 / (download) - annotate - [select for diffs], Mon Sep 3 20:46:44 2012 UTC (11 years, 9 months ago) by okan
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3
Changes since 1.26: +25 -30 lines
Diff to previous 1.26 (colored)

- resolve unchecked malloc()'s; prompted by rustyBSD.
- first pass at fixing err() and exit() usage.
- document that scsi(8) returns 0 or >0.

ok krw@ otto@ (noting this code is barely worth the effort...)

Revision 1.26 / (download) - annotate - [select for diffs], Sat Mar 24 15:39:54 2012 UTC (12 years, 2 months ago) by jsg
Branch: MAIN
CVS Tags: OPENBSD_5_2_BASE, OPENBSD_5_2
Changes since 1.25: +2 -1 lines
Diff to previous 1.25 (colored)

fix some leaks
ok miod@

Revision 1.25 / (download) - annotate - [select for diffs], Thu Oct 18 00:30:32 2007 UTC (16 years, 7 months ago) by ray
Branch: MAIN
CVS Tags: 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.24: +2 -2 lines
Diff to previous 1.24 (colored)

SIGCHLD is not an errno value.

Spotted by deraadt.

Revision 1.24 / (download) - annotate - [select for diffs], Sat Apr 28 01:06:18 2007 UTC (17 years, 1 month ago) by ray
Branch: MAIN
CVS Tags: OPENBSD_4_2_BASE, OPENBSD_4_2
Changes since 1.23: +63 -19 lines
Diff to previous 1.23 (colored)

Copy sendbug's editit().

OK deraadt@.

Revision 1.23 / (download) - annotate - [select for diffs], Fri Oct 13 02:11:28 2006 UTC (17 years, 7 months ago) by cloder
Branch: MAIN
CVS Tags: OPENBSD_4_1_BASE, OPENBSD_4_1
Changes since 1.22: +5 -2 lines
Diff to previous 1.22 (colored)

Fix another potentially unsafe instance of foo[strlen(foo) - 1] = '\0'.
OK krw

Revision 1.22 / (download) - annotate - [select for diffs], Tue Oct 10 21:38:16 2006 UTC (17 years, 7 months ago) by cloder
Branch: MAIN
Changes since 1.21: +2 -2 lines
Diff to previous 1.21 (colored)

fgets(3) returns NULL on error, not 0. No functional change, but it makes
the code easier to read.
OK deraadt

Revision 1.21 / (download) - annotate - [select for diffs], Sun Jul 23 02:50:20 2006 UTC (17 years, 10 months ago) by dlg
Branch: MAIN
CVS Tags: OPENBSD_4_0_BASE, OPENBSD_4_0
Changes since 1.20: +8 -176 lines
Diff to previous 1.20 (colored)

remove some scsi ioctls, most importantly the ones that can reprobe the
bus. supporting these complicates the midlayer unnecessarily.

ok krw@

Revision 1.20 / (download) - annotate - [select for diffs], Sun Nov 13 19:16:09 2005 UTC (18 years, 6 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_9_BASE, OPENBSD_3_9
Changes since 1.19: +5 -3 lines
Diff to previous 1.19 (colored)

missing fclose(); dhill@mindcry.org

Revision 1.19 / (download) - annotate - [select for diffs], Wed Apr 13 02:33:08 2005 UTC (19 years, 1 month ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_8_BASE, OPENBSD_3_8
Changes since 1.18: +8 -11 lines
Diff to previous 1.18 (colored)

use STD{IN,OUT,ERR}_FILENO

Revision 1.18 / (download) - annotate - [select for diffs], Mon Apr 11 22:02:06 2005 UTC (19 years, 1 month ago) by cloder
Branch: MAIN
Changes since 1.17: +3 -2 lines
Diff to previous 1.17 (colored)

Use absolute path for vi. OK deraadt

Revision 1.17 / (download) - annotate - [select for diffs], Mon Apr 11 14:59:01 2005 UTC (19 years, 1 month ago) by cloder
Branch: MAIN
Changes since 1.16: +4 -2 lines
Diff to previous 1.16 (colored)

Check for asprintf failure.  From Bruno Rohee (thank you).

Revision 1.16 / (download) - annotate - [select for diffs], Sat Apr 9 02:14:32 2005 UTC (19 years, 1 month ago) by cloder
Branch: MAIN
Changes since 1.15: +2 -2 lines
Diff to previous 1.15 (colored)

Compile with -ansi by killing an inline

Revision 1.15 / (download) - annotate - [select for diffs], Wed Jan 14 19:39:59 2004 UTC (20 years, 4 months ago) by otto
Branch: MAIN
CVS Tags: OPENBSD_3_7_BASE, OPENBSD_3_7, OPENBSD_3_6_BASE, OPENBSD_3_6, OPENBSD_3_5_BASE, OPENBSD_3_5
Changes since 1.14: +2 -2 lines
Diff to previous 1.14 (colored)

Fix printf format string. ok deraadt@

Revision 1.14 / (download) - annotate - [select for diffs], Wed Jul 23 23:10:23 2003 UTC (20 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.13: +3 -2 lines
Diff to previous 1.13 (colored)

move junk (bad code, terrible APIs) to the only program that uses it;
millert ok

Revision 1.13 / (download) - annotate - [select for diffs], Sun Jul 6 22:03:58 2003 UTC (20 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.12: +10 -2 lines
Diff to previous 1.12 (colored)

protos

Revision 1.12 / (download) - annotate - [select for diffs], Thu Jun 26 15:41:12 2003 UTC (20 years, 11 months ago) by mickey
Branch: MAIN
Changes since 1.11: +28 -50 lines
Diff to previous 1.11 (colored)

use err.h

Revision 1.11 / (download) - annotate - [select for diffs], Wed Jun 11 06:22:15 2003 UTC (20 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.10: +10 -8 lines
Diff to previous 1.10 (colored)

ansification

Revision 1.10 / (download) - annotate - [select for diffs], Thu Mar 13 05:00:45 2003 UTC (21 years, 2 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_3_BASE, OPENBSD_3_3
Changes since 1.9: +3 -4 lines
Diff to previous 1.9 (colored)

more strlcpy; most from Hans-Joerg.Hoexer@yerbouti.franken.de, a bit from me

Revision 1.9 / (download) - annotate - [select for diffs], Thu Feb 20 21:47:27 2003 UTC (21 years, 3 months ago) by millert
Branch: MAIN
Changes since 1.8: +2 -2 lines
Diff to previous 1.8 (colored)

Use STDOUT_FILENO; David at phobia dot ms

Revision 1.8 / (download) - annotate - [select for diffs], Sat Jul 7 18:26:21 2001 UTC (22 years, 11 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_2_BASE, OPENBSD_3_2, OPENBSD_3_1_BASE, OPENBSD_3_1, OPENBSD_3_0_BASE, OPENBSD_3_0
Changes since 1.7: +2 -4 lines
Diff to previous 1.7 (colored)

major -Wall cleanup, almost complete

Revision 1.7 / (download) - annotate - [select for diffs], Thu Mar 8 21:41:50 2001 UTC (23 years, 3 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_9_BASE, OPENBSD_2_9
Changes since 1.6: +10 -10 lines
Diff to previous 1.6 (colored)

whack exit(-#)

Revision 1.6 / (download) - annotate - [select for diffs], Sat Jan 22 20:25:07 2000 UTC (24 years, 4 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_8_BASE, OPENBSD_2_8, OPENBSD_2_7_BASE, OPENBSD_2_7
Changes since 1.5: +1 -3 lines
Diff to previous 1.5 (colored)

remove extra externs not needed because of unistd.h (rest of tree will be done later.. contact me if you want to help)

Revision 1.5 / (download) - annotate - [select for diffs], Wed Dec 10 05:02:02 1997 UTC (26 years, 5 months ago) by angelos
Branch: MAIN
CVS Tags: OPENBSD_2_6_BASE, OPENBSD_2_6, OPENBSD_2_5_BASE, OPENBSD_2_5, OPENBSD_2_4_BASE, OPENBSD_2_4, OPENBSD_2_3_BASE, OPENBSD_2_3
Changes since 1.4: +8 -5 lines
Diff to previous 1.4 (colored)

Fix tmpnam()...i don't have SCSI though, so i couldn't test.

Revision 1.4 / (download) - annotate - [select for diffs], Tue Aug 26 13:38:09 1997 UTC (26 years, 9 months ago) by niklas
Branch: MAIN
CVS Tags: OPENBSD_2_2_BASE, OPENBSD_2_2
Changes since 1.3: +3 -2 lines
Diff to previous 1.3 (colored)

main should return int

Revision 1.3 / (download) - annotate - [select for diffs], Tue Jun 24 02:03:00 1997 UTC (26 years, 11 months ago) by dgregor
Branch: MAIN
Changes since 1.2: +7 -7 lines
Diff to previous 1.2 (colored)

Fix void *  -> int casts -- change int's to long's

Revision 1.2 / (download) - annotate - [select for diffs], Wed Jan 15 23:41:41 1997 UTC (27 years, 4 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_1_BASE, OPENBSD_2_1
Changes since 1.1: +2 -2 lines
Diff to previous 1.1 (colored)

getopt(3) returns -1 when out of args, not EOF, whee!

Revision 1.1 / (download) - annotate - [select for diffs], Wed Jun 12 11:21:43 1996 UTC (27 years, 11 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_0_BASE, OPENBSD_2_0

add /sbin/scsi from FreeBSD -- a good start!

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.