g_bde.c (107831) | g_bde.c (109623) |
---|---|
1/*- 2 * Copyright (c) 2002 Poul-Henning Kamp 3 * Copyright (c) 2002 Networks Associates Technology, Inc. 4 * All rights reserved. 5 * 6 * This software was developed for the FreeBSD Project by Poul-Henning Kamp 7 * and NAI Labs, the Security Research Division of Network Associates, Inc. 8 * under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the --- 15 unchanged lines hidden (view full) --- 24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 * | 1/*- 2 * Copyright (c) 2002 Poul-Henning Kamp 3 * Copyright (c) 2002 Networks Associates Technology, Inc. 4 * All rights reserved. 5 * 6 * This software was developed for the FreeBSD Project by Poul-Henning Kamp 7 * and NAI Labs, the Security Research Division of Network Associates, Inc. 8 * under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the --- 15 unchanged lines hidden (view full) --- 24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 * |
32 * $FreeBSD: head/sys/geom/bde/g_bde.c 107831 2002-12-13 21:10:59Z phk $ | 32 * $FreeBSD: head/sys/geom/bde/g_bde.c 109623 2003-01-21 08:56:16Z alfred $ |
33 * 34 */ 35 36#include <sys/param.h> 37#include <sys/stdint.h> 38#include <sys/bio.h> 39#include <sys/lock.h> 40#include <sys/mutex.h> --- 166 unchanged lines hidden (view full) --- 207 g_destroy_geom(gp); 208 return (error); 209 } 210 g_topology_unlock(); 211 g_waitidle(); 212 while (1) { 213 sectorsize = cp->provider->sectorsize; 214 mediasize = cp->provider->mediasize; | 33 * 34 */ 35 36#include <sys/param.h> 37#include <sys/stdint.h> 38#include <sys/bio.h> 39#include <sys/lock.h> 40#include <sys/mutex.h> --- 166 unchanged lines hidden (view full) --- 207 g_destroy_geom(gp); 208 return (error); 209 } 210 g_topology_unlock(); 211 g_waitidle(); 212 while (1) { 213 sectorsize = cp->provider->sectorsize; 214 mediasize = cp->provider->mediasize; |
215 sc = g_malloc(sizeof(struct g_bde_softc), M_WAITOK | M_ZERO); | 215 sc = g_malloc(sizeof(struct g_bde_softc), M_ZERO); |
216 gp->softc = sc; 217 sc->geom = gp; 218 sc->consumer = cp; 219 220 error = g_bde_decrypt_lock(sc, ga->ptr, 221 (u_char *)ga->ptr + (sizeof sc->sha2), 222 mediasize, sectorsize, NULL); 223 bzero(sc->sha2, sizeof sc->sha2); --- 55 unchanged lines hidden --- | 216 gp->softc = sc; 217 sc->geom = gp; 218 sc->consumer = cp; 219 220 error = g_bde_decrypt_lock(sc, ga->ptr, 221 (u_char *)ga->ptr + (sizeof sc->sha2), 222 mediasize, sectorsize, NULL); 223 bzero(sc->sha2, sizeof sc->sha2); --- 55 unchanged lines hidden --- |