MCPcopy Create free account
hub / github.com/F-Stack/f-stack / smapi_ioctl

Function smapi_ioctl

freebsd/i386/bios/smapi.c:102–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100 struct smapi_bios_parameter *);
101
102static int
103smapi_ioctl (struct cdev *dev, u_long cmd, caddr_t data, int fflag, struct thread *td)
104{
105 struct smapi_softc *sc;
106 int error;
107
108 error = 0;
109 sc = devclass_get_softc(smapi_devclass, dev2unit(dev));
110 if (sc == NULL) {
111 error = ENXIO;
112 goto fail;
113 }
114
115 switch (cmd) {
116 case SMAPIOGHEADER:
117 bcopy((caddr_t)sc->header, data,
118 sizeof(struct smapi_bios_header));
119 error = 0;
120 break;
121 case SMAPIOCGFUNCTION:
122 smapi32_offset = sc->smapi32_entry;
123 error = smapi32((struct smapi_bios_parameter *)data,
124 (struct smapi_bios_parameter *)data);
125 break;
126 default:
127 error = ENOTTY;
128 }
129
130fail:
131 return (error);
132}
133
134static int
135smapi_header_cksum (struct smapi_bios_header *header)

Callers

nothing calls this directly

Calls 1

devclass_get_softcFunction · 0.85

Tested by

no test coverage detected