socsvn commit: r304465 - soc2016/yuanxunzhang/head/usr.sbin/eaps
yuanxunzhang at FreeBSD.org
yuanxunzhang at FreeBSD.org
Fri Jun 3 05:25:16 UTC 2016
Author: yuanxunzhang
Date: Fri Jun 3 05:25:15 2016
New Revision: 304465
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=304465
Log:
freeBSD:EAPS development
Modified:
soc2016/yuanxunzhang/head/usr.sbin/eaps/eaps.c
Modified: soc2016/yuanxunzhang/head/usr.sbin/eaps/eaps.c
==============================================================================
--- soc2016/yuanxunzhang/head/usr.sbin/eaps/eaps.c Fri Jun 3 05:15:16 2016 (r304464)
+++ soc2016/yuanxunzhang/head/usr.sbin/eaps/eaps.c Fri Jun 3 05:25:15 2016 (r304465)
@@ -59,7 +59,7 @@
SLIST_ENTRY(eaps_d) eaps_entries;
};
-static SLIST_HEAD(, eaps_d) eaps_head = SLIST_HEAD_INITIALIZER(eaps_head);
+static SLIST_HEAD(, eaps_d) head = SLIST_HEAD_INITIALIZER(head);
static struct keytab {
const char *kt_cp;
@@ -109,7 +109,7 @@
strlcpy(eaps_new->eaps_name, domain_name, sizeof(eaps_new->eaps_name));
/* Add to keymap list */
- SLIST_INSERT_HEAD(&eaps_head, eaps_new, eaps_entries);
+ SLIST_INSERT_HEAD(&head, eaps_new, eaps_entries);
exit(error);
}
@@ -128,12 +128,13 @@
int error = 0;
struct eaps_d *eaps;
- // if (SLIST_EMPTY(&eaps_head)) {
- // printf("No eaps Configuration!\n");
- // }
+ if (SLIST_EMPTY(&head)) {
+ printf("No eaps Configuration!\n");
+ }
+
/* Display EAPS information*/
- SLIST_FOREACH(eaps, &eaps_head, eaps_entries) {
- printf("\t%s\n", eaps->eaps_name);
+ SLIST_FOREACH(eaps, &head, eaps_entries) {
+ printf("\t%s:\n", eaps->eaps_name);
}
exit(error);
More information about the svn-soc-all
mailing list