Lines Matching refs:mpconf
171 FILE *mpconf; in InitLibrary() local
205 if ((mpconf = fdopen(fd_mpconf, "r")) == NULL) { in InitLibrary()
213 while ((mpconf != NULL) && in InitLibrary()
214 (charPtr = fgetws(fullline, MAX_LINE_SIZE, mpconf))) { in InitLibrary()
285 fclose(mpconf); in InitLibrary()
290 fclose(mpconf); in InitLibrary()
3455 int mpconf, bytes_left, write_offset; in MP_RegisterPlugin() local
3493 if ((mpconf = open(mpConfFilePath, O_RDWR | O_CREAT)) == -1) { in MP_RegisterPlugin()
3497 if (fchmod(mpconf, S_IRUSR | S_IRGRP | S_IROTH) < 0) { in MP_RegisterPlugin()
3498 close(mpconf); in MP_RegisterPlugin()
3502 if (lock_register(mpconf, F_SETLKW, F_WRLCK, 0, SEEK_SET, 0) < 0) { in MP_RegisterPlugin()
3503 close(mpconf); in MP_RegisterPlugin()
3507 if (fstat(mpconf, &stbuf) == -1) { in MP_RegisterPlugin()
3508 CLEANUP_N_RET(mpconf, MP_STATUS_FAILED); in MP_RegisterPlugin()
3512 if (write(mpconf, HDR, sizeof_conf_hdr) != in MP_RegisterPlugin()
3514 CLEANUP_N_RET(mpconf, MP_STATUS_FAILED); in MP_RegisterPlugin()
3517 if (pwrite(mpconf, fullline, strlen(fullline), in MP_RegisterPlugin()
3520 CLEANUP_N_RET(mpconf, MP_STATUS_FAILED); in MP_RegisterPlugin()
3522 CLEANUP_N_RET(mpconf, MP_STATUS_SUCCESS); in MP_RegisterPlugin()
3527 MAP_SHARED, mpconf, 0)) == MAP_FAILED) { in MP_RegisterPlugin()
3528 CLEANUP_N_RET(mpconf, MP_STATUS_FAILED); in MP_RegisterPlugin()
3535 CLEANUP_N_RET(mpconf, MP_STATUS_SUCCESS); in MP_RegisterPlugin()
3539 if (pwrite(mpconf, fullline, strlen(fullline), in MP_RegisterPlugin()
3542 CLEANUP_N_RET(mpconf, MP_STATUS_FAILED); in MP_RegisterPlugin()
3544 CLEANUP_N_RET(mpconf, MP_STATUS_SUCCESS); in MP_RegisterPlugin()
3577 int mpconf, tmp_mpconf, bytes_left, write_offset; in MP_DeregisterPlugin() local
3602 if ((mpconf = open(mpConfFilePath, O_RDWR)) == -1) { in MP_DeregisterPlugin()
3606 if (fchmod(mpconf, S_IRUSR | S_IRGRP | S_IROTH) < 0) { in MP_DeregisterPlugin()
3607 close(mpconf); in MP_DeregisterPlugin()
3611 if (lock_register(mpconf, F_SETLKW, F_WRLCK, 0, SEEK_SET, 0) < 0) { in MP_DeregisterPlugin()
3612 close(mpconf); in MP_DeregisterPlugin()
3616 if (fstat(mpconf, &stbuf) == -1) { in MP_DeregisterPlugin()
3617 CLEANUP_N_RET(mpconf, MP_STATUS_FAILED); in MP_DeregisterPlugin()
3621 CLEANUP_N_RET(mpconf, MP_STATUS_SUCCESS); in MP_DeregisterPlugin()
3626 MAP_SHARED, mpconf, 0)) == MAP_FAILED) { in MP_DeregisterPlugin()
3627 CLEANUP_N_RET(mpconf, MP_STATUS_FAILED); in MP_DeregisterPlugin()
3633 CLEANUP_N_RET(mpconf, MP_STATUS_UNKNOWN_FN); in MP_DeregisterPlugin()
3644 CLEANUP_N_RET(mpconf, MP_STATUS_FAILED); in MP_DeregisterPlugin()
3649 CLEANUP_N_RET(mpconf, MP_STATUS_FAILED); in MP_DeregisterPlugin()
3655 CLEANUP_N_RET(mpconf, MP_STATUS_FAILED); in MP_DeregisterPlugin()
3663 CLEANUP_N_RET(mpconf, MP_STATUS_FAILED); in MP_DeregisterPlugin()
3665 CLEANUP_N_RET(mpconf, MP_STATUS_SUCCESS); in MP_DeregisterPlugin()