+static void
+exports_update_one(nfs_export *exp, int verbose)
+{
+ /* check mountpoint option */
+ if (exp->m_mayexport &&
+ exp->m_export.e_mountpoint &&
+ !is_mountpoint(exp->m_export.e_mountpoint[0]?
+ exp->m_export.e_mountpoint:
+ exp->m_export.e_path)) {
+ printf("%s not exported as %s not a mountpoint.\n",
+ exp->m_export.e_path, exp->m_export.e_mountpoint);
+ exp->m_mayexport = 0;
+ }
+ if (exp->m_mayexport && ((exp->m_exported<1) || exp->m_changed)) {
+ if (verbose)
+ printf("%sexporting %s:%s to kernel\n",
+ exp->m_exported ?"re":"",
+ exp->m_client->m_hostname,
+ exp->m_export.e_path);
+ if (!export_export(exp))
+ error(exp, errno);
+ }
+ if (exp->m_exported && ! exp->m_mayexport) {
+ if (verbose)
+ printf("unexporting %s:%s from kernel\n",
+ exp->m_client->m_hostname,
+ exp->m_export.e_path);
+ if (!export_unexport(exp))
+ error(exp, errno);
+ }
+}
+
+