OpenBSD CVS

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


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.157 / (download) - annotate - [select for diffs], Sat Oct 7 12:20:10 2023 UTC (7 months, 3 weeks ago) by kn
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, HEAD
Changes since 1.156: +7 -1 lines
Diff to previous 1.156 (colored)

Retry on empty passphrase

They must not be empty, or else creation/unlock fails (and boot loaders
would not be able to abort and drop back to the boot> prompt).

[-p passfile] handles this with "invalid passphrase length", so align
the interactive prompt and retry there.

-s remains a one-shot whilst getting a better error message.

This is user friendlier and fixes the last installer "bug" on my list
wrt. disk encryption where hitting Enter twice at the passphrase prompt
would abort bioctl(8) and thus the installation.

OK deraadt

Revision 1.156 / (download) - annotate - [select for diffs], Fri Oct 6 09:55:02 2023 UTC (7 months, 3 weeks ago) by kn
Branch: MAIN
Changes since 1.155: +6 -6 lines
Diff to previous 1.155 (colored)

rename pass{word -> file} variable

It contains the path to the file containing a passphrase;
password reads misleading and was also the only usage of "word" in contrast
to consistent "phrase" usage.

Revision 1.155 / (download) - annotate - [select for diffs], Sat Sep 2 09:14:47 2023 UTC (8 months, 4 weeks ago) by kn
Branch: MAIN
CVS Tags: OPENBSD_7_4_BASE, OPENBSD_7_4
Changes since 1.154: +13 -11 lines
Diff to previous 1.154 (colored)

Use a hardware based number of KDF rounds by default for passphrases

When creating new crypto volumes with a passphrase or updating one, pick a
number of rounds that aims to take around 1s instead of just 16 (on X230 and
T14 machines, 16 rounds unlock pretty much instantly).

New default [-r auto] never decreases rounds, only explicit '-r N' can.
16 is the absolute minimum.

Motivation is to provide a saner and more modern default, especially for
fresh installations utilizing new disk encryption question.

Prodding for new default from and OK jsing on early "-r auto" installer diff
idea to to pick MAX(auto, old-rounds) from Lucas[AT sexy DOT is]
"seems acceptable to me" deraadt
Feedback kettenis sthen
OK op

Revision 1.154 / (download) - annotate - [select for diffs], Mon Aug 21 08:33:11 2023 UTC (9 months, 1 week ago) by kn
Branch: MAIN
Changes since 1.153: +6 -1 lines
Diff to previous 1.153 (colored)

Retry passphrase on mismatch by default

Gracefully prompt again during interactive creation and passphrase change on
CRYPTO/1C volumes when confirmation fails instead of exiting, so bioctl(8)
behaves more like passwd(1) in this regard.

Use -s aka. non-interactive scripting mode to try just once.

Input OK jsing op

Revision 1.153 / (download) - annotate - [select for diffs], Mon Aug 21 08:13:37 2023 UTC (9 months, 1 week ago) by kn
Branch: MAIN
Changes since 1.152: +3 -2 lines
Diff to previous 1.152 (colored)

Print softraid(4) errors on standard error

INFO messages remain on stdin, WARN/ERROR go to stderr as usual to make
silencing and scripting bioctl(8) easier.

OK op jsing

Revision 1.152 / (download) - annotate - [select for diffs], Fri Aug 18 14:09:19 2023 UTC (9 months, 2 weeks ago) by kn
Branch: MAIN
Changes since 1.151: +7 -4 lines
Diff to previous 1.151 (colored)

Make -s read passphrases without prompts or confirmation

-s for non-interactive usage disables prompts, but still silently expects
two inputs, which is neither intuitive nor ergonomic.

Fix this get sane scriptable behaviour and documentation.

Feedback OK jsing op

Revision 1.151 / (download) - annotate - [select for diffs], Tue Oct 18 07:04:20 2022 UTC (19 months, 2 weeks ago) by kn
Branch: MAIN
CVS Tags: OPENBSD_7_3_BASE, OPENBSD_7_3
Changes since 1.150: +2 -1 lines
Diff to previous 1.150 (colored)

Document and report mpii(4) RAID 1E as such

At least the built-in controller on sparc64 T4-2 machines supports 1E from
which OpenBSD boots just fine, but bioctl(8) reports it as RAID 10:

mpii0 at pci15 dev 0 function 0 "Symbios Logic SAS2008" rev 0x03: msi
mpii0: Solana On-Board, firmware 9.0.0.0 IR, MPI 2.0
scsibus1 at mpii0: 834 targets
sd0 at scsibus1 targ 0 lun 0: <LSI, Logical Volume, 3000> naa.600508e0000000006cd1dcd59022a30a
sd0: 713824MB, 512 bytes/sector, 1461911552 sectors
root on sd0a (efde5b2c6ab7b8ac.a) swap on sd0b dump on sd0b

	# bioctl mpii0
	Volume      Status               Size Device
	    mpii0 0 Online       748498714112 sd0     RAID10
		  0 Online       500107861504 0:2.0   noencl <ATA CT500MX500SSD1>
		  1 Online       500107861504 0:1.0   noencl <ATA CT500MX500SSD1>
		  2 Online       500107861504 0:0.0   noencl <ATA CT500MX500SSD1>

mpii(4) simply munged 1E into 10.
Report it as 0x1E just like softraid(4) RAID 1C is 0x1C internally:

	# ./obj/bioctl mpii0 | grep RAID
	    mpii0 0 Online       748498714112 sd0     RAID1E

OK jsing

Revision 1.150 / (download) - annotate - [select for diffs], Tue Oct 18 06:56:42 2022 UTC (19 months, 2 weeks ago) by kn
Branch: MAIN
Changes since 1.149: +7 -9 lines
Diff to previous 1.149 (colored)

Hoist common Volume, Status, Size and Device columns in format strings

Only the RAID level itself with level specific values in the end differs.

OK jsing

Revision 1.149 / (download) - annotate - [select for diffs], Fri Aug 26 09:14:00 2022 UTC (21 months ago) by kn
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2
Changes since 1.148: +3 -3 lines
Diff to previous 1.148 (colored)

Sync usage with manual

-l takes chunks not specials;  while here, simplify markup for optional parts.

Feedback OK jmc

Revision 1.148 / (download) - annotate - [select for diffs], Fri Aug 19 17:49:10 2022 UTC (21 months, 1 week ago) by kn
Branch: MAIN
Changes since 1.147: +6 -5 lines
Diff to previous 1.147 (colored)

Improve RAID level parsing

Check for numeric levels before checking for single-character ones
("c" and "C") such that a) invalid synopsis (no "-l") is detected as such
	# bioctl -c 10 vnd0 softraid0
	bioctl: Invalid RAID level
	# ./obj/bioctl -c 10 vnd0 softraid0
	usage: bioctl ...

and b) ten is correctly treated as valid but unsupported level:
	# bioctl -c 10 -l vnd0a softraid0
	bioctl: Invalid RAID level
	# ./obj/bioctl -c 10 -l vnd0a softraid0
	bioctl: unsupported RAID level

Uppercase the abbreviation while here.

Feedback OK tb

Revision 1.147 / (download) - annotate - [select for diffs], Mon Feb 8 19:05:05 2021 UTC (3 years, 3 months ago) by stsp
Branch: MAIN
CVS Tags: OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9
Changes since 1.146: +3 -1 lines
Diff to previous 1.146 (colored)

Make bioctl properly verify raidlevels specified via the -c option.

Trailing characters in the option argument were ignored, such that
-cC1 (typo of -c1C) was interpreted as -cC instead of being rejected.

ok jsing@

Revision 1.146 / (download) - annotate - [select for diffs], Mon Feb 8 11:20:03 2021 UTC (3 years, 3 months ago) by stsp
Branch: MAIN
Changes since 1.145: +12 -4 lines
Diff to previous 1.145 (colored)

Add a RAID1C (raid1 + crypto) softraid(8) discipline.

The RAID1C discipline encrypts data like the CRYPTO discipline, and accepts
multiple chunks during creation and assembly like the RAID1 discipline.

To deal with failing disks a RAID1C volume may be assembled with a smaller
number of chunks than the volume was created with. The volume will then come
up in degraded state. If the volume is now detached and assembled again with
the correct number of chunks, any re-added chunks will require a rebuild.

Consequently, assembling RAID1C volumes requires careful attention to the
chunks passed via 'bioctl -l'.  If a chunk is accidentally omitted from the
command line during volume assembly, then this chunk will need to be rebuilt.

At least one known-good chunk is required in order to assemble the volume.

Like CRYPTO, RAID1C supports passphrase and key-disk authentication.
Key-disk based volumes are assembled automatically if the key disk is present
while the system is booting up.

Unlike CRYPTO and RAID1, there is no boot support for RAID1C yet.

RAID1C largely reuses existing code of RAID1 and CRYPTO disciplines.
At present RAID1C's discipline-specific data structure is shared with that
of the CRYPTO discipline to allow re-use of existing CRYPTO code. A custom
RAID1C data structure would require CRYPTO code to access struct sr_crypto
via a pointer instead of via a member field of struct sr_discipline.

ok jsing@

Revision 1.145 / (download) - annotate - [select for diffs], Fri Oct 30 13:55:48 2020 UTC (3 years, 7 months ago) by schwarze
Branch: MAIN
Changes since 1.144: +3 -3 lines
Diff to previous 1.144 (colored)

Do not use ".Ar device" for both an option argument and for the operand.
Instead, use ".Ar chunk" for the -R option argument just like it is
already done for -l and -O.
While here, polish a few minor details in the vicinity of the word "device".
OK kn@

Revision 1.144 / (download) - annotate - [select for diffs], Sat Apr 25 14:37:43 2020 UTC (4 years, 1 month ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.143: +2 -2 lines
Diff to previous 1.143 (colored)

Reduce minimum allowed number of chunks in a CONCAT volume from 2 to
1.

This increases the number of volumes that can be created on a single disk
from 7 to 15. i.e. a disk can be sliced into a maximum of 225
(15 * 15) filesystems instead of a mere 105 (7 * 15).

ok deraadt@

Revision 1.143 / (download) - annotate - [select for diffs], Fri Jun 28 13:32:43 2019 UTC (4 years, 11 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.142: +19 -19 lines
Diff to previous 1.142 (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.142 / (download) - annotate - [select for diffs], Sat May 11 20:24:55 2019 UTC (5 years ago) by krw
Branch: MAIN
Changes since 1.141: +1 -5 lines
Diff to previous 1.141 (colored)

Kill a couple of superfluous "return;" statements
at the end of void functions.

First one pointed out by Andrey Sokolov via bugs@

Revision 1.141 / (download) - annotate - [select for diffs], Tue Dec 20 15:38:46 2016 UTC (7 years, 5 months ago) by patrick
Branch: MAIN
CVS Tags: 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
Changes since 1.140: +2 -5 lines
Diff to previous 1.140 (colored)

This commit removes bio_status() calls after a BIOCLOCATE since the
bio status will never be updated on a BIOCLOCATE.  In addition with
missed zeroing of the passed bio struct, this could lead to a print
of uninitialized memory.  While there, properly zero the bio struct
before passing it to ioctl().

ok mikeb@

Revision 1.140 / (download) - annotate - [select for diffs], Thu Oct 20 07:14:44 2016 UTC (7 years, 7 months ago) by tb
Branch: MAIN
Changes since 1.139: +3 -4 lines
Diff to previous 1.139 (colored)

optarg is declared in unistd.h and usage is __dead. From Jan Stary.

ok natano

Revision 1.139 / (download) - annotate - [select for diffs], Wed Sep 21 17:50:05 2016 UTC (7 years, 8 months ago) by jsing
Branch: MAIN
Changes since 1.138: +47 -1 lines
Diff to previous 1.138 (colored)

Add support for automatically selecting the number of rounds to use with
bcrypt pbkdf, based on system performance. This is based on the bcrypt
autorounds code we have in libc.

Discussed with djm@ and tedu@.

Revision 1.138 / (download) - annotate - [select for diffs], Mon Sep 19 17:46:52 2016 UTC (7 years, 8 months ago) by jsing
Branch: MAIN
Changes since 1.137: +9 -6 lines
Diff to previous 1.137 (colored)

Switch softraid crypto from PKCS5 PBKDF2 to bcrypt PBKDF.

New volumes will be created with bcrypt PBKDF, however existing volumes
will continue to use PKCS5 PBKDF2 until a passphrase change is made.

If you're booting from softraid crypto, ensure that your boot loader has
been upgraded to a version that supports bcrypt prior to changing your
passphrase. Also be aware that once the passphrase has been changed, an
older version of bioctl(8) (one that does not support bcrypt PBKDF) will
not be able to "unlock" the volume.

Partly based on a diff from djm@.

Revision 1.137 / (download) - annotate - [select for diffs], Sat Sep 10 17:08:44 2016 UTC (7 years, 8 months ago) by jsing
Branch: MAIN
Changes since 1.136: +16 -6 lines
Diff to previous 1.136 (colored)

Teach bioctl derive_key() how to handle bcrypt_pbkdf.

Part of a diff from djm@

Revision 1.136 / (download) - annotate - [select for diffs], Sat Sep 10 17:06:11 2016 UTC (7 years, 8 months ago) by jsing
Branch: MAIN
Changes since 1.135: +3 -3 lines
Diff to previous 1.135 (colored)

Ugh, too many initialisms...

Revision 1.135 / (download) - annotate - [select for diffs], Sat Sep 10 16:53:22 2016 UTC (7 years, 8 months ago) by jsing
Branch: MAIN
Changes since 1.134: +16 -16 lines
Diff to previous 1.134 (colored)

Clean up some softraid crypto code - rename struct sr_crypto_kdf_pbkdf2 to
sr_crypto_pbkdf (since it is useable for more than just pkcs5_pbkdf2) and
embed a struct sr_crypto_genkdf within it, rather than redeclaring the same
fields. Rename SR_CRYPTOKDFT_PBKDF2 to SR_CRYPTOKDFT_PCKS5_PBKDF2 and add
SR_CRYPTOKDFT_BCRYPT_PBKDF for upcoming changes.

Revision 1.134 / (download) - annotate - [select for diffs], Thu Sep 8 19:08:14 2016 UTC (7 years, 8 months ago) by jsing
Branch: MAIN
Changes since 1.133: +7 -3 lines
Diff to previous 1.133 (colored)

When changing the passphrase, keep the previous number of rounds, unless
specified otherwise.

Part of a diff from halex@

Revision 1.133 / (download) - annotate - [select for diffs], Thu Sep 8 18:41:04 2016 UTC (7 years, 8 months ago) by jsing
Branch: MAIN
Changes since 1.132: +16 -15 lines
Diff to previous 1.132 (colored)

Shuffle some code to make futher changes easier - pass the KDF type into
derive_key_pkcs(), check the type and rounds in one place, unify the rounds
too small error.

Revision 1.132 / (download) - annotate - [select for diffs], Thu Sep 8 17:51:02 2016 UTC (7 years, 8 months ago) by jsing
Branch: MAIN
Changes since 1.131: +2 -2 lines
Diff to previous 1.131 (colored)

When changing a passphrase, use bio_kdf_generate() so that we generate a
new salt and respect the specified number of rounds.

Before changing your softraid crypto passphrase ensure that you are running
a kernel with r1.131 of softraid_crypto.c, otherwise the volume will become
unusable.

Same diff also from djm@ and halex@

Revision 1.131 / (download) - annotate - [select for diffs], Fri May 13 19:06:52 2016 UTC (8 years ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0
Changes since 1.130: +3 -3 lines
Diff to previous 1.130 (colored)

overzealous use of errx() hides useful information about errors.
ok benno millert

Revision 1.130 / (download) - annotate - [select for diffs], Thu Feb 4 08:31:26 2016 UTC (8 years, 3 months ago) by uebayasi
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.129: +2 -2 lines
Diff to previous 1.129 (colored)

Fix an unitialized variable; pointed out by jsg@.

Revision 1.129 / (download) - annotate - [select for diffs], Sat Jul 18 23:23:20 2015 UTC (8 years, 10 months ago) by halex
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.128: +2 -5 lines
Diff to previous 1.128 (colored)

remove the restriction to disallow the use of a passphrase file during
initial creation of a crypto volume

ok phessler

Revision 1.128 / (download) - annotate - [select for diffs], Sat May 30 06:24:59 2015 UTC (9 years ago) by jmc
Branch: MAIN
Changes since 1.127: +4 -3 lines
Diff to previous 1.127 (colored)

fix usage();

Revision 1.127 / (download) - annotate - [select for diffs], Fri May 29 00:33:37 2015 UTC (9 years ago) by uebayasi
Branch: MAIN
Changes since 1.126: +161 -6 lines
Diff to previous 1.126 (colored)

Initial addition of ``Patrol Read'' support in bio(4), biocto(8), and
mfi(4).  Based on FreeBSD, but done without mfiutil(8).

OK deraadt@

Revision 1.126 / (download) - annotate - [select for diffs], Mon May 11 12:14:22 2015 UTC (9 years ago) by pelikan
Branch: MAIN
Changes since 1.125: +9 -9 lines
Diff to previous 1.125 (colored)

explicit_bzero(3) on private data, in case of core dumps (and being a good example)

ok florian jsing

Revision 1.125 / (download) - annotate - [select for diffs], Sat Apr 11 16:37:34 2015 UTC (9 years, 1 month ago) by jsing
Branch: MAIN
Changes since 1.124: +1 -3 lines
Diff to previous 1.124 (colored)

Re-enable the RAID 5 discipline for softraid(4).

The RAID 5 implementation has been largely rewritten during the last two
hackathons in Dunedin - it now needs further testing and usage.

Revision 1.124 / (download) - annotate - [select for diffs], Wed Mar 18 07:42:13 2015 UTC (9 years, 2 months ago) by uebayasi
Branch: MAIN
Changes since 1.123: +2 -2 lines
Diff to previous 1.123 (colored)

Sort getopt() string.

Revision 1.123 / (download) - annotate - [select for diffs], Fri Jan 16 06:39:56 2015 UTC (9 years, 4 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.122: +4 -3 lines
Diff to previous 1.122 (colored)

Replace <sys/param.h> with <limits.h> and other less dirty headers where
possible.  Annotate <sys/param.h> lines with their current reasons.  Switch
to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc.  Change
MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where
sensible to avoid pulling in the pollution.  These are the files confirmed
through binary verification.
ok guenther, millert, doug (helped with the verification protocol)

Revision 1.122 / (download) - annotate - [select for diffs], Wed Oct 8 10:08:03 2014 UTC (9 years, 7 months ago) by jsing
Branch: MAIN
Changes since 1.121: +5 -82 lines
Diff to previous 1.121 (colored)

tedu the tedu code that tedu forgot to tedu when he tedued the other part
of this tedu code.

Revision 1.121 / (download) - annotate - [select for diffs], Sun Jul 20 01:38:40 2014 UTC (9 years, 10 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.120: +5 -3 lines
Diff to previous 1.120 (colored)

Make sure the correct errno is reported by warn* or err* and not
the errno of an intervening cleanup operation like close/unlink/etc.

Diff from Doug Hogan (doug (at) acyclic.org)

Revision 1.120 / (download) - annotate - [select for diffs], Tue Apr 22 20:42:01 2014 UTC (10 years, 1 month ago) by tedu
Branch: MAIN
Changes since 1.119: +2 -3 lines
Diff to previous 1.119 (colored)

malloc/memset -> calloc. from peter malone

Revision 1.119 / (download) - annotate - [select for diffs], Sat Jan 18 09:11:12 2014 UTC (10 years, 4 months ago) by jsing
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.118: +5 -1 lines
Diff to previous 1.118 (colored)

Disable the RAID 5 discipline in bioctl, as the current softraid RAID 5
discipline will more than likely eat data if a drive is lost.

Discussed with krw@

Revision 1.118 / (download) - annotate - [select for diffs], Sat Jan 18 09:01:01 2014 UTC (10 years, 4 months ago) by jsing
Branch: MAIN
Changes since 1.117: +1 -2 lines
Diff to previous 1.117 (colored)

Remove the RAID 4 discipline from softraid. Anyone sensible would use RAID
5 instead of RAID 4, assuming both were functional.

Discussed with krw@

Revision 1.117 / (download) - annotate - [select for diffs], Fri Nov 22 04:12:46 2013 UTC (10 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.116: +2 -2 lines
Diff to previous 1.116 (colored)

Whole bunch of (unsigned char) casts carefully added for ctype calls.
Careful second audit by millert

Revision 1.116 / (download) - annotate - [select for diffs], Mon Nov 11 23:07:52 2013 UTC (10 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.115: +4 -1 lines
Diff to previous 1.115 (colored)

oops, forgot a #ifdef AOE in last commit

Revision 1.115 / (download) - annotate - [select for diffs], Mon Nov 4 21:02:58 2013 UTC (10 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.114: +21 -8 lines
Diff to previous 1.114 (colored)

substantial namespace cleanup.  Might go a little bit too far, but we
can expose some of the kernel structures with split .h files if need be.
Discussed with various, including jsing.

Revision 1.114 / (download) - annotate - [select for diffs], Thu Oct 31 00:47:20 2013 UTC (10 years, 7 months ago) by kettenis
Branch: MAIN
Changes since 1.113: +2 -2 lines
Diff to previous 1.113 (colored)

Make sure -v output is properly aligned with the normal output.

Revision 1.113 / (download) - annotate - [select for diffs], Wed Oct 23 13:05:38 2013 UTC (10 years, 7 months ago) by kettenis
Branch: MAIN
Changes since 1.112: +16 -4 lines
Diff to previous 1.112 (colored)

Add support for displaying the cache write policy of RAID volumes to bioctl(8)
and make mfi(4) pass up the necessary information.  Adding support for other
RAID controllers is left as an excercise to the reader.

ok deraadt@

Revision 1.112 / (download) - annotate - [select for diffs], Mon Sep 10 11:28:47 2012 UTC (11 years, 8 months ago) by jsing
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3
Changes since 1.111: +18 -15 lines
Diff to previous 1.111 (colored)

Only keep track of the bio(4) cookie, not an entire bio_locate struct.

Revision 1.111 / (download) - annotate - [select for diffs], Thu Sep 6 19:41:59 2012 UTC (11 years, 8 months ago) by tedu
Branch: MAIN
Changes since 1.110: +1 -3 lines
Diff to previous 1.110 (colored)

move pkcs5_pbkdf5 function to libutil so everybody can play with it
ok deraadt jsing matthew

Revision 1.110 / (download) - annotate - [select for diffs], Thu Apr 19 19:13:51 2012 UTC (12 years, 1 month ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_2_BASE, OPENBSD_5_2
Changes since 1.109: +5 -3 lines
Diff to previous 1.109 (colored)

clear memory before passing to ioctl routines instead of praying it
will be ok and not break things upon return.
ok claudio

Revision 1.109 / (download) - annotate - [select for diffs], Sun Jan 22 11:00:39 2012 UTC (12 years, 4 months ago) by jsing
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE, OPENBSD_5_1
Changes since 1.108: +16 -8 lines
Diff to previous 1.108 (colored)

If no controller name is provided, use the program name as a prefix. Also,
exit with an "unknown error" if a bio(4) error is reported but no status
message has been provided.

Revision 1.108 / (download) - annotate - [select for diffs], Fri Jan 20 14:09:25 2012 UTC (12 years, 4 months ago) by jsing
Branch: MAIN
Changes since 1.107: +93 -60 lines
Diff to previous 1.107 (colored)

Teach bioctl(8) about the new status interface for bio(4). With the
exception of a few messages specific to softraid(4) CRYPTO, there should
be no functional change for drivers that do not yet implement the interface
(which is currently all of them).

Revision 1.107 / (download) - annotate - [select for diffs], Tue Jan 17 15:15:57 2012 UTC (12 years, 4 months ago) by jsing
Branch: MAIN
Changes since 1.106: +15 -15 lines
Diff to previous 1.106 (colored)

Move the bio(4) cookie into a separate struct and make this struct the
first member of each ioctl data structure. This will allow for future
changes to bio(4) status handling.

Revision 1.106 / (download) - annotate - [select for diffs], Tue Jan 17 14:01:02 2012 UTC (12 years, 4 months ago) by jsing
Branch: MAIN
Changes since 1.105: +1 -1 lines
Diff to previous 1.105 (colored)

CONCAT requires at least two disks.

Revision 1.105 / (download) - annotate - [select for diffs], Sat Jan 7 12:16:46 2012 UTC (12 years, 4 months ago) by jsing
Branch: MAIN
Changes since 1.104: +11 -3 lines
Diff to previous 1.104 (colored)

Provide a bioctl(8) option that changes the state of a chunk to offline.

man page part with todd@

Revision 1.104 / (download) - annotate - [select for diffs], Sat Dec 31 17:06:09 2011 UTC (12 years, 5 months ago) by jsing
Branch: MAIN
Changes since 1.103: +5 -0 lines
Diff to previous 1.103 (colored)

Implement a concatenating discipline for softraid.

Many thanks to Marco Peereboom for his assistance with testing and
debugging. Thanks also to Josh Grosse and Chris Jackman for testing.

Revision 1.103 / (download) - annotate - [select for diffs], Mon Aug 1 08:23:52 2011 UTC (12 years, 10 months ago) by matthieu
Branch: MAIN
CVS Tags: OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.102: +3 -3 lines
Diff to previous 1.102 (colored)

Add missing closing braces in usage().
Ok jmc@ (who also pointed me to the 2nd missing one) sobrado@.

Revision 1.102 / (download) - annotate - [select for diffs], Sat Jul 9 16:53:37 2011 UTC (12 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.101: +2 -1 lines
Diff to previous 1.101 (colored)

Add a missing prototype, fix build with WARNINGS=yes.

Revision 1.101 / (download) - annotate - [select for diffs], Fri Jul 8 01:17:58 2011 UTC (12 years, 10 months ago) by tedu
Branch: MAIN
Changes since 1.100: +64 -7 lines
Diff to previous 1.100 (colored)

add basic config support for creating aoe disks. ok marco

Revision 1.100 / (download) - annotate - [select for diffs], Mon Jul 4 04:52:34 2011 UTC (12 years, 11 months ago) by tedu
Branch: MAIN
Changes since 1.99: +6 -4 lines
Diff to previous 1.99 (colored)

use stronum, removing an atoi from the tree.  ok deraadt matthew

Revision 1.99 / (download) - annotate - [select for diffs], Mon Apr 4 15:22:31 2011 UTC (13 years, 2 months ago) by jcs
Branch: MAIN
Changes since 1.98: +5 -5 lines
Diff to previous 1.98 (colored)

give more space when printing volumes to allow softraid0 to fit

ok marco@

Revision 1.98 / (download) - annotate - [select for diffs], Wed Dec 1 19:40:18 2010 UTC (13 years, 6 months ago) by ckuethe
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.97: +13 -9 lines
Diff to previous 1.97 (colored)

Allow add a -s switch to make bioctl read the passphrase from stdin. Handy
for scripting a big batch of remote unlocks. ok marco

Revision 1.97 / (download) - annotate - [select for diffs], Sat Jul 10 02:56:16 2010 UTC (13 years, 10 months ago) by matthew
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.96: +1 -7 lines
Diff to previous 1.96 (colored)

Eliminate some unnecessary #include lines.

"sure" marco@

Revision 1.96 / (download) - annotate - [select for diffs], Thu Jul 1 09:35:42 2010 UTC (13 years, 11 months ago) by jsing
Branch: MAIN
Changes since 1.95: +9 -2 lines
Diff to previous 1.95 (colored)

Use opendev(3) when handling key disks so that disklabel UIDs are
supported.

ok marco@

Revision 1.95 / (download) - annotate - [select for diffs], Tue Jun 22 00:43:37 2010 UTC (13 years, 11 months ago) by dtucker
Branch: MAIN
Changes since 1.94: +12 -12 lines
Diff to previous 1.94 (colored)

rename devname->devicename to prevent shadowing devname(3).  ok marco jsing

Revision 1.94 / (download) - annotate - [select for diffs], Fri Jun 18 17:15:37 2010 UTC (13 years, 11 months ago) by jsing
Branch: MAIN
Changes since 1.93: +28 -25 lines
Diff to previous 1.93 (colored)

Make bioctl(8) disklabel UID friendly by attempting to open the device
using opendev(3) first and then trying /dev/bio if that failed. Also use
opendev(3) when getting device numbers for softraid.

ok marco@

Revision 1.93 / (download) - annotate - [select for diffs], Tue May 18 04:41:14 2010 UTC (14 years ago) by dlg
Branch: MAIN
Changes since 1.92: +2 -1 lines
Diff to previous 1.92 (colored)

dont let sys/ioctl.h imply that you get the ioctls in dkio.h. this
gets rid of #include <sys/dkio.h> in sys/ioctl.h and adds #include
<sys/dkio.h> to the places that actually want and use the disk
ioctls.

this became an issue when krw@'s X build failed when he was testing
a change to dkio.h.
tested by krw@
help from and ok miod@

Revision 1.92 / (download) - annotate - [select for diffs], Sat Apr 3 15:22:44 2010 UTC (14 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.91: +2 -2 lines
Diff to previous 1.91 (colored)

scsi_all.h is needed before scsi_disk.h now. ok marco

Revision 1.91 / (download) - annotate - [select for diffs], Fri Jan 8 16:38:22 2010 UTC (14 years, 4 months ago) by halex
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.90: +2 -2 lines
Diff to previous 1.90 (colored)

"Too less" => "Too few"

ok marco@

Revision 1.90 / (download) - annotate - [select for diffs], Sun Jan 3 01:41:47 2010 UTC (14 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.89: +3 -3 lines
Diff to previous 1.89 (colored)

Nuke some unused variables, ok marco

Revision 1.89 / (download) - annotate - [select for diffs], Thu Dec 31 14:57:40 2009 UTC (14 years, 5 months ago) by jmc
Branch: MAIN
Changes since 1.88: +2 -2 lines
Diff to previous 1.88 (colored)

use the same arg name for -k as the man page;

Revision 1.88 / (download) - annotate - [select for diffs], Thu Dec 31 14:00:45 2009 UTC (14 years, 5 months ago) by jsing
Branch: MAIN
Changes since 1.87: +39 -12 lines
Diff to previous 1.87 (colored)

Add support for key disks. This allows a crypto volume to be constructed
without using a passphrase - instead the encryption mask key is stored on
the specified key disk partition (ideally being one on a removable device).
This also enables automatic assembly of crypto volumes at boot time.

ok marco@

Revision 1.87 / (download) - annotate - [select for diffs], Thu Dec 24 10:06:35 2009 UTC (14 years, 5 months ago) by sobrado
Branch: MAIN
Changes since 1.86: +2 -2 lines
Diff to previous 1.86 (colored)

spelling fixes, from Brad Tilley; we will not fix src/sbin/dump/dump.h
as neither arrayified not arrayfied exist -- sanctioned dictionaries
like Merriam-Webster ones suggest a few alternatives (e.g., arrayed),
however these made up words are easy to understand and we are not
certain that current ones are not ok.

ok jmc@

Revision 1.86 / (download) - annotate - [select for diffs], Tue Nov 24 06:06:06 2009 UTC (14 years, 6 months ago) by jmc
Branch: MAIN
Changes since 1.85: +2 -2 lines
Diff to previous 1.85 (colored)

put -P in the right place;

Revision 1.85 / (download) - annotate - [select for diffs], Tue Nov 24 02:19:35 2009 UTC (14 years, 6 months ago) by jsing
Branch: MAIN
Changes since 1.84: +76 -14 lines
Diff to previous 1.84 (colored)

Allow the passphrase to be changed on softraid crypto volumes. Ensure that
you backup your data and lock up your pets prior to using this.

Tested by todd@

ok marco@

Revision 1.84 / (download) - annotate - [select for diffs], Sun Oct 25 17:53:07 2009 UTC (14 years, 7 months ago) by marco
Branch: MAIN
Changes since 1.83: +7 -6 lines
Diff to previous 1.83 (colored)

Somehow during my testing I missed a test case where an existing crypto
volume could no longer be brought up.
Found by Pedro la Peu <pedro@am-gen.org>, thanks for the report.

Revision 1.83 / (download) - annotate - [select for diffs], Thu Oct 22 15:27:15 2009 UTC (14 years, 7 months ago) by jmc
Branch: MAIN
Changes since 1.82: +3 -4 lines
Diff to previous 1.82 (colored)

tweak previous; ok marco

Revision 1.82 / (download) - annotate - [select for diffs], Wed Oct 21 22:31:17 2009 UTC (14 years, 7 months ago) by marco
Branch: MAIN
Changes since 1.81: +40 -7 lines
Diff to previous 1.81 (colored)

Add passphrase file for crypto volume bring-up.  Proded and ok deraadt

Revision 1.81 / (download) - annotate - [select for diffs], Fri Jul 31 16:12:10 2009 UTC (14 years, 10 months ago) by jsing
Branch: MAIN
Changes since 1.80: +6 -4 lines
Diff to previous 1.80 (colored)

Allow hotspares to be added to bio devices rather than requiring an sd
device.

"Yeah!" marco@

Revision 1.80 / (download) - annotate - [select for diffs], Thu Jun 18 08:05:51 2009 UTC (14 years, 11 months ago) by halex
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.79: +2 -3 lines
Diff to previous 1.79 (colored)

fix crypto raid error message

ok marco@

Revision 1.79 / (download) - annotate - [select for diffs], Wed Jun 17 22:50:58 2009 UTC (14 years, 11 months ago) by marco
Branch: MAIN
Changes since 1.78: +5 -1 lines
Diff to previous 1.78 (colored)

Add raid 4 & 5 in create

ok jordan

Revision 1.78 / (download) - annotate - [select for diffs], Sun Feb 22 07:46:55 2009 UTC (15 years, 3 months ago) by jmc
Branch: MAIN
CVS Tags: OPENBSD_4_5_BASE, OPENBSD_4_5
Changes since 1.77: +12 -8 lines
Diff to previous 1.77 (colored)

split synopsis and the options list according to functionality;
diff from Mitja Mu?eni?

ok marco

Revision 1.77 / (download) - annotate - [select for diffs], Tue Sep 2 23:05:12 2008 UTC (15 years, 9 months ago) by dtucker
Branch: MAIN
Changes since 1.76: +4 -4 lines
Diff to previous 1.76 (colored)

devname -> devicename to prevent shadowing devname(3); ok marco@

Revision 1.76 / (download) - annotate - [select for diffs], Fri Aug 22 06:41:36 2008 UTC (15 years, 9 months ago) by jmc
Branch: MAIN
Changes since 1.75: +3 -3 lines
Diff to previous 1.75 (colored)

- -R before -r in SYNOPSIS/usage()
- avoid marking up `|'

Revision 1.75 / (download) - annotate - [select for diffs], Fri Aug 22 02:00:12 2008 UTC (15 years, 9 months ago) by marco
Branch: MAIN
Changes since 1.74: +69 -15 lines
Diff to previous 1.74 (colored)

Add a hack to manually kick off rebuilds.  This will need some love in the
near future.

ok deraadt

Revision 1.74 / (download) - annotate - [select for diffs], Mon Aug 11 17:28:24 2008 UTC (15 years, 9 months ago) by marco
Branch: MAIN
Changes since 1.73: +15 -69 lines
Diff to previous 1.73 (colored)

Undo last commit; deraadt didn't like it.

Revision 1.73 / (download) - annotate - [select for diffs], Mon Aug 11 17:22:54 2008 UTC (15 years, 9 months ago) by marco
Branch: MAIN
Changes since 1.72: +69 -15 lines
Diff to previous 1.72 (colored)

Add infrastructure to manually kick off rebuilds.

Revision 1.72 / (download) - annotate - [select for diffs], Wed Jul 2 22:08:02 2008 UTC (15 years, 11 months ago) by todd
Branch: MAIN
CVS Tags: OPENBSD_4_4_BASE, OPENBSD_4_4
Changes since 1.71: +14 -4 lines
Diff to previous 1.71 (colored)

string munging: say 'CRYPTO' not 'RAID67'
ok marco@

Revision 1.71 / (download) - annotate - [select for diffs], Sun Jun 15 18:52:58 2008 UTC (15 years, 11 months ago) by jmc
Branch: MAIN
Changes since 1.70: +4 -3 lines
Diff to previous 1.70 (colored)

fix usage();

Revision 1.70 / (download) - annotate - [select for diffs], Sun Jun 15 00:43:23 2008 UTC (15 years, 11 months ago) by hshoexer
Branch: MAIN
Changes since 1.69: +32 -14 lines
Diff to previous 1.69 (colored)

When generating a new volume, ask the user to re-type the passphrase for
verification.

ok djm

Revision 1.69 / (download) - annotate - [select for diffs], Sat Jun 14 18:40:50 2008 UTC (15 years, 11 months ago) by hshoexer
Branch: MAIN
Changes since 1.68: +7 -4 lines
Diff to previous 1.68 (colored)

Provide a status field for operations on the bc_opaque data.  Now we're
able to distinguish cleanly an failing ioctl (ie. return value -1) from
trying to retrieve a KDF hint from a not yet initialized volume.

ok marco djm

Revision 1.68 / (download) - annotate - [select for diffs], Sat Jun 14 17:04:50 2008 UTC (15 years, 11 months ago) by djm
Branch: MAIN
Changes since 1.67: +11 -3 lines
Diff to previous 1.67 (colored)

add a -r option to specify the number of PKCS5 PBKDF2 iterations used
to derive the password (minimum: 1000, maximum: more than you want)
ok hshoexer@

Revision 1.67 / (download) - annotate - [select for diffs], Sat Jun 14 06:28:27 2008 UTC (15 years, 11 months ago) by djm
Branch: MAIN
Changes since 1.66: +10 -15 lines
Diff to previous 1.66 (colored)

Replace PBKDF2 implementation pulled in from vnconfig with one
derived from Damien Bergamini's wpa-psk. This implementation is
smaller, cleaner and uses the libc SHA1 functions instead of
pulling in OpenSSL.

make bioctl.c -Wall clean too

Verified with rfc3962 test vectors and against a assembled cryptoraid;
ok hshoexer@

Revision 1.66 / (download) - annotate - [select for diffs], Sat Jun 14 00:05:47 2008 UTC (15 years, 11 months ago) by djm
Branch: MAIN
Changes since 1.65: +5 -2 lines
Diff to previous 1.65 (colored)

friendly error message when key decryption fails; ok hshoexer@

Revision 1.65 / (download) - annotate - [select for diffs], Fri Jun 13 21:03:40 2008 UTC (15 years, 11 months ago) by hshoexer
Branch: MAIN
Changes since 1.64: +120 -2 lines
Diff to previous 1.64 (colored)

Implement pbkdf2 in in bioctl to derive master key from a passphrase.

ok marco djm

Revision 1.64 / (download) - annotate - [select for diffs], Thu Jun 12 16:08:48 2008 UTC (15 years, 11 months ago) by jmc
Branch: MAIN
Changes since 1.63: +2 -2 lines
Diff to previous 1.63 (colored)

-d tweaks;

Revision 1.63 / (download) - annotate - [select for diffs], Thu Jun 12 00:19:15 2008 UTC (15 years, 11 months ago) by marco
Branch: MAIN
Changes since 1.62: +22 -3 lines
Diff to previous 1.62 (colored)

Add delete volume functionality.

discussed with krw, kettenis & drahn
ok hshoexer

Revision 1.62 / (download) - annotate - [select for diffs], Sat Jan 19 23:53:53 2008 UTC (16 years, 4 months ago) by marco
Branch: MAIN
CVS Tags: OPENBSD_4_3_BASE, OPENBSD_4_3
Changes since 1.61: +8 -2 lines
Diff to previous 1.61 (colored)

Add initial scaffold for RAID 0.  No IO just yet.

Much prodding todd

Revision 1.61 / (download) - annotate - [select for diffs], Sat Sep 8 07:21:29 2007 UTC (16 years, 8 months ago) by henning
Branch: MAIN
Changes since 1.60: +22 -42 lines
Diff to previous 1.60 (colored)

make bioctl behave like a unix program and exit 1 on error
ok deraadt, silence dlg marco

Revision 1.60 / (download) - annotate - [select for diffs], Wed Jul 11 07:40:11 2007 UTC (16 years, 10 months ago) by jmc
Branch: MAIN
CVS Tags: OPENBSD_4_2_BASE, OPENBSD_4_2
Changes since 1.59: +2 -2 lines
Diff to previous 1.59 (colored)

put -q in the right place;

Revision 1.59 / (download) - annotate - [select for diffs], Tue Jul 10 15:46:54 2007 UTC (16 years, 10 months ago) by henning
Branch: MAIN
Changes since 1.58: +49 -6 lines
Diff to previous 1.58 (colored)

implement -q to query a scsi disk for its inquiry data (vendor, model,
revision, serial #) and print that.
when the default bio ioctl fails with ENOTTY because the given disk is not
on a bio-supported raid controller, fall back to -q.
use strnvis to sanitize inquiry data so it is safe to use in scripts.
ok deraadt

Revision 1.58 / (download) - annotate - [select for diffs], Mon Jun 4 05:28:43 2007 UTC (17 years ago) by todd
Branch: MAIN
Changes since 1.57: +4 -3 lines
Diff to previous 1.57 (colored)

document -C option of bioctl
use a simpler form of options with variable number of args
suggestions jmc@ ok marco@

Revision 1.57 / (download) - annotate - [select for diffs], Fri Jun 1 00:00:54 2007 UTC (17 years ago) by tedu
Branch: MAIN
Changes since 1.56: +8 -2 lines
Diff to previous 1.56 (colored)

support for softraid level 'c'.

Revision 1.56 / (download) - annotate - [select for diffs], Thu May 31 04:23:23 2007 UTC (17 years ago) by grunk
Branch: MAIN
Changes since 1.55: +2 -2 lines
Diff to previous 1.55 (colored)

typo, ok tedu@

Revision 1.55 / (download) - annotate - [select for diffs], Mon May 28 21:54:26 2007 UTC (17 years ago) by marco
Branch: MAIN
Changes since 1.54: +44 -4 lines
Diff to previous 1.54 (colored)

Make disk assembly smarter and add two qualifiers to it:
1) noautoassemble; when set the softraid volume will not be assembled during
   autoconf.
2) force; when set it will overwrite metadata on disk

While writing this I ran into 3 bugs that were fixed along the way
1) bcopy in sr_read_meta was copying data to the wrong pointer
2) in sr_read_meta the wrong metadata was coppied into the chunk
3) sr_free_discipline was freing a pointer that wasn't malloc'd

ok dlg

Revision 1.54 / (download) - annotate - [select for diffs], Wed May 23 21:27:13 2007 UTC (17 years ago) by marco
Branch: MAIN
Changes since 1.53: +97 -52 lines
Diff to previous 1.53 (colored)

Remove all vnode dependencies so that we can bootstrap softraid volumes.
Code from tedu.

Replace all kernel string magic with dev_t passed in from bioctl.
Suggestion from beck and tedu.  Help from miod.

Fix chunk crc.

ok tedu

Revision 1.53 / (download) - annotate - [select for diffs], Mon Apr 23 16:38:55 2007 UTC (17 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.52: +8 -34 lines
Diff to previous 1.52 (colored)

remove -D stuff which is just silly, imagine if ls had a debug mode; ok marco

Revision 1.52 / (download) - annotate - [select for diffs], Tue Mar 20 15:26:06 2007 UTC (17 years, 2 months ago) by jmc
Branch: MAIN
Changes since 1.51: +8 -6 lines
Diff to previous 1.51 (colored)

further clean usage(); ok todd

Revision 1.51 / (download) - annotate - [select for diffs], Tue Mar 20 06:29:02 2007 UTC (17 years, 2 months ago) by jmc
Branch: MAIN
Changes since 1.50: +5 -5 lines
Diff to previous 1.50 (colored)

sync usage() w/ synopsis;

Revision 1.50 / (download) - annotate - [select for diffs], Tue Mar 20 03:40:38 2007 UTC (17 years, 2 months ago) by todd
Branch: MAIN
Changes since 1.49: +6 -3 lines
Diff to previous 1.49 (colored)

document softraid and bioctl creation of softraid
ok marco@, help from jmc@

Revision 1.49 / (download) - annotate - [select for diffs], Mon Mar 19 03:02:09 2007 UTC (17 years, 2 months ago) by marco
Branch: MAIN
Changes since 1.48: +73 -3 lines
Diff to previous 1.48 (colored)

Add a new device that provides a framework for IO manipulation.  A very basic
implementation of a RAID 1 is included in this but it does not deal with
failures yet.  Disabled in GENERIC.

Suggestions from and ok beck@ miod@ krw@ dlg@ deraadt@

Revision 1.48 / (download) - annotate - [select for diffs], Mon Aug 28 12:36:08 2006 UTC (17 years, 9 months ago) by mickey
Branch: MAIN
CVS Tags: OPENBSD_4_1_BASE, OPENBSD_4_1, OPENBSD_4_0_BASE, OPENBSD_4_0
Changes since 1.47: +2 -2 lines
Diff to previous 1.47 (colored)

proper justify the size caption to match numbers justification; deraadt@ ok

Revision 1.47 / (download) - annotate - [select for diffs], Mon Aug 28 02:12:59 2006 UTC (17 years, 9 months ago) by deraadt
Branch: MAIN
Changes since 1.46: +1 -1 lines
Diff to previous 1.46 (colored)

Except I disagree strongly, and I was not asked

Revision 1.46 / (download) - annotate - [select for diffs], Sun Aug 27 22:25:16 2006 UTC (17 years, 9 months ago) by mickey
Branch: MAIN
Changes since 1.45: +2 -2 lines
Diff to previous 1.45 (colored)

proper justify the size caption to match numbers justification; krw@ ok

Revision 1.45 / (download) - annotate - [select for diffs], Fri May 26 00:38:30 2006 UTC (18 years ago) by marco
Branch: MAIN
Changes since 1.44: +2 -1 lines
Diff to previous 1.44 (colored)

Assign locator.target to blink structure.

Revision 1.44 / (download) - annotate - [select for diffs], Thu May 25 22:26:03 2006 UTC (18 years ago) by deraadt
Branch: MAIN
Changes since 1.43: +4 -1 lines
Diff to previous 1.43 (colored)

handle Online/Scrub SD state for marco

Revision 1.43 / (download) - annotate - [select for diffs], Thu May 25 04:28:26 2006 UTC (18 years ago) by deraadt
Branch: MAIN
Changes since 1.42: +2 -2 lines
Diff to previous 1.42 (colored)

more room for seconds string

Revision 1.42 / (download) - annotate - [select for diffs], Thu May 25 03:39:12 2006 UTC (18 years ago) by deraadt
Branch: MAIN
Changes since 1.41: +10 -4 lines
Diff to previous 1.41 (colored)

print seconds of progress, if driver makes it available; ok marco

Revision 1.41 / (download) - annotate - [select for diffs], Thu May 25 03:12:50 2006 UTC (18 years ago) by deraadt
Branch: MAIN
Changes since 1.40: +19 -4 lines
Diff to previous 1.40 (colored)

handle new volume status, and print % if known; ok marco

Revision 1.40 / (download) - annotate - [select for diffs], Sun May 7 23:57:23 2006 UTC (18 years ago) by marco
Branch: MAIN
Changes since 1.39: +8 -1 lines
Diff to previous 1.39 (colored)

Add a little debug to test BIOCINQ primitive.

Revision 1.39 / (download) - annotate - [select for diffs], Tue Aug 23 23:20:23 2005 UTC (18 years, 9 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_9_BASE, OPENBSD_3_9, OPENBSD_3_8_BASE, OPENBSD_3_8
Changes since 1.38: +3 -8 lines
Diff to previous 1.38 (colored)

disable -B support for now; ok dlg

Revision 1.38 / (download) - annotate - [select for diffs], Tue Aug 23 03:59:32 2005 UTC (18 years, 9 months ago) by deraadt
Branch: MAIN
Changes since 1.37: +10 -10 lines
Diff to previous 1.37 (colored)

repair warnx() misuses

Revision 1.37 / (download) - annotate - [select for diffs], Sun Aug 21 23:37:24 2005 UTC (18 years, 9 months ago) by dlg
Branch: MAIN
Changes since 1.36: +13 -1 lines
Diff to previous 1.36 (colored)

try to blink the device given on the command line before walking inquiries
on the device looking for an enclosure. this allows bioctl -b 0:0 ses0 to
work as well as bioctl -b 0:0 sd0/ami0.

ok deraadt@

Revision 1.36 / (download) - annotate - [select for diffs], Thu Aug 18 22:14:27 2005 UTC (18 years, 9 months ago) by deraadt
Branch: MAIN
Changes since 1.35: +22 -11 lines
Diff to previous 1.35 (colored)

add support to stop blinking (-u) or use the alarm LED instead (-B)

Revision 1.35 / (download) - annotate - [select for diffs], Thu Aug 18 15:00:37 2005 UTC (18 years, 9 months ago) by deraadt
Branch: MAIN
Changes since 1.34: +36 -37 lines
Diff to previous 1.34 (colored)

better diagnostics in case of bad arguments; ok dlg

Revision 1.34 / (download) - annotate - [select for diffs], Thu Aug 18 14:40:37 2005 UTC (18 years, 9 months ago) by dlg
Branch: MAIN
Changes since 1.33: +93 -24 lines
Diff to previous 1.33 (colored)

rework the addressing for blinking to make it like the hotspares

help from and ok deraadt@

Revision 1.33 / (download) - annotate - [select for diffs], Thu Aug 18 12:53:22 2005 UTC (18 years, 9 months ago) by deraadt
Branch: MAIN
Changes since 1.32: +12 -12 lines
Diff to previous 1.32 (colored)

a step towards where dlg is heading next + knf

Revision 1.32 / (download) - annotate - [select for diffs], Thu Aug 18 12:19:08 2005 UTC (18 years, 9 months ago) by dlg
Branch: MAIN
Changes since 1.31: +33 -5 lines
Diff to previous 1.31 (colored)

very basic blink support.

some manpage tweaks from jmc@

Revision 1.31 / (download) - annotate - [select for diffs], Thu Aug 18 04:49:52 2005 UTC (18 years, 9 months ago) by marco
Branch: MAIN
Changes since 1.30: +76 -4 lines
Diff to previous 1.30 (colored)

Add "create hot spare" ok dlg@

Revision 1.30 / (download) - annotate - [select for diffs], Wed Aug 17 06:31:01 2005 UTC (18 years, 9 months ago) by marco
Branch: MAIN
Changes since 1.29: +10 -6 lines
Diff to previous 1.29 (colored)

Add support for unused disks.
Fix SCSI string madness (by deraadt).
Add some debug statements in bioctl.

Revision 1.29 / (download) - annotate - [select for diffs], Mon Aug 15 23:13:24 2005 UTC (18 years, 9 months ago) by deraadt
Branch: MAIN
Changes since 1.28: +28 -15 lines
Diff to previous 1.28 (colored)

if bv_level is -1, it is a hot spare; ok marco

Revision 1.28 / (download) - annotate - [select for diffs], Tue Aug 9 03:08:27 2005 UTC (18 years, 9 months ago) by deraadt
Branch: MAIN
Changes since 1.27: +2 -2 lines
Diff to previous 1.27 (colored)

align a column

Revision 1.27 / (download) - annotate - [select for diffs], Tue Aug 9 01:43:33 2005 UTC (18 years, 9 months ago) by deraadt
Branch: MAIN
Changes since 1.26: +19 -10 lines
Diff to previous 1.26 (colored)

verbose output option

Revision 1.26 / (download) - annotate - [select for diffs], Mon Aug 8 20:26:21 2005 UTC (18 years, 9 months ago) by deraadt
Branch: MAIN
Changes since 1.25: +7 -2 lines
Diff to previous 1.25 (colored)

print information about ses/safte for each device; ok marco

Revision 1.25 / (download) - annotate - [select for diffs], Mon Aug 8 18:57:16 2005 UTC (18 years, 9 months ago) by deraadt
Branch: MAIN
Changes since 1.24: +4 -7 lines
Diff to previous 1.24 (colored)

print out target as channel:target.lun

Revision 1.24 / (download) - annotate - [select for diffs], Mon Aug 8 04:04:13 2005 UTC (18 years, 9 months ago) by deraadt
Branch: MAIN
Changes since 1.23: +91 -79 lines
Diff to previous 1.23 (colored)

lots of cleanup, print lots of information based on new linkages between
devices provided by marco; ok marco

Revision 1.23 / (download) - annotate - [select for diffs], Fri Aug 5 02:40:36 2005 UTC (18 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.22: +2 -2 lines
Diff to previous 1.22 (colored)

sync usage to man page

Revision 1.22 / (download) - annotate - [select for diffs], Fri Aug 5 02:34:52 2005 UTC (18 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.21: +4 -1 lines
Diff to previous 1.21 (colored)

if no command specified, assume -i

Revision 1.21 / (download) - annotate - [select for diffs], Wed Aug 3 16:12:53 2005 UTC (18 years, 10 months ago) by marco
Branch: MAIN
Changes since 1.20: +2 -2 lines
Diff to previous 1.20 (colored)

Fix usage.

Revision 1.20 / (download) - annotate - [select for diffs], Wed Aug 3 03:01:31 2005 UTC (18 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.19: +5 -2 lines
Diff to previous 1.19 (colored)

be more sure about what is a drive vs controller; ok marco

Revision 1.19 / (download) - annotate - [select for diffs], Wed Aug 3 02:39:55 2005 UTC (18 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.18: +18 -42 lines
Diff to previous 1.18 (colored)

various cleanups, the way i like it, ok marco

Revision 1.18 / (download) - annotate - [select for diffs], Tue Aug 2 20:27:13 2005 UTC (18 years, 10 months ago) by jmc
Branch: MAIN
Changes since 1.17: +2 -2 lines
Diff to previous 1.17 (colored)

add -a properly to SYNOPSIS; sync usage();
ok marco@

Revision 1.17 / (download) - annotate - [select for diffs], Mon Aug 1 16:39:22 2005 UTC (18 years, 10 months ago) by marco
Branch: MAIN
Changes since 1.16: +72 -3 lines
Diff to previous 1.16 (colored)

Add alarm support.

Revision 1.16 / (download) - annotate - [select for diffs], Fri Jul 29 16:01:18 2005 UTC (18 years, 10 months ago) by marco
Branch: MAIN
Changes since 1.15: +95 -955 lines
Diff to previous 1.15 (colored)

Redo bioctl because initial implementation was too complex.

tested and ok dlg@ beck@
get it in @deraadt

Revision 1.15 / (download) - annotate - [select for diffs], Mon Jul 18 15:10:56 2005 UTC (18 years, 10 months ago) by dlg
Branch: MAIN
Changes since 1.14: +963 -59 lines
Diff to previous 1.14 (colored)

revert marcos bio changes, mickey not ok

Revision 1.14 / (download) - annotate - [select for diffs], Mon Jul 18 14:34:41 2005 UTC (18 years, 10 months ago) by jmc
Branch: MAIN
Changes since 1.13: +2 -2 lines
Diff to previous 1.13 (colored)

tweaks;
ok marco@

Revision 1.13 / (download) - annotate - [select for diffs], Mon Jul 18 01:59:43 2005 UTC (18 years, 10 months ago) by marco
Branch: MAIN
Changes since 1.12: +3 -3 lines
Diff to previous 1.12 (colored)

Fix online help.

Revision 1.12 / (download) - annotate - [select for diffs], Mon Jul 18 01:29:19 2005 UTC (18 years, 10 months ago) by marco
Branch: MAIN
Changes since 1.11: +59 -963 lines
Diff to previous 1.11 (colored)

Kill initial implementation because it sucked.  It was far too complex the new
paradigm is to virtualize the operations.  Using physical data is really only
necessary on low end hardware or by advanced users.
For now only support the inquiry operation.

ok dlg@

Revision 1.11 / (download) - annotate - [select for diffs], Fri Jul 1 21:53:40 2005 UTC (18 years, 11 months ago) by marco
Branch: MAIN
Changes since 1.10: +31 -11 lines
Diff to previous 1.10 (colored)

Add -f option for disk operations.  Idea by deraadt.

This is not fully functional yet.

Revision 1.10 / (download) - annotate - [select for diffs], Mon Apr 18 11:51:46 2005 UTC (19 years, 1 month ago) by jmc
Branch: MAIN
Changes since 1.9: +4 -9 lines
Diff to previous 1.9 (colored)

sync usage() w/ man synopsis;
ok marco@

Revision 1.9 / (download) - annotate - [select for diffs], Tue Apr 12 20:49:19 2005 UTC (19 years, 1 month ago) by marco
Branch: MAIN
Changes since 1.8: +118 -16 lines
Diff to previous 1.8 (colored)

Blink support is now fully functional.

Most enclosures timeout the normal blink in about 2 minutes; if not the user
can cancel the blink with -b unblink.  On the other hand the alarm blink never
times out.

example usage: bioctl -d ami0 -l 1:8 -b blink

Revision 1.8 / (download) - annotate - [select for diffs], Wed Apr 6 20:51:46 2005 UTC (19 years, 2 months ago) by marco
Branch: MAIN
Changes since 1.7: +4 -3 lines
Diff to previous 1.7 (colored)

Use scsi_ses.h

Revision 1.7 / (download) - annotate - [select for diffs], Wed Apr 6 02:36:34 2005 UTC (19 years, 2 months ago) by marco
Branch: MAIN
Changes since 1.6: +177 -2 lines
Diff to previous 1.6 (colored)

Add ses blink crud.  Not fully functional yet.

Revision 1.6 / (download) - annotate - [select for diffs], Tue Apr 5 20:25:50 2005 UTC (19 years, 2 months ago) by marco
Branch: MAIN
Changes since 1.5: +21 -13 lines
Diff to previous 1.5 (colored)

fix output from remaining passthrough functions

Revision 1.5 / (download) - annotate - [select for diffs], Tue Apr 5 19:45:06 2005 UTC (19 years, 2 months ago) by marco
Branch: MAIN
Changes since 1.4: +97 -32 lines
Diff to previous 1.4 (colored)

clean up enumeration.
properly print inquiry data.
identify devices bioctl cares about.

Revision 1.4 / (download) - annotate - [select for diffs], Mon Apr 4 22:43:07 2005 UTC (19 years, 2 months ago) by marco
Branch: MAIN
Changes since 1.3: +83 -14 lines
Diff to previous 1.3 (colored)

Add initial blink/unblink harness.
Fix INQUIRY namespace polution.
Little clean up and new debug messages.

Revision 1.3 / (download) - annotate - [select for diffs], Mon Apr 4 17:37:17 2005 UTC (19 years, 2 months ago) by marco
Branch: MAIN
Changes since 1.2: +9 -42 lines
Diff to previous 1.2 (colored)

use .h

Revision 1.2 / (download) - annotate - [select for diffs], Wed Mar 30 08:06:03 2005 UTC (19 years, 2 months ago) by dlg
Branch: MAIN
Changes since 1.1: +2 -2 lines
Diff to previous 1.1 (colored)

update copyright for marco who says i can have the free commit

Revision 1.1 / (download) - annotate - [select for diffs], Tue Mar 29 22:04:21 2005 UTC (19 years, 2 months ago) by marco
Branch: MAIN

adding initial bioctl code

ok mickey@

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.