smapi.c (ce533e82a29fa767591d5f65ceca98e20ff621c8) | smapi.c (6bfa9a2d66dd0e00182017d6741d44e54d0b2cca) |
---|---|
1/*- 2 * Copyright (c) 2003 Matthew N. Dodd <winter@jurai.net> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 94 unchanged lines hidden (view full) --- 103 caddr_t data; 104 int fflag; 105 d_thread_t * td; 106{ 107 struct smapi_softc *sc; 108 int error; 109 110 error = 0; | 1/*- 2 * Copyright (c) 2003 Matthew N. Dodd <winter@jurai.net> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 94 unchanged lines hidden (view full) --- 103 caddr_t data; 104 int fflag; 105 d_thread_t * td; 106{ 107 struct smapi_softc *sc; 108 int error; 109 110 error = 0; |
111 sc = devclass_get_softc(smapi_devclass, minor(dev)); | 111 sc = devclass_get_softc(smapi_devclass, dev2unit(dev)); |
112 if (sc == NULL) { 113 error = ENXIO; 114 goto fail; 115 } 116 117 switch (cmd) { 118 case SMAPIOGHEADER: 119 bcopy((caddr_t)sc->header, data, --- 208 unchanged lines hidden --- | 112 if (sc == NULL) { 113 error = ENXIO; 114 goto fail; 115 } 116 117 switch (cmd) { 118 case SMAPIOGHEADER: 119 bcopy((caddr_t)sc->header, data, --- 208 unchanged lines hidden --- |