Use macro API to <sys/queue.h>
Submitted by: "Peter Avalos" <pavalos@theshell.com> Reviewed by: /sbin/md5
This commit is contained in:
parent
baba280c68
commit
32ff2662d1
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=70522
@ -141,7 +141,7 @@ main(argc, argv)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 't':
|
case 't':
|
||||||
if (selhead.tqh_first != NULL)
|
if (!TAILQ_EMPTY(&selhead))
|
||||||
errx(1, "only one -t option may be specified.");
|
errx(1, "only one -t option may be specified.");
|
||||||
|
|
||||||
maketypelist(optarg);
|
maketypelist(optarg);
|
||||||
@ -350,7 +350,7 @@ selected(type)
|
|||||||
struct entry *e;
|
struct entry *e;
|
||||||
|
|
||||||
/* If no type specified, it's always selected. */
|
/* If no type specified, it's always selected. */
|
||||||
for (e = selhead.tqh_first; e != NULL; e = e->entries.tqe_next)
|
TAILQ_FOREACH(e, &selhead, entries)
|
||||||
if (!strncmp(e->type, type, MFSNAMELEN))
|
if (!strncmp(e->type, type, MFSNAMELEN))
|
||||||
return which == IN_LIST ? 1 : 0;
|
return which == IN_LIST ? 1 : 0;
|
||||||
|
|
||||||
@ -364,7 +364,7 @@ getoptions(type)
|
|||||||
{
|
{
|
||||||
struct entry *e;
|
struct entry *e;
|
||||||
|
|
||||||
for (e = opthead.tqh_first; e != NULL; e = e->entries.tqe_next)
|
TAILQ_FOREACH(e, &opthead, entries)
|
||||||
if (!strncmp(e->type, type, MFSNAMELEN))
|
if (!strncmp(e->type, type, MFSNAMELEN))
|
||||||
return e->options;
|
return e->options;
|
||||||
return "";
|
return "";
|
||||||
@ -383,7 +383,7 @@ addoption(optstr)
|
|||||||
|
|
||||||
*newoptions++ = '\0';
|
*newoptions++ = '\0';
|
||||||
|
|
||||||
for (e = opthead.tqh_first; e != NULL; e = e->entries.tqe_next)
|
TAILQ_FOREACH(e, &opthead, entries)
|
||||||
if (!strncmp(e->type, optstr, MFSNAMELEN)) {
|
if (!strncmp(e->type, optstr, MFSNAMELEN)) {
|
||||||
catopt(&e->options, newoptions);
|
catopt(&e->options, newoptions);
|
||||||
return;
|
return;
|
||||||
|
@ -230,7 +230,7 @@ checkfstab(flags, maxrun, docheck, checkit)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (sumstatus) {
|
if (sumstatus) {
|
||||||
p = badh.tqh_first;
|
p = TAILQ_FIRST(&badh);
|
||||||
if (p == NULL)
|
if (p == NULL)
|
||||||
return (sumstatus);
|
return (sumstatus);
|
||||||
|
|
||||||
@ -334,7 +334,7 @@ startdisk(d, checkit)
|
|||||||
int (*checkit) __P((const char *, const char *, const char *, void *,
|
int (*checkit) __P((const char *, const char *, const char *, void *,
|
||||||
pid_t *));
|
pid_t *));
|
||||||
{
|
{
|
||||||
struct partentry *p = d->d_part.tqh_first;
|
struct partentry *p = TAILQ_FIRST(&d->d_part);
|
||||||
int rv;
|
int rv;
|
||||||
|
|
||||||
while ((rv = (*checkit)(p->p_type, p->p_devname, p->p_mntpt,
|
while ((rv = (*checkit)(p->p_type, p->p_devname, p->p_mntpt,
|
||||||
|
Loading…
Reference in New Issue
Block a user