function gvinum_process_updatenotification($mode, $data)
{
    global $config;
    $retval = 0;
    switch ($mode) {
        case UPDATENOTIFY_MODE_NEW:
            $retval |= disks_raid_gvinum_configure($data);
            break;
        case UPDATENOTIFY_MODE_MODIFIED:
            $retval |= rc_exec_service("geom start vinum");
            break;
        case UPDATENOTIFY_MODE_DIRTY:
            $retval |= disks_raid_gvinum_delete($data);
            if (is_array($config['gvinum']['vdisk'])) {
                $index = array_search_ex($data, $config['gvinum']['vdisk'], "uuid");
                if (false !== $index) {
                    unset($config['gvinum']['vdisk'][$index]);
                    write_config();
                }
            }
            break;
    }
    return $retval;
}
    if (is_array($error_bucket)) {
        foreach ($error_bucket as $elem) {
            $input_errors[] =& $elem["error"];
        }
    }
    /* if this is an AJAX caller then handle via JSON */
    if (isAjax() && is_array($error_bucket)) {
        input_errors2Ajax(NULL, $error_bucket);
        exit;
    }
    if ($_POST['apply']) {
        $retval = 0;
        if (!file_exists($d_sysrebootreqd_path)) {
            config_lock();
            /* reload all components that create raid device */
            disks_raid_gvinum_configure();
            config_unlock();
            write_config();
        }
        $savemsg = get_std_save_message($retval);
        if ($retval == 0) {
            if (file_exists($d_raidconfdirty_path)) {
                unlink($d_raidconfdirty_path);
            }
        }
    }
}
if ($_GET['act'] == "del") {
    if ($a_raid[$_GET['id']]) {
        $raidname = $a_raid[$_GET['id']]['name'];
        disks_raid_gvinum_delete($raidname);