Lines Matching refs:cdp
52 common_data_t *cdp = env->private;
55 " attach: %x args: '%s'\n", cdp->fc.config_address,
56 cdp->fc.fcode_size, cdp->fc.unit_address, cdp->attach,
64 fc_get_request(common_data_t *cdp)
69 if (cdp->fcode_fd < 0) {
74 if ((nbytes = read(cdp->fcode_fd, &c, sizeof (c))) < 0) {
79 if (ioctl(cdp->fcode_fd, FC_GET_PARAMETERS, &cdp->fc) < 0) {
84 if ((cdp->attach = fc_get_ap(cdp)) == NULL)
93 common_data_t *cdp = env->private;
102 if (ioctl(cdp->fcode_fd, FC_GET_MY_ARGS, buffer) < 0) {
136 common_data_t *cdp = env->private;
141 if (!cdp->fc.fcode_size) {
147 fcode_info.fcode_size = cdp->fc.fcode_size;
148 fcode_info.fcode_ptr = MALLOC(cdp->fc.fcode_size);
149 if (ioctl(cdp->fcode_fd, FC_GET_FCODE_DATA, &fcode_info) < 0) {
155 (int)cdp->fc.fcode_size);
157 PUSH(DS, (fstack_t)cdp->fc.fcode_size);
255 common_data_t *cdp = env->private;
308 if (ioctl(cdp->fcode_fd, FC_SET_FCODE_ERROR, &error) < 0) {
317 common_data_t *cdp = env->private;
319 if ((cdp->fcode_fd = open(fcode_dev, O_RDONLY)) < 0)
321 return (cdp->fcode_fd >= 0);
327 common_data_t *cdp = env->private;
329 if (cdp->fcode_fd >= 0)
330 close(cdp->fcode_fd);
333 if (!fc_get_request(cdp)) {
350 common_data_t *cdp = env->private;
352 cdp->fcode_fd = 0;
353 if (ioctl(cdp->fcode_fd, FC_GET_PARAMETERS, &cdp->fc) < 0) {
358 if ((cdp->attach = fc_get_ap(cdp)) == NULL)
369 common_data_t *cdp = env->private;
376 push_a_string(env, cdp->fc.unit_address);
408 common_data_t *cdp = env->private;
410 close(cdp->fcode_fd);