Avoid conflict with reserved identifier "log".

This commit is contained in:
thorpej 2002-12-06 03:50:35 +00:00
parent b33be07056
commit 2f1985f790
5 changed files with 30 additions and 30 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: fsi_analyze.c,v 1.1.1.5 2002/11/29 22:58:58 christos Exp $ */
/* $NetBSD: fsi_analyze.c,v 1.2 2002/12/06 03:50:35 thorpej Exp $ */
/*
* Copyright (c) 1997-2002 Erez Zadok
@ -131,7 +131,7 @@ compute_hostpath(char *hn)
}
} while (d);
log("hostpath of '%s' is '%s'", hn, path);
logit("hostpath of '%s' is '%s'", hn, path);
strcpy(p, path);
return p;
@ -146,7 +146,7 @@ find_volname(char *nn)
char *q;
do {
log("Searching for volname %s", p);
logit("Searching for volname %s", p);
de = dict_locate(dict_of_volnames, p);
q = strrchr(p, '/');
if (q)
@ -162,7 +162,7 @@ static void
show_required(ioloc *l, int mask, char *info, char *hostname, char *strings[])
{
int i;
log("mask left for %s:%s is %#x", hostname, info, mask);
logit("mask left for %s:%s is %#x", hostname, info, mask);
for (i = 0; strings[i]; i++)
if (ISSET(mask, i))
@ -219,7 +219,7 @@ analyze_dkmount_tree(qelem *q, fsi_mount *parent, disk_fs *dk)
int errors = 0;
ITER(mp, fsi_mount, q) {
log("Mount %s:", mp->m_name);
logit("Mount %s:", mp->m_name);
if (parent) {
char n[MAXPATHLEN];
sprintf(n, "%s/%s", parent->m_name, mp->m_name);
@ -227,7 +227,7 @@ analyze_dkmount_tree(qelem *q, fsi_mount *parent, disk_fs *dk)
lerror(mp->m_ioloc, "sub-directory %s of %s starts with '/'", mp->m_name, parent->m_name);
else if (STREQ(mp->m_name, "default"))
lwarning(mp->m_ioloc, "sub-directory of %s is named \"default\"", parent->m_name);
log("Changing name %s to %s", mp->m_name, n);
logit("Changing name %s to %s", mp->m_name, n);
XFREE(mp->m_name);
mp->m_name = strdup(n);
}
@ -288,7 +288,7 @@ analyze_dkmounts(disk_fs *dk, qelem *q)
compute_automount_point(nbuf, dk->d_host, mp2->m_volname);
XFREE(mp2->m_name);
mp2->m_name = strdup(nbuf);
log("%s:%s has default mount on %s", dk->d_host->h_hostname, dk->d_dev, mp2->m_name);
logit("%s:%s has default mount on %s", dk->d_host->h_hostname, dk->d_dev, mp2->m_name);
} else {
lerror(dk->d_ioloc, "no volname given for %s:%s", dk->d_host->h_hostname, dk->d_dev);
errors++;
@ -423,24 +423,24 @@ fixup_required_mount_info(fsmount *fp, dict_ent *de)
abort();
fp->f_ref = mp;
set_fsmount(fp, FM_FROM, mp->m_dk->d_host->h_hostname);
log("set: %s comes from %s", fp->f_volname, fp->f_from);
logit("set: %s comes from %s", fp->f_volname, fp->f_from);
}
}
if (!ISSET(fp->f_mask, FM_FSTYPE)) {
set_fsmount(fp, FM_FSTYPE, strdup("nfs"));
log("set: fstype is %s", fp->f_fstype);
logit("set: fstype is %s", fp->f_fstype);
}
if (!ISSET(fp->f_mask, FM_OPTS)) {
set_fsmount(fp, FM_OPTS, strdup("rw,nosuid,grpid,defaults"));
log("set: opts are %s", fp->f_opts);
logit("set: opts are %s", fp->f_opts);
}
if (!ISSET(fp->f_mask, FM_LOCALNAME)) {
if (fp->f_ref) {
set_fsmount(fp, FM_LOCALNAME, strdup(fp->f_volname));
log("set: localname is %s", fp->f_localname);
logit("set: localname is %s", fp->f_localname);
} else {
lerror(fp->f_ioloc, "cannot determine localname since volname %s is not uniquely defined", fp->f_volname);
}
@ -462,7 +462,7 @@ analyze_drives(host *hp)
ITER(dp, disk_fs, q) {
int req;
log("Disk %s:", dp->d_dev);
logit("Disk %s:", dp->d_dev);
dp->d_host = hp;
fixup_required_disk_info(dp);
req = ~dp->d_mask & DF_REQUIRED;
@ -499,7 +499,7 @@ analyze_mounts(host *hp)
do {
p = 0;
de = find_volname(nn);
log("Mount: %s (trying %s)", fp->f_volname, nn);
logit("Mount: %s (trying %s)", fp->f_volname, nn);
if (de) {
found = 1;
@ -578,7 +578,7 @@ analyze_hosts(qelem *q)
* Check all drives
*/
ITER(hp, host, q) {
log("disks on host %s", hp->h_hostname);
logit("disks on host %s", hp->h_hostname);
show_new("ana-host");
hp->h_hostpath = compute_hostpath(hp->h_hostname);
@ -593,7 +593,7 @@ analyze_hosts(qelem *q)
* Check static mounts
*/
ITER(hp, host, q) {
log("mounts on host %s", hp->h_hostname);
logit("mounts on host %s", hp->h_hostname);
show_new("ana-mount");
if (hp->h_mount)
analyze_mounts(hp);
@ -635,21 +635,21 @@ analyze_automount_tree(qelem *q, char *pref, int lvl)
sprintf(nname, "%s/%s", pref, ap->a_name);
XFREE(ap->a_name);
ap->a_name = strdup(nname[1] == '/' ? nname + 1 : nname);
log("automount point %s:", ap->a_name);
logit("automount point %s:", ap->a_name);
show_new("ana-automount");
if (ap->a_mount) {
analyze_automount_tree(ap->a_mount, ap->a_name, lvl + 1);
} else if (ap->a_hardwiredfs) {
log("\thardwired from %s to %s", ap->a_volname, ap->a_hardwiredfs);
logit("\thardwired from %s to %s", ap->a_volname, ap->a_hardwiredfs);
} else if (ap->a_volname) {
log("\tautomount from %s", ap->a_volname);
logit("\tautomount from %s", ap->a_volname);
analyze_automount(ap);
} else if (ap->a_symlink) {
log("\tsymlink to %s", ap->a_symlink);
logit("\tsymlink to %s", ap->a_symlink);
} else {
ap->a_volname = strdup(ap->a_name);
log("\timplicit automount from %s", ap->a_volname);
logit("\timplicit automount from %s", ap->a_volname);
analyze_automount(ap);
}
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: fsi_util.c,v 1.5 2002/11/29 23:06:24 christos Exp $ */
/* $NetBSD: fsi_util.c,v 1.6 2002/12/06 03:50:35 thorpej Exp $ */
/*
* Copyright (c) 1997-2002 Erez Zadok
@ -171,7 +171,7 @@ fatal(char *fmt, ...)
* Debug log
*/
void
log(char *fmt, ...)
logit(char *fmt, ...)
{
va_list ap;
@ -278,7 +278,7 @@ pref_open(char *pref, char *hn, void (*hdr) (FILE *, char *), char *arg)
FILE *ef;
sprintf(p, "%s%s", pref, hn);
log("Writing %s info for %s to %s", pref, hn, p);
logit("Writing %s info for %s to %s", pref, hn, p);
ef = fopen(p, "w");
if (ef) {
(*hdr) (ef, arg);

View File

@ -1,4 +1,4 @@
/* $NetBSD: fsinfo.c,v 1.5 2002/11/29 23:06:25 christos Exp $ */
/* $NetBSD: fsinfo.c,v 1.6 2002/12/06 03:50:35 thorpej Exp $ */
/*
* Copyright (c) 1997-2002 Erez Zadok
@ -185,9 +185,9 @@ Usage: %s [-v] [-a autodir] [-h hostname] [-b bootparams] [-d dumpsets]\n\
}
if (g_argv[0])
log("g_argv[0] = %s", g_argv[0]);
logit("g_argv[0] = %s", g_argv[0]);
else
log("g_argv[0] = (nil)");
logit("g_argv[0] = (nil)");
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: fsinfo.h,v 1.4 2002/11/29 23:06:25 christos Exp $ */
/* $NetBSD: fsinfo.h,v 1.5 2002/12/06 03:50:36 thorpej Exp $ */
/*
* Copyright (c) 1997-2002 Erez Zadok
@ -94,7 +94,7 @@ extern void init_que(qelem *);
extern void ins_que(qelem *, qelem *);
extern void lerror(ioloc *l, char *fmt, ...)
__attribute__((__format__(__printf__, 2, 3)));
extern void log(char *fmt, ...)
extern void logit(char *fmt, ...)
__attribute__((__format__(__printf__, 1, 2)));
extern void lwarning(ioloc *l, char *fmt, ...)
__attribute__((__format__(__printf__, 2, 3)));

View File

@ -1,4 +1,4 @@
/* $NetBSD: wr_fstab.c,v 1.1.1.5 2002/11/29 22:58:59 christos Exp $ */
/* $NetBSD: wr_fstab.c,v 1.2 2002/12/06 03:50:36 thorpej Exp $ */
/*
* Copyright (c) 1997-2002 Erez Zadok
@ -327,7 +327,7 @@ write_fstab(qelem *q)
if (hp->h_disk_fs)
errors += write_dkfstab(ef, hp->h_disk_fs, op->op_fstab);
else
log("No local disk mounts on %s", hp->h_hostname);
logit("No local disk mounts on %s", hp->h_hostname);
if (hp->h_mount)
errors += write_dkrmount(ef, hp->h_mount, hp->h_hostname, op->op_mount);