EXPORT int CALL RomOpen(void) { if (!l_PluginInit) return 0; update_conf(CFG_FILE); return 1; }
static void smb_conf_updated(struct messaging_context *msg, void *private_data, uint32_t msg_type, struct server_id server_id, DATA_BLOB *data) { struct tevent_context *ev_ctx = talloc_get_type_abort(private_data, struct tevent_context); DEBUG(10, ("Got message saying smb.conf was updated. Reloading.\n")); update_conf(ev_ctx, msg); }
EXPORT void CALL DllConfig(p_void hParent) { system("sp_cfgui"); update_conf(CFG_FILE); if (DMEM == IMEM || GET_RCP_REG(SP_PC_REG) % 4096 == 0x00000000) return; export_SP_memory(); hParent = NULL; if (hParent == NULL) return; /* -Wunused-but-set-parameter */ return; }
static void spoolss_sig_hup_handler(struct tevent_context *ev, struct tevent_signal *se, int signum, int count, void *siginfo, void *pvt) { struct messaging_context *msg_ctx; msg_ctx = talloc_get_type_abort(pvt, struct messaging_context); DEBUG(1,("Reloading printers after SIGHUP\n")); update_conf(ev, msg_ctx); /* relay to all children */ if (spoolss_pool) { prefork_send_signal_to_all(spoolss_pool, SIGHUP); } }
/* ** Name: void do_init(message *mp) ** Function: Checks for hardware presence. ** Provides initialization of hardware and data structures */ static void do_init(const message * mp) { dpeth_t *dep; dp_conf_t *dcp; message reply_mess; int r, confnr; dep = &de_state; /* Pick a default configuration for this instance. */ confnr = MIN(de_instance, DP_CONF_NR-1); dcp = &dp_conf[confnr]; strcpy(dep->de_name, DevName); dep->de_name[4] = '0' + de_instance; if (dep->de_mode == DEM_DISABLED) { update_conf(dep, dcp); /* First time thru */ if (dep->de_mode == DEM_ENABLED && !el1_probe(dep) && /* Probe for 3c501 */ !wdeth_probe(dep) && /* Probe for WD80x3 */ !ne_probe(dep) && /* Probe for NEx000 */ !el2_probe(dep) && /* Probe for 3c503 */ !el3_probe(dep)) { /* Probe for 3c509 */ printf("%s: warning no ethernet card found at 0x%04X\n", dep->de_name, dep->de_base_port); dep->de_mode = DEM_DISABLED; } } r = OK; /* 'de_mode' may change if probe routines fail, test again */ switch (dep->de_mode) { case DEM_DISABLED: /* Device is configured OFF or hardware probe failed */ r = ENXIO; break; case DEM_ENABLED: /* Device is present and probed */ if (dep->de_flags == DEF_EMPTY) { /* These actions only the first time */ do_first_init(dep, dcp); dep->de_flags |= DEF_ENABLED; } dep->de_flags &= NOT(DEF_PROMISC | DEF_MULTI | DEF_BROAD); if (mp->DL_MODE & DL_PROMISC_REQ) dep->de_flags |= DEF_PROMISC | DEF_MULTI | DEF_BROAD; if (mp->DL_MODE & DL_MULTI_REQ) dep->de_flags |= DEF_MULTI; if (mp->DL_MODE & DL_BROAD_REQ) dep->de_flags |= DEF_BROAD; (*dep->de_flagsf) (dep); break; case DEM_SINK: /* Device not present (sink mode) */ memset(dep->de_address.ea_addr, 0, sizeof(ether_addr_t)); dp_confaddr(dep); /* Station address from env. */ break; default: break; } reply_mess.m_type = DL_CONF_REPLY; reply_mess.DL_STAT = r; if (r == OK) *(ether_addr_t *) reply_mess.DL_HWADDR = dep->de_address; DEBUG(printf("\t reply %d\n", reply_mess.m_type)); if (send(mp->m_source, &reply_mess) != OK) /* Can't send */ panic(SendErrMsg, mp->m_source); return; }
/* ** Name: void do_init(message *mp) ** Function: Checks for hardware presence. ** Provides initialization of hardware and data structures */ static void do_init(message * mp) { int port; dpeth_t *dep; dp_conf_t *dcp; message reply_mess; port = mp->DL_PORT; if (port >= 0 && port < DE_PORT_NR) { dep = &de_table[port]; dcp = &dp_conf[port]; strcpy(dep->de_name, DevName); dep->de_name[4] = '0' + port; if (dep->de_mode == DEM_DISABLED) { update_conf(dep, dcp); /* First time thru */ if (dep->de_mode == DEM_ENABLED && !el1_probe(dep) && /* Probe for 3c501 */ !wdeth_probe(dep) && /* Probe for WD80x3 */ !ne_probe(dep) && /* Probe for NEx000 */ !el2_probe(dep) && /* Probe for 3c503 */ !el3_probe(dep)) { /* Probe for 3c509 */ printf("%s: warning no ethernet card found at 0x%04X\n", dep->de_name, dep->de_base_port); dep->de_mode = DEM_DISABLED; } } /* 'de_mode' may change if probe routines fail, test again */ switch (dep->de_mode) { case DEM_DISABLED: /* Device is configured OFF or hardware probe failed */ port = ENXIO; break; case DEM_ENABLED: /* Device is present and probed */ if (dep->de_flags == DEF_EMPTY) { /* These actions only the first time */ do_first_init(dep, dcp); dep->de_flags |= DEF_ENABLED; } dep->de_flags &= NOT(DEF_PROMISC | DEF_MULTI | DEF_BROAD); if (mp->DL_MODE & DL_PROMISC_REQ) dep->de_flags |= DEF_PROMISC | DEF_MULTI | DEF_BROAD; if (mp->DL_MODE & DL_MULTI_REQ) dep->de_flags |= DEF_MULTI; if (mp->DL_MODE & DL_BROAD_REQ) dep->de_flags |= DEF_BROAD; (*dep->de_flagsf) (dep); dep->de_client = mp->m_source; break; case DEM_SINK: /* Device not present (sink mode) */ memset(dep->de_address.ea_addr, 0, sizeof(ether_addr_t)); dp_confaddr(dep); /* Station address from env. */ break; default: break; } *(ether_addr_t *) reply_mess.m3_ca1 = dep->de_address; } else /* Port number is out of range */ port = ENXIO; reply_mess.m_type = DL_INIT_REPLY; reply_mess.m3_i1 = port; reply_mess.m3_i2 = DE_PORT_NR; DEBUG(printf("\t reply %d\n", reply_mess.m_type)); if (send(mp->m_source, &reply_mess) != OK) /* Can't send */ panic(dep->de_name, SendErrMsg, mp->m_source); return; }