CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Fri Aug 28 04:59:18 UTC 2020 Modified Files: src/usr.bin/make: dir.c Log Message: make(1): clean up Dir_AddDir Extract the null check for path to the top level. This has the side-effect of only incrementing dotLast.refCount if that entry is actually used. Reduce the indentation of the code by returning early from the simple branches. To generate a diff of this commit: cvs rdiff -u -r1.119 -r1.120 src/usr.bin/make/dir.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/make/dir.c diff -u src/usr.bin/make/dir.c:1.119 src/usr.bin/make/dir.c:1.120 --- src/usr.bin/make/dir.c:1.119 Fri Aug 28 04:48:57 2020 +++ src/usr.bin/make/dir.c Fri Aug 28 04:59:17 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: dir.c,v 1.119 2020/08/28 04:48:57 rillig Exp $ */ +/* $NetBSD: dir.c,v 1.120 2020/08/28 04:59:17 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: dir.c,v 1.119 2020/08/28 04:48:57 rillig Exp $"; +static char rcsid[] = "$NetBSD: dir.c,v 1.120 2020/08/28 04:59:17 rillig Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)dir.c 8.2 (Berkeley) 1/2/94"; #else -__RCSID("$NetBSD: dir.c,v 1.119 2020/08/28 04:48:57 rillig Exp $"); +__RCSID("$NetBSD: dir.c,v 1.120 2020/08/28 04:59:17 rillig Exp $"); #endif #endif /* not lint */ #endif @@ -1564,57 +1564,54 @@ Dir_AddDir(Lst path, const char *name) DIR *d; /* for reading directory */ struct dirent *dp; /* entry in directory */ -if (strcmp(name, ".DOTLAST") == 0) { - ln = path != NULL ? Lst_Find(path, DirFindName, name) : NULL; +if (path != NULL && strcmp(name, ".DOTLAST") == 0) { + ln = Lst_Find(path, DirFindName, name); if (ln != NULL) return Lst_Datum(ln); - else { - /* XXX: It is wrong to increment the refCount if dotLast is not - * used afterwards. */ - dotLast->refCount += 1; - if (path != NULL) - Lst_Prepend(path, dotLast); - } + + dotLast->refCount++; + Lst_Prepend(path, dotLast); } -if (path) +if (path != NULL) ln = Lst_Find(openDirectories, DirFindName, name); if (ln != NULL) { p = Lst_Datum(ln); - if (path && Lst_Member(path, p) == NULL) { + if (Lst_Member(path, p) == NULL) { p->refCount += 1; Lst_Append(path, p); } -} else { - DIR_DEBUG1("Caching %s ...", name); + return p; +} + +DIR_DEBUG1("Caching %s ...", name); - if ((d = opendir(name)) != NULL) { - p = bmake_malloc(sizeof(Path)); - p->name = bmake_strdup(name); - p->hits = 0; - p->refCount = 1; - Hash_InitTable(>files, -1); +if ((d = opendir(name)) != NULL) { + p = bmake_malloc(sizeof(Path)); + p->name = bmake_strdup(name); + p->hits = 0; + p->refCount = 1; + Hash_InitTable(>files, -1); - while ((dp = readdir(d)) != NULL) { + while ((dp = readdir(d)) != NULL) { #if defined(sun) && defined(d_ino) /* d_ino is a sunos4 #define for d_fileno */ - /* - * The sun directory library doesn't check for a 0 inode - * (0-inode slots just take up space), so we have to do - * it ourselves. - */ - if (dp->d_fileno == 0) { - continue; - } -#endif /* sun && d_ino */ - (void)Hash_CreateEntry(>files, dp->d_name, NULL); + /* + * The sun directory library doesn't check for a 0 inode + * (0-inode slots just take up space), so we have to do + * it ourselves. + */ + if (dp->d_fileno == 0) { + continue; } - (void)closedir(d); - Lst_Append(openDirectories, p); - if (path != NULL) - Lst_Append(path, p); +#endif /* sun && d_ino */ + (void)Hash_CreateEntry(>files, dp->d_name, NULL); } - DIR_DEBUG0("done\n"); + (void)closedir(d); + Lst_Append(openDirectories, p); + if (path != NULL) + Lst_Append(path, p); } +DIR_DEBUG0("done\n"); return p; }
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Fri Aug 28 04:59:18 UTC 2020 Modified Files: src/usr.bin/make: dir.c Log Message: make(1): clean up Dir_AddDir Extract the null check for path to the top level. This has the side-effect of only incrementing dotLast.refCount if that entry is actually used. Reduce the indentation of the code by returning early from the simple branches. To generate a diff of this commit: cvs rdiff -u -r1.119 -r1.120 src/usr.bin/make/dir.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Fri Aug 28 04:48:57 UTC 2020 Modified Files: src/usr.bin/make: arch.c compat.c cond.c dir.c job.c lst.c lst.h main.c make.c meta.c parse.c suff.c targ.c Log Message: make(1): remove trailing 'S' from names of Lst functions The migration from null-passing Lst functions to argument-checking Lst functions is completed. There were 2 surprises: The targets list may be NULL, and in Dir_AddDir, the path may be NULL. The latter case is especially surprising since that function turns into an almost-nop in that case. This is another case where probably 2 independent functions have been squeezed into a single function. This may be improved in a follow-up commit. All other lists were fine. They were always defined and thus didn't need much work. To generate a diff of this commit: cvs rdiff -u -r1.100 -r1.101 src/usr.bin/make/arch.c cvs rdiff -u -r1.131 -r1.132 src/usr.bin/make/compat.c cvs rdiff -u -r1.102 -r1.103 src/usr.bin/make/cond.c cvs rdiff -u -r1.118 -r1.119 src/usr.bin/make/dir.c cvs rdiff -u -r1.219 -r1.220 src/usr.bin/make/job.c cvs rdiff -u -r1.49 -r1.50 src/usr.bin/make/lst.c cvs rdiff -u -r1.52 -r1.53 src/usr.bin/make/lst.h cvs rdiff -u -r1.319 -r1.320 src/usr.bin/make/main.c cvs rdiff -u -r1.128 -r1.129 src/usr.bin/make/make.c cvs rdiff -u -r1.105 -r1.106 src/usr.bin/make/meta.c cvs rdiff -u -r1.267 -r1.268 src/usr.bin/make/parse.c cvs rdiff -u -r1.124 -r1.125 src/usr.bin/make/suff.c cvs rdiff -u -r1.75 -r1.76 src/usr.bin/make/targ.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/make/arch.c diff -u src/usr.bin/make/arch.c:1.100 src/usr.bin/make/arch.c:1.101 --- src/usr.bin/make/arch.c:1.100 Fri Aug 28 04:28:45 2020 +++ src/usr.bin/make/arch.c Fri Aug 28 04:48:56 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: arch.c,v 1.100 2020/08/28 04:28:45 rillig Exp $ */ +/* $NetBSD: arch.c,v 1.101 2020/08/28 04:48:56 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,14 +69,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: arch.c,v 1.100 2020/08/28 04:28:45 rillig Exp $"; +static char rcsid[] = "$NetBSD: arch.c,v 1.101 2020/08/28 04:48:56 rillig Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)arch.c 8.2 (Berkeley) 1/2/94"; #else -__RCSID("$NetBSD: arch.c,v 1.100 2020/08/28 04:28:45 rillig Exp $"); +__RCSID("$NetBSD: arch.c,v 1.101 2020/08/28 04:48:56 rillig Exp $"); #endif #endif /* not lint */ #endif @@ -376,7 +376,7 @@ Arch_ParseArchive(char **linePtr, Lst no return FALSE; } else { gn->type |= OP_ARCHV; - Lst_AppendS(nodeLst, gn); + Lst_Append(nodeLst, gn); } } else if (!Arch_ParseArchive(, nodeLst, ctxt)) { /* @@ -396,8 +396,8 @@ Arch_ParseArchive(char **linePtr, Lst no Buf_Init(, 0); Dir_Expand(memName, dirSearchPath, members); - while (!Lst_IsEmptyS(members)) { - char *member = Lst_DequeueS(members); + while (!Lst_IsEmpty(members)) { + char *member = Lst_Dequeue(members); Buf_Empty(); Buf_AddStr(, libName); @@ -419,10 +419,10 @@ Arch_ParseArchive(char **linePtr, Lst no * end of the provided list. */ gn->type |= OP_ARCHV; - Lst_AppendS(nodeLst, gn); + Lst_Append(nodeLst, gn); } } - Lst_FreeS(members); + Lst_Free(members); Buf_Destroy(, TRUE); } else { Buffer nameBuf; @@ -446,7 +446,7 @@ Arch_ParseArchive(char **linePtr, Lst no * provided list. */ gn->type |= OP_ARCHV; - Lst_AppendS(nodeLst, gn); + Lst_Append(nodeLst, gn); } } if (doSubst) { @@ -548,9 +548,9 @@ ArchStatMember(const char *archive, cons member = base + 1; } -ln = Lst_FindS(archives, ArchFindArchive, archive); +ln = Lst_Find(archives, ArchFindArchive, archive); if (ln != NULL) { - ar = Lst_DatumS(ln); + ar = Lst_Datum(ln); he = Hash_FindEntry(>members, member); @@ -699,7 +699,7 @@ ArchStatMember(const char *archive, cons fclose(arch); -Lst_AppendS(archives, ar); +Lst_Append(archives, ar); /* * Now that the archive has been read and cached, we can look into @@ -1127,9 +1127,9 @@ Arch_MemMTime(GNode *gn) LstNode ln; GNode *pgn; -Lst_OpenS(gn->parents); -while ((ln = Lst_NextS(gn->parents)) != NULL) { - pgn = Lst_DatumS(ln); +Lst_Open(gn->parents); +while ((ln = Lst_Next(gn->parents)) != NULL) { + pgn = Lst_Datum(ln); if (pgn->type & OP_ARCHV) { /* @@ -1157,7 +1157,7 @@ Arch_MemMTime(GNode *gn) } } -Lst_CloseS(gn->parents); +Lst_Close(gn->parents); return gn->mtime; } @@ -1252,9 +1252,9 @@ Arch_LibOODate(GNode *gn) if (gn->type & OP_PHONY) { oodate = TRUE; -} else if (OP_NOP(gn->type) && Lst_IsEmptyS(gn->children)) { +} else if (OP_NOP(gn->type) && Lst_IsEmpty(gn->children)) { oodate = FALSE; -} else if
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Fri Aug 28 04:48:57 UTC 2020 Modified Files: src/usr.bin/make: arch.c compat.c cond.c dir.c job.c lst.c lst.h main.c make.c meta.c parse.c suff.c targ.c Log Message: make(1): remove trailing 'S' from names of Lst functions The migration from null-passing Lst functions to argument-checking Lst functions is completed. There were 2 surprises: The targets list may be NULL, and in Dir_AddDir, the path may be NULL. The latter case is especially surprising since that function turns into an almost-nop in that case. This is another case where probably 2 independent functions have been squeezed into a single function. This may be improved in a follow-up commit. All other lists were fine. They were always defined and thus didn't need much work. To generate a diff of this commit: cvs rdiff -u -r1.100 -r1.101 src/usr.bin/make/arch.c cvs rdiff -u -r1.131 -r1.132 src/usr.bin/make/compat.c cvs rdiff -u -r1.102 -r1.103 src/usr.bin/make/cond.c cvs rdiff -u -r1.118 -r1.119 src/usr.bin/make/dir.c cvs rdiff -u -r1.219 -r1.220 src/usr.bin/make/job.c cvs rdiff -u -r1.49 -r1.50 src/usr.bin/make/lst.c cvs rdiff -u -r1.52 -r1.53 src/usr.bin/make/lst.h cvs rdiff -u -r1.319 -r1.320 src/usr.bin/make/main.c cvs rdiff -u -r1.128 -r1.129 src/usr.bin/make/make.c cvs rdiff -u -r1.105 -r1.106 src/usr.bin/make/meta.c cvs rdiff -u -r1.267 -r1.268 src/usr.bin/make/parse.c cvs rdiff -u -r1.124 -r1.125 src/usr.bin/make/suff.c cvs rdiff -u -r1.75 -r1.76 src/usr.bin/make/targ.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Fri Aug 28 04:28:45 UTC 2020 Modified Files: src/usr.bin/make: arch.c cond.c dir.c lst.c lst.h main.c meta.c suff.c Log Message: make(1): migrate Lst_Find to Lst_FindS To generate a diff of this commit: cvs rdiff -u -r1.99 -r1.100 src/usr.bin/make/arch.c cvs rdiff -u -r1.101 -r1.102 src/usr.bin/make/cond.c cvs rdiff -u -r1.117 -r1.118 src/usr.bin/make/dir.c cvs rdiff -u -r1.48 -r1.49 src/usr.bin/make/lst.c cvs rdiff -u -r1.51 -r1.52 src/usr.bin/make/lst.h cvs rdiff -u -r1.318 -r1.319 src/usr.bin/make/main.c cvs rdiff -u -r1.104 -r1.105 src/usr.bin/make/meta.c cvs rdiff -u -r1.123 -r1.124 src/usr.bin/make/suff.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Fri Aug 28 04:28:45 UTC 2020 Modified Files: src/usr.bin/make: arch.c cond.c dir.c lst.c lst.h main.c meta.c suff.c Log Message: make(1): migrate Lst_Find to Lst_FindS To generate a diff of this commit: cvs rdiff -u -r1.99 -r1.100 src/usr.bin/make/arch.c cvs rdiff -u -r1.101 -r1.102 src/usr.bin/make/cond.c cvs rdiff -u -r1.117 -r1.118 src/usr.bin/make/dir.c cvs rdiff -u -r1.48 -r1.49 src/usr.bin/make/lst.c cvs rdiff -u -r1.51 -r1.52 src/usr.bin/make/lst.h cvs rdiff -u -r1.318 -r1.319 src/usr.bin/make/main.c cvs rdiff -u -r1.104 -r1.105 src/usr.bin/make/meta.c cvs rdiff -u -r1.123 -r1.124 src/usr.bin/make/suff.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/make/arch.c diff -u src/usr.bin/make/arch.c:1.99 src/usr.bin/make/arch.c:1.100 --- src/usr.bin/make/arch.c:1.99 Thu Aug 27 19:15:35 2020 +++ src/usr.bin/make/arch.c Fri Aug 28 04:28:45 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: arch.c,v 1.99 2020/08/27 19:15:35 rillig Exp $ */ +/* $NetBSD: arch.c,v 1.100 2020/08/28 04:28:45 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,14 +69,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: arch.c,v 1.99 2020/08/27 19:15:35 rillig Exp $"; +static char rcsid[] = "$NetBSD: arch.c,v 1.100 2020/08/28 04:28:45 rillig Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)arch.c 8.2 (Berkeley) 1/2/94"; #else -__RCSID("$NetBSD: arch.c,v 1.99 2020/08/27 19:15:35 rillig Exp $"); +__RCSID("$NetBSD: arch.c,v 1.100 2020/08/28 04:28:45 rillig Exp $"); #endif #endif /* not lint */ #endif @@ -548,7 +548,7 @@ ArchStatMember(const char *archive, cons member = base + 1; } -ln = Lst_Find(archives, ArchFindArchive, archive); +ln = Lst_FindS(archives, ArchFindArchive, archive); if (ln != NULL) { ar = Lst_DatumS(ln); Index: src/usr.bin/make/cond.c diff -u src/usr.bin/make/cond.c:1.101 src/usr.bin/make/cond.c:1.102 --- src/usr.bin/make/cond.c:1.101 Thu Aug 27 19:15:35 2020 +++ src/usr.bin/make/cond.c Fri Aug 28 04:28:45 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: cond.c,v 1.101 2020/08/27 19:15:35 rillig Exp $ */ +/* $NetBSD: cond.c,v 1.102 2020/08/28 04:28:45 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: cond.c,v 1.101 2020/08/27 19:15:35 rillig Exp $"; +static char rcsid[] = "$NetBSD: cond.c,v 1.102 2020/08/28 04:28:45 rillig Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)cond.c 8.2 (Berkeley) 1/2/94"; #else -__RCSID("$NetBSD: cond.c,v 1.101 2020/08/27 19:15:35 rillig Exp $"); +__RCSID("$NetBSD: cond.c,v 1.102 2020/08/28 04:28:45 rillig Exp $"); #endif #endif /* not lint */ #endif @@ -284,7 +284,7 @@ CondFindStrMatch(const void *string, con static Boolean CondDoMake(int argLen MAKE_ATTR_UNUSED, const char *arg) { -return Lst_Find(create, CondFindStrMatch, arg) != NULL; +return Lst_FindS(create, CondFindStrMatch, arg) != NULL; } /* See if the given file exists. */ Index: src/usr.bin/make/dir.c diff -u src/usr.bin/make/dir.c:1.117 src/usr.bin/make/dir.c:1.118 --- src/usr.bin/make/dir.c:1.117 Fri Aug 28 04:16:57 2020 +++ src/usr.bin/make/dir.c Fri Aug 28 04:28:45 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: dir.c,v 1.117 2020/08/28 04:16:57 rillig Exp $ */ +/* $NetBSD: dir.c,v 1.118 2020/08/28 04:28:45 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: dir.c,v 1.117 2020/08/28 04:16:57 rillig Exp $"; +static char rcsid[] = "$NetBSD: dir.c,v 1.118 2020/08/28 04:28:45 rillig Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)dir.c 8.2 (Berkeley) 1/2/94"; #else -__RCSID("$NetBSD: dir.c,v 1.117 2020/08/28 04:16:57 rillig Exp $"); +__RCSID("$NetBSD: dir.c,v 1.118 2020/08/28 04:28:45 rillig Exp $"); #endif #endif /* not lint */ #endif @@ -1544,6 +1544,8 @@ Dir_MTime(GNode *gn, Boolean recheck) * Input: * path the path to which the directory should be * added + * XXX: Why would this ever be NULL, and what does + * that mean? * name the name of the directory to add * * Results: @@ -1563,7 +1565,7 @@ Dir_AddDir(Lst path, const char *name) struct dirent *dp; /* entry in directory */ if (strcmp(name, ".DOTLAST") == 0) { - ln = Lst_Find(path, DirFindName, name); + ln = path != NULL ? Lst_FindS(path, DirFindName, name) : NULL; if (ln != NULL) return Lst_DatumS(ln); else { @@ -1576,7 +1578,7 @@ Dir_AddDir(Lst path, const char *name) } if (path) - ln = Lst_Find(openDirectories, DirFindName, name); + ln = Lst_FindS(openDirectories, DirFindName, name); if (ln != NULL) { p = Lst_DatumS(ln); if (path && Lst_MemberS(path, p)
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Fri Aug 28 04:16:58 UTC 2020 Modified Files: src/usr.bin/make: dir.c lst.h Log Message: make(1): remove unused reference to Lst_Last To generate a diff of this commit: cvs rdiff -u -r1.116 -r1.117 src/usr.bin/make/dir.c cvs rdiff -u -r1.50 -r1.51 src/usr.bin/make/lst.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Fri Aug 28 04:16:58 UTC 2020 Modified Files: src/usr.bin/make: dir.c lst.h Log Message: make(1): remove unused reference to Lst_Last To generate a diff of this commit: cvs rdiff -u -r1.116 -r1.117 src/usr.bin/make/dir.c cvs rdiff -u -r1.50 -r1.51 src/usr.bin/make/lst.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/make/dir.c diff -u src/usr.bin/make/dir.c:1.116 src/usr.bin/make/dir.c:1.117 --- src/usr.bin/make/dir.c:1.116 Fri Aug 28 04:14:31 2020 +++ src/usr.bin/make/dir.c Fri Aug 28 04:16:57 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: dir.c,v 1.116 2020/08/28 04:14:31 rillig Exp $ */ +/* $NetBSD: dir.c,v 1.117 2020/08/28 04:16:57 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: dir.c,v 1.116 2020/08/28 04:14:31 rillig Exp $"; +static char rcsid[] = "$NetBSD: dir.c,v 1.117 2020/08/28 04:16:57 rillig Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)dir.c 8.2 (Berkeley) 1/2/94"; #else -__RCSID("$NetBSD: dir.c,v 1.116 2020/08/28 04:14:31 rillig Exp $"); +__RCSID("$NetBSD: dir.c,v 1.117 2020/08/28 04:16:57 rillig Exp $"); #endif #endif /* not lint */ #endif @@ -1339,7 +1339,7 @@ Dir_FindFile(const char *name, Lst path) cp[-1] = '/'; bigmisses += 1; -ln = Lst_Last(path); +ln = Lst_LastS(path); if (ln == NULL) { return NULL; } else { Index: src/usr.bin/make/lst.h diff -u src/usr.bin/make/lst.h:1.50 src/usr.bin/make/lst.h:1.51 --- src/usr.bin/make/lst.h:1.50 Fri Aug 28 04:14:31 2020 +++ src/usr.bin/make/lst.h Fri Aug 28 04:16:57 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: lst.h,v 1.50 2020/08/28 04:14:31 rillig Exp $ */ +/* $NetBSD: lst.h,v 1.51 2020/08/28 04:16:57 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -133,7 +133,6 @@ void Lst_MoveAllS(Lst, Lst); /* Return first element in list */ LstNode Lst_FirstS(Lst); /* Return last element in list */ -LstNode Lst_Last(Lst); LstNode Lst_LastS(Lst); /* Return successor to given element */ LstNode Lst_SuccS(LstNode);
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Fri Aug 28 04:14:31 UTC 2020 Modified Files: src/usr.bin/make: dir.c lst.c lst.h main.c make.c meta.c suff.c Log Message: make(1): migrate Lst_First to Lst_FirstS To generate a diff of this commit: cvs rdiff -u -r1.115 -r1.116 src/usr.bin/make/dir.c cvs rdiff -u -r1.47 -r1.48 src/usr.bin/make/lst.c cvs rdiff -u -r1.49 -r1.50 src/usr.bin/make/lst.h cvs rdiff -u -r1.317 -r1.318 src/usr.bin/make/main.c cvs rdiff -u -r1.127 -r1.128 src/usr.bin/make/make.c cvs rdiff -u -r1.103 -r1.104 src/usr.bin/make/meta.c cvs rdiff -u -r1.122 -r1.123 src/usr.bin/make/suff.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/make/dir.c diff -u src/usr.bin/make/dir.c:1.115 src/usr.bin/make/dir.c:1.116 --- src/usr.bin/make/dir.c:1.115 Thu Aug 27 19:15:35 2020 +++ src/usr.bin/make/dir.c Fri Aug 28 04:14:31 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: dir.c,v 1.115 2020/08/27 19:15:35 rillig Exp $ */ +/* $NetBSD: dir.c,v 1.116 2020/08/28 04:14:31 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: dir.c,v 1.115 2020/08/27 19:15:35 rillig Exp $"; +static char rcsid[] = "$NetBSD: dir.c,v 1.116 2020/08/28 04:14:31 rillig Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)dir.c 8.2 (Berkeley) 1/2/94"; #else -__RCSID("$NetBSD: dir.c,v 1.115 2020/08/27 19:15:35 rillig Exp $"); +__RCSID("$NetBSD: dir.c,v 1.116 2020/08/28 04:14:31 rillig Exp $"); #endif #endif /* not lint */ #endif @@ -483,7 +483,7 @@ Dir_SetPATH(void) Var_Delete(".PATH", VAR_GLOBAL); Lst_OpenS(dirSearchPath); -if ((ln = Lst_First(dirSearchPath)) != NULL) { +if ((ln = Lst_FirstS(dirSearchPath)) != NULL) { p = Lst_DatumS(ln); if (p == dotLast) { hasLastDot = TRUE; @@ -1137,7 +1137,7 @@ Dir_FindFile(const char *name, Lst path) } Lst_OpenS(path); -if ((ln = Lst_First(path)) != NULL) { +if ((ln = Lst_FirstS(path)) != NULL) { p = Lst_DatumS(ln); if (p == dotLast) { hasLastDot = TRUE; @@ -1764,7 +1764,7 @@ Dir_Concat(Lst path1, Lst path2) LstNode ln; Path *p; -for (ln = Lst_First(path2); ln != NULL; ln = Lst_SuccS(ln)) { +for (ln = Lst_FirstS(path2); ln != NULL; ln = Lst_SuccS(ln)) { p = Lst_DatumS(ln); if (Lst_MemberS(path1, p) == NULL) { p->refCount += 1; Index: src/usr.bin/make/lst.c diff -u src/usr.bin/make/lst.c:1.47 src/usr.bin/make/lst.c:1.48 --- src/usr.bin/make/lst.c:1.47 Thu Aug 27 19:15:35 2020 +++ src/usr.bin/make/lst.c Fri Aug 28 04:14:31 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: lst.c,v 1.47 2020/08/27 19:15:35 rillig Exp $ */ +/* $NetBSD: lst.c,v 1.48 2020/08/28 04:14:31 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -37,11 +37,11 @@ #include "make.h" #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: lst.c,v 1.47 2020/08/27 19:15:35 rillig Exp $"; +static char rcsid[] = "$NetBSD: lst.c,v 1.48 2020/08/28 04:14:31 rillig Exp $"; #else #include #ifndef lint -__RCSID("$NetBSD: lst.c,v 1.47 2020/08/27 19:15:35 rillig Exp $"); +__RCSID("$NetBSD: lst.c,v 1.48 2020/08/28 04:14:31 rillig Exp $"); #endif /* not lint */ #endif @@ -332,7 +332,7 @@ LstNode_SetNullS(LstNode node) /* Return the first node from the given list, or NULL if the list is empty or * invalid. */ -LstNode +static LstNode Lst_First(Lst list) { if (!LstIsValid(list) || LstIsEmpty(list)) { @@ -476,7 +476,7 @@ Lst_ForEachS(Lst list, LstActionProc pro { if (LstIsEmpty(list)) return 0; /* XXX: Document what this value means. */ -return Lst_ForEachFromS(list, Lst_First(list), proc, procData); +return Lst_ForEachFromS(list, Lst_FirstS(list), proc, procData); } /* Apply the given function to each element of the given list, starting from Index: src/usr.bin/make/lst.h diff -u src/usr.bin/make/lst.h:1.49 src/usr.bin/make/lst.h:1.50 --- src/usr.bin/make/lst.h:1.49 Thu Aug 27 19:15:35 2020 +++ src/usr.bin/make/lst.h Fri Aug 28 04:14:31 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: lst.h,v 1.49 2020/08/27 19:15:35 rillig Exp $ */ +/* $NetBSD: lst.h,v 1.50 2020/08/28 04:14:31 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -131,7 +131,6 @@ void Lst_MoveAllS(Lst, Lst); * Node-specific functions */ /* Return first element in list */ -LstNode Lst_First(Lst); LstNode Lst_FirstS(Lst); /* Return last element in list */ LstNode Lst_Last(Lst); Index: src/usr.bin/make/main.c diff -u src/usr.bin/make/main.c:1.317 src/usr.bin/make/main.c:1.318 --- src/usr.bin/make/main.c:1.317 Thu Aug 27 19:15:35 2020 +++ src/usr.bin/make/main.c Fri Aug 28 04:14:31 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.317 2020/08/27 19:15:35 rillig Exp $ */ +/* $NetBSD: main.c,v 1.318 2020/08/28 04:14:31 rillig Exp $ */ /* *
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Fri Aug 28 04:14:31 UTC 2020 Modified Files: src/usr.bin/make: dir.c lst.c lst.h main.c make.c meta.c suff.c Log Message: make(1): migrate Lst_First to Lst_FirstS To generate a diff of this commit: cvs rdiff -u -r1.115 -r1.116 src/usr.bin/make/dir.c cvs rdiff -u -r1.47 -r1.48 src/usr.bin/make/lst.c cvs rdiff -u -r1.49 -r1.50 src/usr.bin/make/lst.h cvs rdiff -u -r1.317 -r1.318 src/usr.bin/make/main.c cvs rdiff -u -r1.127 -r1.128 src/usr.bin/make/make.c cvs rdiff -u -r1.103 -r1.104 src/usr.bin/make/meta.c cvs rdiff -u -r1.122 -r1.123 src/usr.bin/make/suff.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/make/unit-tests
Module Name:src Committed By: rillig Date: Fri Aug 28 04:07:14 UTC 2020 Modified Files: src/usr.bin/make/unit-tests: deptgt-suffixes.exp Log Message: make(1): add test for the undocumented .NULL special dependency target To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/usr.bin/make/unit-tests/deptgt-suffixes.exp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/make/unit-tests
Module Name:src Committed By: rillig Date: Fri Aug 28 04:07:14 UTC 2020 Modified Files: src/usr.bin/make/unit-tests: deptgt-suffixes.exp Log Message: make(1): add test for the undocumented .NULL special dependency target To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/usr.bin/make/unit-tests/deptgt-suffixes.exp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/make/unit-tests/deptgt-suffixes.exp diff -u src/usr.bin/make/unit-tests/deptgt-suffixes.exp:1.1 src/usr.bin/make/unit-tests/deptgt-suffixes.exp:1.2 --- src/usr.bin/make/unit-tests/deptgt-suffixes.exp:1.1 Sun Aug 16 12:07:51 2020 +++ src/usr.bin/make/unit-tests/deptgt-suffixes.exp Fri Aug 28 04:07:14 2020 @@ -1 +1,7 @@ +#*** Suffixes: +# `.custom-null' [1] (SUFF_NULL) +# To: +# From: +# Search Path: . .. +#*** Transformations: exit status 0
CVS commit: src/usr.bin/make/unit-tests
Module Name:src Committed By: rillig Date: Fri Aug 28 04:05:35 UTC 2020 Modified Files: src/usr.bin/make/unit-tests: Makefile deptgt-suffixes.mk Log Message: make(1): add test for the undocumented .NULL special dependency target To generate a diff of this commit: cvs rdiff -u -r1.122 -r1.123 src/usr.bin/make/unit-tests/Makefile cvs rdiff -u -r1.2 -r1.3 src/usr.bin/make/unit-tests/deptgt-suffixes.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/make/unit-tests
Module Name:src Committed By: rillig Date: Fri Aug 28 04:05:35 UTC 2020 Modified Files: src/usr.bin/make/unit-tests: Makefile deptgt-suffixes.mk Log Message: make(1): add test for the undocumented .NULL special dependency target To generate a diff of this commit: cvs rdiff -u -r1.122 -r1.123 src/usr.bin/make/unit-tests/Makefile cvs rdiff -u -r1.2 -r1.3 src/usr.bin/make/unit-tests/deptgt-suffixes.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/make/unit-tests/Makefile diff -u src/usr.bin/make/unit-tests/Makefile:1.122 src/usr.bin/make/unit-tests/Makefile:1.123 --- src/usr.bin/make/unit-tests/Makefile:1.122 Fri Aug 28 03:51:06 2020 +++ src/usr.bin/make/unit-tests/Makefile Fri Aug 28 04:05:35 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.122 2020/08/28 03:51:06 rillig Exp $ +# $NetBSD: Makefile,v 1.123 2020/08/28 04:05:35 rillig Exp $ # # Unit tests for make(1) # @@ -322,6 +322,8 @@ ENV.varmisc+= FROM_ENV_BEFORE=env ENV.varmisc+= FROM_ENV_AFTER=env # Override make flags for some of the tests; default is -k. +# If possible, write ".MAKEFLAGS: -dv" in the test .mk file instead of +# settings FLAGS.test=-dv here, since that is closer to the test code. FLAGS.archive= -dA FLAGS.counter= -dv FLAGS.doterror= # none @@ -360,6 +362,8 @@ SED_CMDS.varname-dot-shell+= -e 's,\[/[^ # Some tests need an additional round of postprocessing. POSTPROC.counter= ${TOOL_SED} -n -e '/:RELEVANT = yes/,/:RELEVANT = no/p' +POSTPROC.deptgt-suffixes= \ + ${TOOL_SED} -n -e '/^\#\*\*\* Suffixes/,/^\#\*/p' POSTPROC.vardebug= ${TOOL_SED} -n -e '/:RELEVANT = yes/,/:RELEVANT = no/p' POSTPROC.varmod-match-escape= ${TOOL_SED} -n -e '/^Pattern/p' POSTPROC.varname-dot-shell= \ Index: src/usr.bin/make/unit-tests/deptgt-suffixes.mk diff -u src/usr.bin/make/unit-tests/deptgt-suffixes.mk:1.2 src/usr.bin/make/unit-tests/deptgt-suffixes.mk:1.3 --- src/usr.bin/make/unit-tests/deptgt-suffixes.mk:1.2 Sun Aug 16 14:25:16 2020 +++ src/usr.bin/make/unit-tests/deptgt-suffixes.mk Fri Aug 28 04:05:35 2020 @@ -1,8 +1,18 @@ -# $NetBSD: deptgt-suffixes.mk,v 1.2 2020/08/16 14:25:16 rillig Exp $ +# $NetBSD: deptgt-suffixes.mk,v 1.3 2020/08/28 04:05:35 rillig Exp $ # # Tests for the special target .SUFFIXES in dependency declarations. +# +# See also: +# varname-dot-includes.mk +# varname-dot-libs.mk + +.MAKEFLAGS: -dg1 + +.SUFFIXES: .custom-null -# TODO: Implementation +# TODO: What is the effect of this? How is it useful? +.NULL: .custom-null +.PATH.custom-null: . .. all: @:;
CVS commit: src
Module Name:src Committed By: rillig Date: Fri Aug 28 03:51:06 UTC 2020 Modified Files: src/distrib/sets/lists/tests: mi src/usr.bin/make/unit-tests: Makefile Added Files: src/usr.bin/make/unit-tests: varname-dot-includes.exp varname-dot-includes.mk varname-dot-libs.exp varname-dot-libs.mk Log Message: make(1): add tests for the special .INCLUDES and .LIBS variables To generate a diff of this commit: cvs rdiff -u -r1.910 -r1.911 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.121 -r1.122 src/usr.bin/make/unit-tests/Makefile cvs rdiff -u -r0 -r1.1 src/usr.bin/make/unit-tests/varname-dot-includes.exp \ src/usr.bin/make/unit-tests/varname-dot-includes.mk \ src/usr.bin/make/unit-tests/varname-dot-libs.exp \ src/usr.bin/make/unit-tests/varname-dot-libs.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/tests/mi diff -u src/distrib/sets/lists/tests/mi:1.910 src/distrib/sets/lists/tests/mi:1.911 --- src/distrib/sets/lists/tests/mi:1.910 Thu Aug 27 19:00:17 2020 +++ src/distrib/sets/lists/tests/mi Fri Aug 28 03:51:06 2020 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.910 2020/08/27 19:00:17 rillig Exp $ +# $NetBSD: mi,v 1.911 2020/08/28 03:51:06 rillig Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -5014,10 +5014,14 @@ ./usr/tests/usr.bin/make/unit-tests/varname-dot-alltargets.mk tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/make/unit-tests/varname-dot-curdir.exp tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/make/unit-tests/varname-dot-curdir.mk tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/make/unit-tests/varname-dot-includes.exp tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/make/unit-tests/varname-dot-includes.mk tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/make/unit-tests/varname-dot-includedfromdir.exp tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/make/unit-tests/varname-dot-includedfromdir.mk tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/make/unit-tests/varname-dot-includedfromfile.exp tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/make/unit-tests/varname-dot-includedfromfile.mk tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/make/unit-tests/varname-dot-libs.exp tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/make/unit-tests/varname-dot-libs.mk tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/make/unit-tests/varname-dot-make-dependfile.exp tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/make/unit-tests/varname-dot-make-dependfile.mk tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/make/unit-tests/varname-dot-make-expand_variables.exp tests-usr.bin-tests compattestfile,atf Index: src/usr.bin/make/unit-tests/Makefile diff -u src/usr.bin/make/unit-tests/Makefile:1.121 src/usr.bin/make/unit-tests/Makefile:1.122 --- src/usr.bin/make/unit-tests/Makefile:1.121 Fri Aug 28 02:45:51 2020 +++ src/usr.bin/make/unit-tests/Makefile Fri Aug 28 03:51:06 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.121 2020/08/28 02:45:51 rillig Exp $ +# $NetBSD: Makefile,v 1.122 2020/08/28 03:51:06 rillig Exp $ # # Unit tests for make(1) # @@ -272,8 +272,10 @@ TESTS+= varname TESTS+= varname-dollar TESTS+= varname-dot-alltargets TESTS+= varname-dot-curdir +TESTS+= varname-dot-includes TESTS+= varname-dot-includedfromdir TESTS+= varname-dot-includedfromfile +TESTS+= varname-dot-libs TESTS+= varname-dot-make-dependfile TESTS+= varname-dot-make-expand_variables TESTS+= varname-dot-make-exported Added files: Index: src/usr.bin/make/unit-tests/varname-dot-includes.exp diff -u /dev/null src/usr.bin/make/unit-tests/varname-dot-includes.exp:1.1 --- /dev/null Fri Aug 28 03:51:06 2020 +++ src/usr.bin/make/unit-tests/varname-dot-includes.exp Fri Aug 28 03:51:06 2020 @@ -0,0 +1,2 @@ +.INCLUDES= -I. -I.. +exit status 0 Index: src/usr.bin/make/unit-tests/varname-dot-includes.mk diff -u /dev/null src/usr.bin/make/unit-tests/varname-dot-includes.mk:1.1 --- /dev/null Fri Aug 28 03:51:06 2020 +++ src/usr.bin/make/unit-tests/varname-dot-includes.mk Fri Aug 28 03:51:06 2020 @@ -0,0 +1,20 @@ +# $NetBSD: varname-dot-includes.mk,v 1.1 2020/08/28 03:51:06 rillig Exp $ +# +# Tests for the special .INCLUDES variable, which is not documented in the +# manual page. +# +# It is yet unclear in which situations this feature is useful. + +.SUFFIXES: .h + +.PATH.h: . .. + +.INCLUDES: .h + +# The .INCLUDES variable is not yet available. +.if defined(${.INCLUDES:Q}) +.error +.endif + +all: + @echo .INCLUDES=${.INCLUDES:Q} Index: src/usr.bin/make/unit-tests/varname-dot-libs.exp diff -u /dev/null src/usr.bin/make/unit-tests/varname-dot-libs.exp:1.1 --- /dev/null Fri Aug 28 03:51:06 2020 +++ src/usr.bin/make/unit-tests/varname-dot-libs.exp Fri Aug 28 03:51:06 2020 @@ -0,0
CVS commit: src
Module Name:src Committed By: rillig Date: Fri Aug 28 03:51:06 UTC 2020 Modified Files: src/distrib/sets/lists/tests: mi src/usr.bin/make/unit-tests: Makefile Added Files: src/usr.bin/make/unit-tests: varname-dot-includes.exp varname-dot-includes.mk varname-dot-libs.exp varname-dot-libs.mk Log Message: make(1): add tests for the special .INCLUDES and .LIBS variables To generate a diff of this commit: cvs rdiff -u -r1.910 -r1.911 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.121 -r1.122 src/usr.bin/make/unit-tests/Makefile cvs rdiff -u -r0 -r1.1 src/usr.bin/make/unit-tests/varname-dot-includes.exp \ src/usr.bin/make/unit-tests/varname-dot-includes.mk \ src/usr.bin/make/unit-tests/varname-dot-libs.exp \ src/usr.bin/make/unit-tests/varname-dot-libs.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Fri Aug 28 03:35:45 UTC 2020 Modified Files: src/usr.bin/make: make.h suff.c Log Message: make(1): print suffix flags in the standard way This changes the output (it is now SUFF_NULL instead of just NULL), and the order of the flags in the output is reversed. To generate a diff of this commit: cvs rdiff -u -r1.127 -r1.128 src/usr.bin/make/make.h cvs rdiff -u -r1.121 -r1.122 src/usr.bin/make/suff.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Fri Aug 28 03:35:45 UTC 2020 Modified Files: src/usr.bin/make: make.h suff.c Log Message: make(1): print suffix flags in the standard way This changes the output (it is now SUFF_NULL instead of just NULL), and the order of the flags in the output is reversed. To generate a diff of this commit: cvs rdiff -u -r1.127 -r1.128 src/usr.bin/make/make.h cvs rdiff -u -r1.121 -r1.122 src/usr.bin/make/suff.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/make/make.h diff -u src/usr.bin/make/make.h:1.127 src/usr.bin/make/make.h:1.128 --- src/usr.bin/make/make.h:1.127 Wed Aug 26 23:00:47 2020 +++ src/usr.bin/make/make.h Fri Aug 28 03:35:45 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: make.h,v 1.127 2020/08/26 23:00:47 rillig Exp $ */ +/* $NetBSD: make.h,v 1.128 2020/08/28 03:35:45 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -160,6 +160,7 @@ typedef int ReturnStatus; #define FAILURE 0x0001 #include "lst.h" +#include "enum.h" #include "hash.h" #include "config.h" #include "buf.h" Index: src/usr.bin/make/suff.c diff -u src/usr.bin/make/suff.c:1.121 src/usr.bin/make/suff.c:1.122 --- src/usr.bin/make/suff.c:1.121 Thu Aug 27 19:15:35 2020 +++ src/usr.bin/make/suff.c Fri Aug 28 03:35:45 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: suff.c,v 1.121 2020/08/27 19:15:35 rillig Exp $ */ +/* $NetBSD: suff.c,v 1.122 2020/08/28 03:35:45 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,14 +69,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: suff.c,v 1.121 2020/08/27 19:15:35 rillig Exp $"; +static char rcsid[] = "$NetBSD: suff.c,v 1.122 2020/08/28 03:35:45 rillig Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)suff.c 8.4 (Berkeley) 3/21/94"; #else -__RCSID("$NetBSD: suff.c,v 1.121 2020/08/27 19:15:35 rillig Exp $"); +__RCSID("$NetBSD: suff.c,v 1.122 2020/08/28 03:35:45 rillig Exp $"); #endif #endif /* not lint */ #endif @@ -151,14 +151,18 @@ typedef enum { SUFF_INCLUDE = 0x01, /* One which is #include'd */ SUFF_LIBRARY = 0x02, /* One which contains a library */ SUFF_NULL = 0x04 /* The empty suffix */ +/* XXX: Why is SUFF_NULL needed? Wouldn't nameLen == 0 mean the same? */ } SuffFlags; +ENUM_FLAGS_RTTI_3(SuffFlags, + SUFF_INCLUDE, SUFF_LIBRARY, SUFF_NULL); + /* * Structure describing an individual suffix. */ typedef struct Suff { -char *name; /* The suffix itself */ -int nameLen; /* Length of the suffix */ +char *name; /* The suffix itself, such as ".c" */ +int nameLen; /* Length of the name, to avoid strlen calls */ SuffFlags flags; /* Type of suffix */ Lst searchPath; /* The path along which files of this suffix * may be found */ @@ -2602,30 +2606,15 @@ static int SuffPrintSuff(void *sp, void *dummy MAKE_ATTR_UNUSED) { Suff*s = (Suff *)sp; -int flags; -int flag; fprintf(debug_file, "# `%s' [%d] ", s->name, s->refCount); -flags = s->flags; -if (flags) { - fputs(" (", debug_file); - while (flags) { - flag = 1 << (ffs(flags) - 1); - flags &= ~flag; - switch (flag) { - case SUFF_NULL: - fprintf(debug_file, "NULL"); - break; - case SUFF_INCLUDE: - fprintf(debug_file, "INCLUDE"); - break; - case SUFF_LIBRARY: - fprintf(debug_file, "LIBRARY"); - break; - } - fputc(flags ? '|' : ')', debug_file); - } +if (s->flags != 0) { + char flags_buf[SuffFlags_ToStringSize]; + + fprintf(debug_file, " (%s)", + Enum_FlagsToString(flags_buf, sizeof flags_buf, + s->flags, SuffFlags_ToStringSpecs)); } fputc('\n', debug_file); fprintf(debug_file, "#\tTo: ");
CVS commit: src/usr.bin/make/unit-tests
Module Name:src Committed By: rillig Date: Fri Aug 28 02:45:51 UTC 2020 Modified Files: src/usr.bin/make/unit-tests: Makefile Log Message: make(1): disable the sync-mi convenience target To generate a diff of this commit: cvs rdiff -u -r1.120 -r1.121 src/usr.bin/make/unit-tests/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/make/unit-tests
Module Name:src Committed By: rillig Date: Fri Aug 28 02:45:51 UTC 2020 Modified Files: src/usr.bin/make/unit-tests: Makefile Log Message: make(1): disable the sync-mi convenience target To generate a diff of this commit: cvs rdiff -u -r1.120 -r1.121 src/usr.bin/make/unit-tests/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/make/unit-tests/Makefile diff -u src/usr.bin/make/unit-tests/Makefile:1.120 src/usr.bin/make/unit-tests/Makefile:1.121 --- src/usr.bin/make/unit-tests/Makefile:1.120 Thu Aug 27 19:00:17 2020 +++ src/usr.bin/make/unit-tests/Makefile Fri Aug 28 02:45:51 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.120 2020/08/27 19:00:17 rillig Exp $ +# $NetBSD: Makefile,v 1.121 2020/08/28 02:45:51 rillig Exp $ # # Unit tests for make(1) # @@ -466,6 +466,9 @@ SYNC_MI_AWK= \ $$1 == linestart "/Makefile" { system(cmd) } sync-mi: + # Obsolete entries in the mi file must be marked as obsolete, + # the lines must be preserved instead of just being deleted. + @echo "$@: Doesn't work right now." 1>&2; exit 1 @set -eu; \ cd "${MAKEFILE:tA:H}/../../.."; \ mi="distrib/sets/lists/tests/mi";\
CVS commit: src/usr.sbin/rtadvd
Module Name:src Committed By: rjs Date: Fri Aug 28 00:19:37 UTC 2020 Modified Files: src/usr.sbin/rtadvd: rtadvd.c Log Message: Use wrapper name for call to setsockopt(2), NFC for non-rump builds. To generate a diff of this commit: cvs rdiff -u -r1.78 -r1.79 src/usr.sbin/rtadvd/rtadvd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/rtadvd
Module Name:src Committed By: rjs Date: Fri Aug 28 00:19:37 UTC 2020 Modified Files: src/usr.sbin/rtadvd: rtadvd.c Log Message: Use wrapper name for call to setsockopt(2), NFC for non-rump builds. To generate a diff of this commit: cvs rdiff -u -r1.78 -r1.79 src/usr.sbin/rtadvd/rtadvd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/rtadvd/rtadvd.c diff -u src/usr.sbin/rtadvd/rtadvd.c:1.78 src/usr.sbin/rtadvd/rtadvd.c:1.79 --- src/usr.sbin/rtadvd/rtadvd.c:1.78 Thu May 14 23:42:18 2020 +++ src/usr.sbin/rtadvd/rtadvd.c Fri Aug 28 00:19:37 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: rtadvd.c,v 1.78 2020/05/14 23:42:18 christos Exp $ */ +/* $NetBSD: rtadvd.c,v 1.79 2020/08/28 00:19:37 rjs Exp $ */ /* $KAME: rtadvd.c,v 1.92 2005/10/17 14:40:02 suz Exp $ */ /* @@ -1614,7 +1614,7 @@ rtsock_open(void) exit(EXIT_FAILURE); } #ifdef RO_MSGFILTER - if (setsockopt(rtsock, PF_ROUTE, RO_MSGFILTER, + if (prog_setsockopt(rtsock, PF_ROUTE, RO_MSGFILTER, , sizeof(msgfilter) == -1)) logit(LOG_ERR, "%s: RO_MSGFILTER: %m", __func__); #endif
CVS commit: src/sys/net
Module Name:src Committed By: tih Date: Thu Aug 27 19:21:14 UTC 2020 Modified Files: src/sys/net: if_wg.c Log Message: Summary: let wg interfaces carry multicast traffic Once a wg interface is up and running, it is useful to be able to run a routing protocol over it. Marking the interface multicast capable enables this. (One must also use the wgconfig --allowed-ips option to explicitly permit the group one needs, e.g. 224.0.0.5/32 for OSPF.) To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/net/if_wg.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/net
Module Name:src Committed By: tih Date: Thu Aug 27 19:21:14 UTC 2020 Modified Files: src/sys/net: if_wg.c Log Message: Summary: let wg interfaces carry multicast traffic Once a wg interface is up and running, it is useful to be able to run a routing protocol over it. Marking the interface multicast capable enables this. (One must also use the wgconfig --allowed-ips option to explicitly permit the group one needs, e.g. 224.0.0.5/32 for OSPF.) To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/net/if_wg.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/net/if_wg.c diff -u src/sys/net/if_wg.c:1.30 src/sys/net/if_wg.c:1.31 --- src/sys/net/if_wg.c:1.30 Thu Aug 27 13:44:41 2020 +++ src/sys/net/if_wg.c Thu Aug 27 19:21:14 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wg.c,v 1.30 2020/08/27 13:44:41 riastradh Exp $ */ +/* $NetBSD: if_wg.c,v 1.31 2020/08/27 19:21:14 tih Exp $ */ /* * Copyright (C) Ryota Ozaki @@ -41,7 +41,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_wg.c,v 1.30 2020/08/27 13:44:41 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_wg.c,v 1.31 2020/08/27 19:21:14 tih Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -3381,7 +3381,7 @@ wg_if_attach(struct wg_softc *wg) wg->wg_if.if_addrlen = 0; wg->wg_if.if_mtu = WG_MTU; - wg->wg_if.if_flags = IFF_POINTOPOINT; + wg->wg_if.if_flags = IFF_POINTOPOINT | IFF_MULTICAST; wg->wg_if.if_extflags = IFEF_NO_LINK_STATE_CHANGE; wg->wg_if.if_extflags |= IFEF_MPSAFE; wg->wg_if.if_ioctl = wg_ioctl;
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Thu Aug 27 19:15:35 UTC 2020 Modified Files: src/usr.bin/make: arch.c compat.c cond.c dir.c job.c lst.c lst.h main.c make.c meta.c parse.c suff.c targ.c Log Message: make(1): migrate Lst_IsEmpty to Lst_IsEmptyS To generate a diff of this commit: cvs rdiff -u -r1.98 -r1.99 src/usr.bin/make/arch.c cvs rdiff -u -r1.130 -r1.131 src/usr.bin/make/compat.c cvs rdiff -u -r1.100 -r1.101 src/usr.bin/make/cond.c cvs rdiff -u -r1.114 -r1.115 src/usr.bin/make/dir.c cvs rdiff -u -r1.218 -r1.219 src/usr.bin/make/job.c cvs rdiff -u -r1.46 -r1.47 src/usr.bin/make/lst.c cvs rdiff -u -r1.48 -r1.49 src/usr.bin/make/lst.h cvs rdiff -u -r1.316 -r1.317 src/usr.bin/make/main.c cvs rdiff -u -r1.126 -r1.127 src/usr.bin/make/make.c cvs rdiff -u -r1.102 -r1.103 src/usr.bin/make/meta.c cvs rdiff -u -r1.266 -r1.267 src/usr.bin/make/parse.c cvs rdiff -u -r1.120 -r1.121 src/usr.bin/make/suff.c cvs rdiff -u -r1.74 -r1.75 src/usr.bin/make/targ.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/make/arch.c diff -u src/usr.bin/make/arch.c:1.98 src/usr.bin/make/arch.c:1.99 --- src/usr.bin/make/arch.c:1.98 Thu Aug 27 06:13:53 2020 +++ src/usr.bin/make/arch.c Thu Aug 27 19:15:35 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: arch.c,v 1.98 2020/08/27 06:13:53 rillig Exp $ */ +/* $NetBSD: arch.c,v 1.99 2020/08/27 19:15:35 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,14 +69,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: arch.c,v 1.98 2020/08/27 06:13:53 rillig Exp $"; +static char rcsid[] = "$NetBSD: arch.c,v 1.99 2020/08/27 19:15:35 rillig Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)arch.c 8.2 (Berkeley) 1/2/94"; #else -__RCSID("$NetBSD: arch.c,v 1.98 2020/08/27 06:13:53 rillig Exp $"); +__RCSID("$NetBSD: arch.c,v 1.99 2020/08/27 19:15:35 rillig Exp $"); #endif #endif /* not lint */ #endif @@ -396,7 +396,7 @@ Arch_ParseArchive(char **linePtr, Lst no Buf_Init(, 0); Dir_Expand(memName, dirSearchPath, members); - while (!Lst_IsEmpty(members)) { + while (!Lst_IsEmptyS(members)) { char *member = Lst_DequeueS(members); Buf_Empty(); @@ -1252,9 +1252,9 @@ Arch_LibOODate(GNode *gn) if (gn->type & OP_PHONY) { oodate = TRUE; -} else if (OP_NOP(gn->type) && Lst_IsEmpty(gn->children)) { +} else if (OP_NOP(gn->type) && Lst_IsEmptyS(gn->children)) { oodate = FALSE; -} else if ((!Lst_IsEmpty(gn->children) && gn->cmgn == NULL) || +} else if ((!Lst_IsEmptyS(gn->children) && gn->cmgn == NULL) || (gn->mtime > now) || (gn->cmgn != NULL && gn->mtime < gn->cmgn->mtime)) { oodate = TRUE; Index: src/usr.bin/make/compat.c diff -u src/usr.bin/make/compat.c:1.130 src/usr.bin/make/compat.c:1.131 --- src/usr.bin/make/compat.c:1.130 Thu Aug 27 06:53:57 2020 +++ src/usr.bin/make/compat.c Thu Aug 27 19:15:35 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: compat.c,v 1.130 2020/08/27 06:53:57 rillig Exp $ */ +/* $NetBSD: compat.c,v 1.131 2020/08/27 19:15:35 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: compat.c,v 1.130 2020/08/27 06:53:57 rillig Exp $"; +static char rcsid[] = "$NetBSD: compat.c,v 1.131 2020/08/27 19:15:35 rillig Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)compat.c 8.2 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: compat.c,v 1.130 2020/08/27 06:53:57 rillig Exp $"); +__RCSID("$NetBSD: compat.c,v 1.131 2020/08/27 19:15:35 rillig Exp $"); #endif #endif /* not lint */ #endif @@ -747,7 +747,7 @@ Compat_Run(Lst targs) * could not be made due to errors. */ errors = 0; -while (!Lst_IsEmpty(targs)) { +while (!Lst_IsEmptyS(targs)) { gn = Lst_DequeueS(targs); Compat_Make(gn, gn); Index: src/usr.bin/make/cond.c diff -u src/usr.bin/make/cond.c:1.100 src/usr.bin/make/cond.c:1.101 --- src/usr.bin/make/cond.c:1.100 Sun Aug 23 16:58:02 2020 +++ src/usr.bin/make/cond.c Thu Aug 27 19:15:35 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: cond.c,v 1.100 2020/08/23 16:58:02 rillig Exp $ */ +/* $NetBSD: cond.c,v 1.101 2020/08/27 19:15:35 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: cond.c,v 1.100 2020/08/23 16:58:02 rillig Exp $"; +static char rcsid[] = "$NetBSD: cond.c,v 1.101 2020/08/27 19:15:35 rillig Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)cond.c 8.2 (Berkeley) 1/2/94"; #else -__RCSID("$NetBSD: cond.c,v 1.100 2020/08/23 16:58:02 rillig Exp $"); +__RCSID("$NetBSD: cond.c,v 1.101 2020/08/27 19:15:35 rillig Exp $"); #endif #endif /* not lint */ #endif @@ -326,7 +326,7 @@ CondDoCommands(int argLen
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Thu Aug 27 19:15:35 UTC 2020 Modified Files: src/usr.bin/make: arch.c compat.c cond.c dir.c job.c lst.c lst.h main.c make.c meta.c parse.c suff.c targ.c Log Message: make(1): migrate Lst_IsEmpty to Lst_IsEmptyS To generate a diff of this commit: cvs rdiff -u -r1.98 -r1.99 src/usr.bin/make/arch.c cvs rdiff -u -r1.130 -r1.131 src/usr.bin/make/compat.c cvs rdiff -u -r1.100 -r1.101 src/usr.bin/make/cond.c cvs rdiff -u -r1.114 -r1.115 src/usr.bin/make/dir.c cvs rdiff -u -r1.218 -r1.219 src/usr.bin/make/job.c cvs rdiff -u -r1.46 -r1.47 src/usr.bin/make/lst.c cvs rdiff -u -r1.48 -r1.49 src/usr.bin/make/lst.h cvs rdiff -u -r1.316 -r1.317 src/usr.bin/make/main.c cvs rdiff -u -r1.126 -r1.127 src/usr.bin/make/make.c cvs rdiff -u -r1.102 -r1.103 src/usr.bin/make/meta.c cvs rdiff -u -r1.266 -r1.267 src/usr.bin/make/parse.c cvs rdiff -u -r1.120 -r1.121 src/usr.bin/make/suff.c cvs rdiff -u -r1.74 -r1.75 src/usr.bin/make/targ.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Thu Aug 27 19:09:37 UTC 2020 Modified Files: src/usr.bin/make: Makefile Log Message: make(1): pass the command-line variables to the subdir make To generate a diff of this commit: cvs rdiff -u -r1.94 -r1.95 src/usr.bin/make/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/make/Makefile diff -u src/usr.bin/make/Makefile:1.94 src/usr.bin/make/Makefile:1.95 --- src/usr.bin/make/Makefile:1.94 Wed Aug 26 23:00:47 2020 +++ src/usr.bin/make/Makefile Thu Aug 27 19:09:37 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.94 2020/08/26 23:00:47 rillig Exp $ +# $NetBSD: Makefile,v 1.95 2020/08/27 19:09:37 rillig Exp $ # @(#)Makefile 5.2 (Berkeley) 12/28/90 PROG= make @@ -179,7 +179,7 @@ test: .MAKE .endif accept sync-mi: .MAKE - cd ${.CURDIR}/unit-tests && ${.MAKE} ${.TARGET} + cd ${.CURDIR}/unit-tests && ${.MAKE} ${MAKEFLAGS} ${.TARGET} retest: ${.MAKE} -C ${.CURDIR}/unit-tests cleandir
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Thu Aug 27 19:09:37 UTC 2020 Modified Files: src/usr.bin/make: Makefile Log Message: make(1): pass the command-line variables to the subdir make To generate a diff of this commit: cvs rdiff -u -r1.94 -r1.95 src/usr.bin/make/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src
Module Name:src Committed By: rillig Date: Thu Aug 27 19:00:18 UTC 2020 Modified Files: src/distrib/sets/lists/tests: mi src/usr.bin/make/unit-tests: Makefile Added Files: src/usr.bin/make/unit-tests: opt-debug-g1.exp opt-debug-g1.mk Log Message: make(1): add test for the -dg1 option To generate a diff of this commit: cvs rdiff -u -r1.909 -r1.910 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.119 -r1.120 src/usr.bin/make/unit-tests/Makefile cvs rdiff -u -r0 -r1.1 src/usr.bin/make/unit-tests/opt-debug-g1.exp \ src/usr.bin/make/unit-tests/opt-debug-g1.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/tests/mi diff -u src/distrib/sets/lists/tests/mi:1.909 src/distrib/sets/lists/tests/mi:1.910 --- src/distrib/sets/lists/tests/mi:1.909 Thu Aug 27 15:32:37 2020 +++ src/distrib/sets/lists/tests/mi Thu Aug 27 19:00:17 2020 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.909 2020/08/27 15:32:37 riastradh Exp $ +# $NetBSD: mi,v 1.910 2020/08/27 19:00:17 rillig Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -4804,6 +4804,8 @@ ./usr/tests/usr.bin/make/unit-tests/opt-backwards.mk tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/make/unit-tests/opt-chdir.exp tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/make/unit-tests/opt-chdir.mk tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/make/unit-tests/opt-debug-g1.exp tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/make/unit-tests/opt-debug-g1.mk tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/make/unit-tests/opt-debug.exp tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/make/unit-tests/opt-debug.mk tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/make/unit-tests/opt-define.exp tests-usr.bin-tests compattestfile,atf Index: src/usr.bin/make/unit-tests/Makefile diff -u src/usr.bin/make/unit-tests/Makefile:1.119 src/usr.bin/make/unit-tests/Makefile:1.120 --- src/usr.bin/make/unit-tests/Makefile:1.119 Sun Aug 23 14:46:33 2020 +++ src/usr.bin/make/unit-tests/Makefile Thu Aug 27 19:00:17 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.119 2020/08/23 14:46:33 rillig Exp $ +# $NetBSD: Makefile,v 1.120 2020/08/27 19:00:17 rillig Exp $ # # Unit tests for make(1) # @@ -168,6 +168,7 @@ TESTS+= opt TESTS+= opt-backwards TESTS+= opt-chdir TESTS+= opt-debug +TESTS+= opt-debug-g1 TESTS+= opt-define TESTS+= opt-env TESTS+= opt-file @@ -325,6 +326,7 @@ FLAGS.doterror= # none FLAGS.envfirst= -e FLAGS.export= # none FLAGS.lint= -dL -k +FLAGS.opt-debug-g1= -dg1 FLAGS.opt-ignore= -i FLAGS.opt-keep-going= -k FLAGS.opt-no-action= -n @@ -341,6 +343,9 @@ FLAGS.varname-dot-shell= -dpv FLAGS.varname-empty= -dv '$${:U}=cmdline-u' '=cmline-plain' # Some tests need extra post-processing. +SED_CMDS.opt-debug-g1= -e 's,${.CURDIR},CURDIR,' +SED_CMDS.opt-debug-g1+= -e 's,[/[a-z]*/share/mk,/.../share/mk,' +SED_CMDS.opt-debug-g1+= -e '/Global Variables/,/Directory Cache/d' SED_CMDS.sh-dots+= -e 's,^${.SHELL}: ,,' -e '/not found/s,command ,,' SED_CMDS.varmod-subst-regex+= \ -e 's,\(Regex compilation error:\).*,\1 (details omitted),' Added files: Index: src/usr.bin/make/unit-tests/opt-debug-g1.exp diff -u /dev/null src/usr.bin/make/unit-tests/opt-debug-g1.exp:1.1 --- /dev/null Thu Aug 27 19:00:18 2020 +++ src/usr.bin/make/unit-tests/opt-debug-g1.exp Thu Aug 27 19:00:17 2020 @@ -0,0 +1,22 @@ +#*** Input graph: +# all, made UNMADE, type OP_DEPENDS, flags none +# made-target, made UNMADE, type OP_DEPENDS, flags none +# made-target-no-sources, made UNMADE, type OP_DEPENDS, flags none +# made-source, made UNMADE, type OP_DEPENDS, flags none +# unmade-target, made UNMADE, type OP_DEPENDS, flags none +# unmade-sources, made UNMADE, type none, flags none +# unmade-target-no-sources, made UNMADE, type OP_DEPENDS, flags none + + +# +# Files that are only sources: +# unmade-sources [unmade-sources] +# Stats: 0 hits 2 misses 0 near misses 0 losers (0%) +# directoryreferenced hits +# CURDIR 2 0 +# . 2 0 +# /.../share/mk 1 0 + +#*** Suffixes: +#*** Transformations: +exit status 0 Index: src/usr.bin/make/unit-tests/opt-debug-g1.mk diff -u /dev/null src/usr.bin/make/unit-tests/opt-debug-g1.mk:1.1 --- /dev/null Thu Aug 27 19:00:18 2020 +++ src/usr.bin/make/unit-tests/opt-debug-g1.mk Thu Aug 27 19:00:17 2020 @@ -0,0 +1,19 @@ +# $NetBSD: opt-debug-g1.mk,v 1.1 2020/08/27 19:00:17 rillig Exp $ +# +# Tests for the -dg1 command line option, which prints the input +# graph before making anything. + +all: made-target made-target-no-sources + +made-target: made-source + +made-source: + +made-target-no-sources: + +unmade-target: unmade-sources + +unmade-target-no-sources: + +all: + @:;
CVS commit: src
Module Name:src Committed By: rillig Date: Thu Aug 27 19:00:18 UTC 2020 Modified Files: src/distrib/sets/lists/tests: mi src/usr.bin/make/unit-tests: Makefile Added Files: src/usr.bin/make/unit-tests: opt-debug-g1.exp opt-debug-g1.mk Log Message: make(1): add test for the -dg1 option To generate a diff of this commit: cvs rdiff -u -r1.909 -r1.910 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.119 -r1.120 src/usr.bin/make/unit-tests/Makefile cvs rdiff -u -r0 -r1.1 src/usr.bin/make/unit-tests/opt-debug-g1.exp \ src/usr.bin/make/unit-tests/opt-debug-g1.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/npf/npftest/libnpftest
Module Name:src Committed By: riastradh Date: Thu Aug 27 18:51:20 UTC 2020 Modified Files: src/usr.sbin/npf/npftest/libnpftest: npf_gc_test.c Log Message: npftest: Wait at least one tick in each gc busy wait iteration. Otherwise the busy wait loop runs a little too fast for the gc about half the times I run the test. XXX We should really arrange mstohz to round up! To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/npf/npftest/libnpftest/npf_gc_test.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/npf/npftest/libnpftest/npf_gc_test.c diff -u src/usr.sbin/npf/npftest/libnpftest/npf_gc_test.c:1.1 src/usr.sbin/npf/npftest/libnpftest/npf_gc_test.c:1.2 --- src/usr.sbin/npf/npftest/libnpftest/npf_gc_test.c:1.1 Sat May 30 14:16:57 2020 +++ src/usr.sbin/npf/npftest/libnpftest/npf_gc_test.c Thu Aug 27 18:51:20 2020 @@ -222,7 +222,7 @@ run_worker_tests(npf_t *npf) /* Wait for the task to be done. */ while (!atomic_load_acquire(_done) && retry--) { npf_worker_signal(test_npf); - kpause("gctest", false, mstohz(1), NULL); + kpause("gctest", false, MAX(1, mstohz(1)), NULL); } CHECK_TRUE(atomic_load_acquire(_done));
CVS commit: src/usr.sbin/npf/npftest/libnpftest
Module Name:src Committed By: riastradh Date: Thu Aug 27 18:51:20 UTC 2020 Modified Files: src/usr.sbin/npf/npftest/libnpftest: npf_gc_test.c Log Message: npftest: Wait at least one tick in each gc busy wait iteration. Otherwise the busy wait loop runs a little too fast for the gc about half the times I run the test. XXX We should really arrange mstohz to round up! To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/npf/npftest/libnpftest/npf_gc_test.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src
Module Name:src Committed By: riastradh Date: Thu Aug 27 18:50:25 UTC 2020 Modified Files: src/sys/net/npf: npf.c npf_impl.h npf_portmap.c src/usr.sbin/npf/npftest/libnpftest: npf_test_subr.c Log Message: npf: Make sure to initialize portmap_lock only once. PR kern/55586 To generate a diff of this commit: cvs rdiff -u -r1.43 -r1.44 src/sys/net/npf/npf.c cvs rdiff -u -r1.81 -r1.82 src/sys/net/npf/npf_impl.h cvs rdiff -u -r1.5 -r1.6 src/sys/net/npf/npf_portmap.c cvs rdiff -u -r1.18 -r1.19 \ src/usr.sbin/npf/npftest/libnpftest/npf_test_subr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/net/npf/npf.c diff -u src/sys/net/npf/npf.c:1.43 src/sys/net/npf/npf.c:1.44 --- src/sys/net/npf/npf.c:1.43 Sat May 30 14:16:56 2020 +++ src/sys/net/npf/npf.c Thu Aug 27 18:50:25 2020 @@ -33,7 +33,7 @@ #ifdef _KERNEL #include -__KERNEL_RCSID(0, "$NetBSD: npf.c,v 1.43 2020/05/30 14:16:56 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: npf.c,v 1.44 2020/08/27 18:50:25 riastradh Exp $"); #include #include @@ -52,16 +52,20 @@ static __read_mostly npf_t * npf_kernel_ __dso_public int npfk_sysinit(unsigned nworkers) { + npf_bpf_sysinit(); npf_tableset_sysinit(); npf_nat_sysinit(); + npf_portmap_sysinit(); return npf_worker_sysinit(nworkers); } __dso_public void npfk_sysfini(void) { + npf_worker_sysfini(); + npf_portmap_sysfini(); npf_nat_sysfini(); npf_tableset_sysfini(); npf_bpf_sysfini(); Index: src/sys/net/npf/npf_impl.h diff -u src/sys/net/npf/npf_impl.h:1.81 src/sys/net/npf/npf_impl.h:1.82 --- src/sys/net/npf/npf_impl.h:1.81 Sat May 30 14:16:56 2020 +++ src/sys/net/npf/npf_impl.h Thu Aug 27 18:50:25 2020 @@ -472,6 +472,9 @@ bool npf_state_tcp(npf_cache_t *, npf_s int npf_state_tcp_timeout(npf_t *, const npf_state_t *); /* Portmap. */ +void npf_portmap_sysinit(void); +void npf_portmap_sysfini(void); + void npf_portmap_init(npf_t *); void npf_portmap_fini(npf_t *); Index: src/sys/net/npf/npf_portmap.c diff -u src/sys/net/npf/npf_portmap.c:1.5 src/sys/net/npf/npf_portmap.c:1.6 --- src/sys/net/npf/npf_portmap.c:1.5 Sat May 30 14:16:56 2020 +++ src/sys/net/npf/npf_portmap.c Thu Aug 27 18:50:25 2020 @@ -35,7 +35,7 @@ #ifdef _KERNEL #include -__KERNEL_RCSID(0, "$NetBSD: npf_portmap.c,v 1.5 2020/05/30 14:16:56 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: npf_portmap.c,v 1.6 2020/08/27 18:50:25 riastradh Exp $"); #include #include @@ -109,6 +109,22 @@ struct npf_portmap { static kmutex_t portmap_lock; void +npf_portmap_sysinit(void) +{ + + mutex_init(_lock, MUTEX_DEFAULT, IPL_SOFTNET); + __insn_barrier(); +} + +void +npf_portmap_sysfini(void) +{ + + mutex_destroy(_lock); + __insn_barrier(); +} + +void npf_portmap_init(npf_t *npf) { npf_portmap_t *pm = npf_portmap_create( @@ -127,16 +143,16 @@ npf_portmap_init(npf_t *npf) .min = 1024, .max = 65535 } }; + npf_param_register(npf, param_map, __arraycount(param_map)); - mutex_init(_lock, MUTEX_DEFAULT, IPL_SOFTNET); npf->portmap = pm; } void npf_portmap_fini(npf_t *npf) { + npf_portmap_destroy(npf->portmap); - mutex_destroy(_lock); npf->portmap = NULL; // diagnostic } Index: src/usr.sbin/npf/npftest/libnpftest/npf_test_subr.c diff -u src/usr.sbin/npf/npftest/libnpftest/npf_test_subr.c:1.18 src/usr.sbin/npf/npftest/libnpftest/npf_test_subr.c:1.19 --- src/usr.sbin/npf/npftest/libnpftest/npf_test_subr.c:1.18 Sat May 30 21:00:31 2020 +++ src/usr.sbin/npf/npftest/libnpftest/npf_test_subr.c Thu Aug 27 18:50:25 2020 @@ -71,7 +71,6 @@ npf_test_init(int (*pton_func)(int, cons npf_worker_sysfini(); } #endif - npfk_sysinit(0); npf = npfk_create(0, _mbufops, _ifops, NULL); npfk_thread_register(npf); npf_setkernctx(npf); @@ -88,9 +87,9 @@ void npf_test_fini(void) { npf_t *npf = npf_getkernctx(); + npfk_thread_unregister(npf); npfk_destroy(npf); - npfk_sysfini(); } int
CVS commit: src/sys/net/npf
Module Name:src Committed By: riastradh Date: Thu Aug 27 18:49:36 UTC 2020 Modified Files: src/sys/net/npf: npf_worker.c Log Message: npf: Don't stop early after sleeping and before processing instances. We already check winfo->exit below, after processing instances and before sleeping again. Candidate fix for: panic: kernel diagnostic assertion "LIST_EMPTY(>instances)" failed: file "/home/riastradh/netbsd/current/src/sys/rump/net/lib/libnpf/../../../..//net/npf/npf_worker.c", line 300 NPF instances must be discharged before the npfk_sysfini() call To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/net/npf/npf_worker.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/net/npf/npf_worker.c diff -u src/sys/net/npf/npf_worker.c:1.9 src/sys/net/npf/npf_worker.c:1.10 --- src/sys/net/npf/npf_worker.c:1.9 Sat May 30 20:54:54 2020 +++ src/sys/net/npf/npf_worker.c Thu Aug 27 18:49:36 2020 @@ -29,7 +29,7 @@ #ifdef _KERNEL #include -__KERNEL_RCSID(0, "$NetBSD: npf_worker.c,v 1.9 2020/05/30 20:54:54 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: npf_worker.c,v 1.10 2020/08/27 18:49:36 riastradh Exp $"); #include #include @@ -271,7 +271,7 @@ npf_worker(void *arg) npf_t *npf; mutex_enter(>lock); - while (!winfo->exit) { + for (;;) { unsigned wait_time = NPF_GC_MAXWAIT; /*
CVS commit: src
Module Name:src Committed By: riastradh Date: Thu Aug 27 18:50:25 UTC 2020 Modified Files: src/sys/net/npf: npf.c npf_impl.h npf_portmap.c src/usr.sbin/npf/npftest/libnpftest: npf_test_subr.c Log Message: npf: Make sure to initialize portmap_lock only once. PR kern/55586 To generate a diff of this commit: cvs rdiff -u -r1.43 -r1.44 src/sys/net/npf/npf.c cvs rdiff -u -r1.81 -r1.82 src/sys/net/npf/npf_impl.h cvs rdiff -u -r1.5 -r1.6 src/sys/net/npf/npf_portmap.c cvs rdiff -u -r1.18 -r1.19 \ src/usr.sbin/npf/npftest/libnpftest/npf_test_subr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/net/npf
Module Name:src Committed By: riastradh Date: Thu Aug 27 18:49:36 UTC 2020 Modified Files: src/sys/net/npf: npf_worker.c Log Message: npf: Don't stop early after sleeping and before processing instances. We already check winfo->exit below, after processing instances and before sleeping again. Candidate fix for: panic: kernel diagnostic assertion "LIST_EMPTY(>instances)" failed: file "/home/riastradh/netbsd/current/src/sys/rump/net/lib/libnpf/../../../..//net/npf/npf_worker.c", line 300 NPF instances must be discharged before the npfk_sysfini() call To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/net/npf/npf_worker.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/arm/sunxi
Module Name:src Committed By: skrll Date: Thu Aug 27 16:35:13 UTC 2020 Modified Files: src/sys/arch/arm/sunxi: sunxi_gpio.c Log Message: Avoid undefined behaviour as detected by KUBSAN To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sys/arch/arm/sunxi/sunxi_gpio.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/sunxi/sunxi_gpio.c diff -u src/sys/arch/arm/sunxi/sunxi_gpio.c:1.27 src/sys/arch/arm/sunxi/sunxi_gpio.c:1.28 --- src/sys/arch/arm/sunxi/sunxi_gpio.c:1.27 Tue Oct 1 23:32:52 2019 +++ src/sys/arch/arm/sunxi/sunxi_gpio.c Thu Aug 27 16:35:13 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: sunxi_gpio.c,v 1.27 2019/10/01 23:32:52 jmcneill Exp $ */ +/* $NetBSD: sunxi_gpio.c,v 1.28 2020/08/27 16:35:13 skrll Exp $ */ /*- * Copyright (c) 2017 Jared McNeill @@ -29,7 +29,7 @@ #include "opt_soc.h" #include -__KERNEL_RCSID(0, "$NetBSD: sunxi_gpio.c,v 1.27 2019/10/01 23:32:52 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sunxi_gpio.c,v 1.28 2020/08/27 16:35:13 skrll Exp $"); #include #include @@ -54,17 +54,17 @@ __KERNEL_RCSID(0, "$NetBSD: sunxi_gpio.c #define SUNXI_GPIO_PORT(port) (0x24 * (port)) #define SUNXI_GPIO_CFG(port, pin) (SUNXI_GPIO_PORT(port) + 0x00 + (0x4 * ((pin) / 8))) -#define SUNXI_GPIO_CFG_PINMASK(pin) (0x7 << (((pin) % 8) * 4)) +#define SUNXI_GPIO_CFG_PINMASK(pin) (0x7U << (((pin) % 8) * 4)) #define SUNXI_GPIO_DATA(port) (SUNXI_GPIO_PORT(port) + 0x10) #define SUNXI_GPIO_DRV(port, pin) (SUNXI_GPIO_PORT(port) + 0x14 + (0x4 * ((pin) / 16))) -#define SUNXI_GPIO_DRV_PINMASK(pin) (0x3 << (((pin) % 16) * 2)) +#define SUNXI_GPIO_DRV_PINMASK(pin) (0x3U << (((pin) % 16) * 2)) #define SUNXI_GPIO_PULL(port, pin) (SUNXI_GPIO_PORT(port) + 0x1c + (0x4 * ((pin) / 16))) #define SUNXI_GPIO_PULL_DISABLE 0 #define SUNXI_GPIO_PULL_UP 1 #define SUNXI_GPIO_PULL_DOWN 2 -#define SUNXI_GPIO_PULL_PINMASK(pin) (0x3 << (((pin) % 16) * 2)) +#define SUNXI_GPIO_PULL_PINMASK(pin) (0x3U << (((pin) % 16) * 2)) #define SUNXI_GPIO_INT_CFG(bank, eint) (0x200 + (0x20 * (bank)) + (0x4 * ((eint) / 8))) -#define SUNXI_GPIO_INT_MODEMASK(eint) (0xf << (((eint) % 8) * 4)) +#define SUNXI_GPIO_INT_MODEMASK(eint) (0xfU << (((eint) % 8) * 4)) #define SUNXI_GPIO_INT_MODE_POS_EDGE 0x0 #define SUNXI_GPIO_INT_MODE_NEG_EDGE 0x1 #define SUNXI_GPIO_INT_MODE_HIGH_LEVEL 0x2
CVS commit: src/sys/arch/arm/sunxi
Module Name:src Committed By: skrll Date: Thu Aug 27 16:35:13 UTC 2020 Modified Files: src/sys/arch/arm/sunxi: sunxi_gpio.c Log Message: Avoid undefined behaviour as detected by KUBSAN To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sys/arch/arm/sunxi/sunxi_gpio.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/distrib/sets/lists/tests
Module Name:src Committed By: riastradh Date: Thu Aug 27 15:32:37 UTC 2020 Modified Files: src/distrib/sets/lists/tests: mi Log Message: Remove bogus Atffile and Kyuafile entries for if_wg tests. To generate a diff of this commit: cvs rdiff -u -r1.908 -r1.909 src/distrib/sets/lists/tests/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/tests/mi diff -u src/distrib/sets/lists/tests/mi:1.908 src/distrib/sets/lists/tests/mi:1.909 --- src/distrib/sets/lists/tests/mi:1.908 Thu Aug 27 15:32:00 2020 +++ src/distrib/sets/lists/tests/mi Thu Aug 27 15:32:37 2020 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.908 2020/08/27 15:32:00 riastradh Exp $ +# $NetBSD: mi,v 1.909 2020/08/27 15:32:37 riastradh Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -3868,9 +3868,7 @@ ./usr/tests/net/if_vlan/t_vlan tests-net-tests atf,rump ./usr/tests/net/if_wgtests-net-tests compattestfile,atf ./usr/tests/net/if_wg/Atffile tests-net-tests atf,rump -./usr/tests/net/if_wg/Atffile tests-net-tests compattestfile,atf ./usr/tests/net/if_wg/Kyuafile tests-net-tests atf,rump,kyua -./usr/tests/net/if_wg/Kyuafile tests-net-tests compattestfile,atf,kyua ./usr/tests/net/if_wg/t_basic tests-net-tests atf,rump ./usr/tests/net/if_wg/t_interoperability tests-net-tests atf,rump ./usr/tests/net/if_wg/t_misc tests-net-tests atf,rump
CVS commit: src/distrib/sets/lists/tests
Module Name:src Committed By: riastradh Date: Thu Aug 27 15:32:37 UTC 2020 Modified Files: src/distrib/sets/lists/tests: mi Log Message: Remove bogus Atffile and Kyuafile entries for if_wg tests. To generate a diff of this commit: cvs rdiff -u -r1.908 -r1.909 src/distrib/sets/lists/tests/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/distrib/sets/lists
Module Name:src Committed By: riastradh Date: Thu Aug 27 15:32:01 UTC 2020 Modified Files: src/distrib/sets/lists/base: md.evbarm mi shl.mi src/distrib/sets/lists/comp: ad.aarch64 ad.powerpc md.amd64 md.i386 shl.mi stl.mi src/distrib/sets/lists/debug: ad.mips mi shl.mi src/distrib/sets/lists/etc: mi src/distrib/sets/lists/games: mi src/distrib/sets/lists/modules: ad.aarch64 ad.arm ad.mips md.amd64 md.i386 md.sparc64 mi src/distrib/sets/lists/tests: md.amd64 mi src/distrib/sets/lists/xbase: shl.mi src/distrib/sets/lists/xdebug: md.alpha md.amd64 md.cats md.evbarm md.i386 md.sgimips shl.mi src/distrib/sets/lists/xetc: mi src/distrib/sets/lists/xserver: md.amd64 md.evbarm mi Log Message: Sort and deduplicate set lists. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/distrib/sets/lists/base/md.evbarm cvs rdiff -u -r1.1257 -r1.1258 src/distrib/sets/lists/base/mi cvs rdiff -u -r1.898 -r1.899 src/distrib/sets/lists/base/shl.mi cvs rdiff -u -r1.41 -r1.42 src/distrib/sets/lists/comp/ad.aarch64 cvs rdiff -u -r1.97 -r1.98 src/distrib/sets/lists/comp/ad.powerpc cvs rdiff -u -r1.279 -r1.280 src/distrib/sets/lists/comp/md.amd64 cvs rdiff -u -r1.197 -r1.198 src/distrib/sets/lists/comp/md.i386 cvs rdiff -u -r1.338 -r1.339 src/distrib/sets/lists/comp/shl.mi cvs rdiff -u -r1.6 -r1.7 src/distrib/sets/lists/comp/stl.mi cvs rdiff -u -r1.75 -r1.76 src/distrib/sets/lists/debug/ad.mips cvs rdiff -u -r1.330 -r1.331 src/distrib/sets/lists/debug/mi cvs rdiff -u -r1.259 -r1.260 src/distrib/sets/lists/debug/shl.mi cvs rdiff -u -r1.261 -r1.262 src/distrib/sets/lists/etc/mi cvs rdiff -u -r1.55 -r1.56 src/distrib/sets/lists/games/mi cvs rdiff -u -r1.6 -r1.7 src/distrib/sets/lists/modules/ad.aarch64 cvs rdiff -u -r1.16 -r1.17 src/distrib/sets/lists/modules/ad.arm cvs rdiff -u -r1.15 -r1.16 src/distrib/sets/lists/modules/ad.mips cvs rdiff -u -r1.87 -r1.88 src/distrib/sets/lists/modules/md.amd64 \ src/distrib/sets/lists/modules/md.i386 cvs rdiff -u -r1.10 -r1.11 src/distrib/sets/lists/modules/md.sparc64 cvs rdiff -u -r1.138 -r1.139 src/distrib/sets/lists/modules/mi cvs rdiff -u -r1.12 -r1.13 src/distrib/sets/lists/tests/md.amd64 cvs rdiff -u -r1.907 -r1.908 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.88 -r1.89 src/distrib/sets/lists/xbase/shl.mi cvs rdiff -u -r1.14 -r1.15 src/distrib/sets/lists/xdebug/md.alpha cvs rdiff -u -r1.51 -r1.52 src/distrib/sets/lists/xdebug/md.amd64 cvs rdiff -u -r1.13 -r1.14 src/distrib/sets/lists/xdebug/md.cats cvs rdiff -u -r1.27 -r1.28 src/distrib/sets/lists/xdebug/md.evbarm cvs rdiff -u -r1.47 -r1.48 src/distrib/sets/lists/xdebug/md.i386 cvs rdiff -u -r1.12 -r1.13 src/distrib/sets/lists/xdebug/md.sgimips cvs rdiff -u -r1.54 -r1.55 src/distrib/sets/lists/xdebug/shl.mi cvs rdiff -u -r1.37 -r1.38 src/distrib/sets/lists/xetc/mi cvs rdiff -u -r1.112 -r1.113 src/distrib/sets/lists/xserver/md.amd64 cvs rdiff -u -r1.20 -r1.21 src/distrib/sets/lists/xserver/md.evbarm cvs rdiff -u -r1.43 -r1.44 src/distrib/sets/lists/xserver/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/distrib/sets/lists
Module Name:src Committed By: riastradh Date: Thu Aug 27 15:32:01 UTC 2020 Modified Files: src/distrib/sets/lists/base: md.evbarm mi shl.mi src/distrib/sets/lists/comp: ad.aarch64 ad.powerpc md.amd64 md.i386 shl.mi stl.mi src/distrib/sets/lists/debug: ad.mips mi shl.mi src/distrib/sets/lists/etc: mi src/distrib/sets/lists/games: mi src/distrib/sets/lists/modules: ad.aarch64 ad.arm ad.mips md.amd64 md.i386 md.sparc64 mi src/distrib/sets/lists/tests: md.amd64 mi src/distrib/sets/lists/xbase: shl.mi src/distrib/sets/lists/xdebug: md.alpha md.amd64 md.cats md.evbarm md.i386 md.sgimips shl.mi src/distrib/sets/lists/xetc: mi src/distrib/sets/lists/xserver: md.amd64 md.evbarm mi Log Message: Sort and deduplicate set lists. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/distrib/sets/lists/base/md.evbarm cvs rdiff -u -r1.1257 -r1.1258 src/distrib/sets/lists/base/mi cvs rdiff -u -r1.898 -r1.899 src/distrib/sets/lists/base/shl.mi cvs rdiff -u -r1.41 -r1.42 src/distrib/sets/lists/comp/ad.aarch64 cvs rdiff -u -r1.97 -r1.98 src/distrib/sets/lists/comp/ad.powerpc cvs rdiff -u -r1.279 -r1.280 src/distrib/sets/lists/comp/md.amd64 cvs rdiff -u -r1.197 -r1.198 src/distrib/sets/lists/comp/md.i386 cvs rdiff -u -r1.338 -r1.339 src/distrib/sets/lists/comp/shl.mi cvs rdiff -u -r1.6 -r1.7 src/distrib/sets/lists/comp/stl.mi cvs rdiff -u -r1.75 -r1.76 src/distrib/sets/lists/debug/ad.mips cvs rdiff -u -r1.330 -r1.331 src/distrib/sets/lists/debug/mi cvs rdiff -u -r1.259 -r1.260 src/distrib/sets/lists/debug/shl.mi cvs rdiff -u -r1.261 -r1.262 src/distrib/sets/lists/etc/mi cvs rdiff -u -r1.55 -r1.56 src/distrib/sets/lists/games/mi cvs rdiff -u -r1.6 -r1.7 src/distrib/sets/lists/modules/ad.aarch64 cvs rdiff -u -r1.16 -r1.17 src/distrib/sets/lists/modules/ad.arm cvs rdiff -u -r1.15 -r1.16 src/distrib/sets/lists/modules/ad.mips cvs rdiff -u -r1.87 -r1.88 src/distrib/sets/lists/modules/md.amd64 \ src/distrib/sets/lists/modules/md.i386 cvs rdiff -u -r1.10 -r1.11 src/distrib/sets/lists/modules/md.sparc64 cvs rdiff -u -r1.138 -r1.139 src/distrib/sets/lists/modules/mi cvs rdiff -u -r1.12 -r1.13 src/distrib/sets/lists/tests/md.amd64 cvs rdiff -u -r1.907 -r1.908 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.88 -r1.89 src/distrib/sets/lists/xbase/shl.mi cvs rdiff -u -r1.14 -r1.15 src/distrib/sets/lists/xdebug/md.alpha cvs rdiff -u -r1.51 -r1.52 src/distrib/sets/lists/xdebug/md.amd64 cvs rdiff -u -r1.13 -r1.14 src/distrib/sets/lists/xdebug/md.cats cvs rdiff -u -r1.27 -r1.28 src/distrib/sets/lists/xdebug/md.evbarm cvs rdiff -u -r1.47 -r1.48 src/distrib/sets/lists/xdebug/md.i386 cvs rdiff -u -r1.12 -r1.13 src/distrib/sets/lists/xdebug/md.sgimips cvs rdiff -u -r1.54 -r1.55 src/distrib/sets/lists/xdebug/shl.mi cvs rdiff -u -r1.37 -r1.38 src/distrib/sets/lists/xetc/mi cvs rdiff -u -r1.112 -r1.113 src/distrib/sets/lists/xserver/md.amd64 cvs rdiff -u -r1.20 -r1.21 src/distrib/sets/lists/xserver/md.evbarm cvs rdiff -u -r1.43 -r1.44 src/distrib/sets/lists/xserver/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/base/md.evbarm diff -u src/distrib/sets/lists/base/md.evbarm:1.18 src/distrib/sets/lists/base/md.evbarm:1.19 --- src/distrib/sets/lists/base/md.evbarm:1.18 Fri Mar 27 04:31:18 2020 +++ src/distrib/sets/lists/base/md.evbarm Thu Aug 27 15:31:59 2020 @@ -1,4 +1,4 @@ -# $NetBSD: md.evbarm,v 1.18 2020/03/27 04:31:18 thorpej Exp $ +# $NetBSD: md.evbarm,v 1.19 2020/08/27 15:31:59 riastradh Exp $ ./libdata/firmware/if_bwfm/brcmfmac43143-sdio.bin base-firmware-root firmware ./libdata/firmware/if_bwfm/brcmfmac43241b0-sdio.bin base-firmware-root firmware ./libdata/firmware/if_bwfm/brcmfmac43241b4-sdio.bin base-firmware-root firmware @@ -12,8 +12,8 @@ ./libdata/firmware/if_bwfm/brcmfmac43362-sdio.cubietech,cubietruck.txt base-firmware-root firmware ./libdata/firmware/if_bwfm/brcmfmac43362-sdio.lemaker,bananapro.txt base-firmware-root firmware ./libdata/firmware/if_bwfm/brcmfmac4339-sdio.bin base-firmware-root firmware -./libdata/firmware/if_bwfm/brcmfmac43430-sdio.bin base-firmware-root firmware ./libdata/firmware/if_bwfm/brcmfmac43430-sdio.AP6212.txt base-firmware-root firmware +./libdata/firmware/if_bwfm/brcmfmac43430-sdio.bin base-firmware-root firmware ./libdata/firmware/if_bwfm/brcmfmac43430-sdio.raspberrypi,3-model-b.txt base-firmware-root firmware ./libdata/firmware/if_bwfm/brcmfmac43430-sdio.raspberrypi,model-zero-w.txt base-firmware-root firmware ./libdata/firmware/if_bwfm/brcmfmac43430-sdio.sinovoip,bpi-m2-zero.txt base-firmware-root firmware Index: src/distrib/sets/lists/base/mi diff -u src/distrib/sets/lists/base/mi:1.1257 src/distrib/sets/lists/base/mi:1.1258 --- src/distrib/sets/lists/base/mi:1.1257 Thu Aug 20 21:28:00 2020 +++ src/distrib/sets/lists/base/mi
CVS commit: src/distrib/sets/lists/debug
Module Name:src Committed By: riastradh Date: Thu Aug 27 15:30:04 UTC 2020 Modified Files: src/distrib/sets/lists/debug: ad.mips Log Message: Omit spurious leading dash in debug/ad.mips set list entries. (if this actually means something feel free to revert and document what it means somewhere obvious!) To generate a diff of this commit: cvs rdiff -u -r1.74 -r1.75 src/distrib/sets/lists/debug/ad.mips Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/distrib/sets/lists/debug
Module Name:src Committed By: riastradh Date: Thu Aug 27 15:30:04 UTC 2020 Modified Files: src/distrib/sets/lists/debug: ad.mips Log Message: Omit spurious leading dash in debug/ad.mips set list entries. (if this actually means something feel free to revert and document what it means somewhere obvious!) To generate a diff of this commit: cvs rdiff -u -r1.74 -r1.75 src/distrib/sets/lists/debug/ad.mips Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/debug/ad.mips diff -u src/distrib/sets/lists/debug/ad.mips:1.74 src/distrib/sets/lists/debug/ad.mips:1.75 --- src/distrib/sets/lists/debug/ad.mips:1.74 Thu Oct 3 00:59:50 2019 +++ src/distrib/sets/lists/debug/ad.mips Thu Aug 27 15:30:04 2020 @@ -1,9 +1,9 @@ -# $NetBSD: ad.mips,v 1.74 2019/10/03 00:59:50 mrg Exp $ --./usr/libdata/debug/usr/lib/64/libgomp.so.1.3.debug comp-c-debug obsolete --./usr/libdata/debug/usr/lib/64/libgomp.so.2.0.debug comp-c-debug debug,compatfile,gcc=7 --./usr/libdata/debug/usr/lib/64/libgomp.so.2.0.debug comp-c-debug debug,compatfile,gcc=8 +# $NetBSD: ad.mips,v 1.75 2020/08/27 15:30:04 riastradh Exp $ +./usr/libdata/debug/usr/lib/64/libgomp.so.1.3.debug comp-c-debug obsolete +./usr/libdata/debug/usr/lib/64/libgomp.so.2.0.debug comp-c-debug debug,compatfile,gcc=7 +./usr/libdata/debug/usr/lib/64/libgomp.so.2.0.debug comp-c-debug debug,compatfile,gcc=8 ./usr/lib/64/libc_fp_g.acomp-c-debuglib debuglib,softfloat,compat,arch64 --./usr/lib/64/libgomp_g.acomp-c-debuglib debuglib,compat,arch64 +./usr/lib/64/libgomp_g.acomp-c-debuglib debuglib,compat,arch64 ./usr/lib/libc_fp_g.a comp-c-debuglib debuglib,softfloat,arch64 ./usr/lib/o32/libc_fp_g.acomp-c-debuglib debuglib,softfloat,compat,arch64 ./usr/libdata/debug/lib/libc_fp.so.0.0.debug comp-c-debug debug,softfloat,arch64
CVS commit: src/distrib/sets/lists/base
Module Name:src Committed By: riastradh Date: Thu Aug 27 15:28:53 UTC 2020 Modified Files: src/distrib/sets/lists/base: shl.mi Log Message: Fix obsolete entry for /usr/lib/libcdk.so. This was broken in rev. 1.1230. To generate a diff of this commit: cvs rdiff -u -r1.897 -r1.898 src/distrib/sets/lists/base/shl.mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/base/shl.mi diff -u src/distrib/sets/lists/base/shl.mi:1.897 src/distrib/sets/lists/base/shl.mi:1.898 --- src/distrib/sets/lists/base/shl.mi:1.897 Wed Aug 26 16:03:40 2020 +++ src/distrib/sets/lists/base/shl.mi Thu Aug 27 15:28:53 2020 @@ -1,4 +1,4 @@ -# $NetBSD: shl.mi,v 1.897 2020/08/26 16:03:40 riastradh Exp $ +# $NetBSD: shl.mi,v 1.898 2020/08/27 15:28:53 riastradh Exp $ # # Note: Don't delete entries from here - mark them as "obsolete" instead, # unless otherwise stated below. @@ -259,7 +259,7 @@ ./usr/lib/libcbor.sobase-sys-shlib compatfile ./usr/lib/libcbor.so.0base-sys-shlib compatfile ./usr/lib/libcbor.so.0.5 base-sys-shlib compatfile -./usr/usr/lib/libcdk.sobase-obsolete compatfile,obsolete +./usr/lib/libcdk.sobase-obsolete compatfile,obsolete ./usr/lib/libcom_err.sobase-krb5-shlib compatfile,kerberos ./usr/lib/libcom_err.so.8 base-krb5-shlib compatfile,kerberos ./usr/lib/libcom_err.so.8.0 base-krb5-shlib compatfile,kerberos
CVS commit: src/distrib/sets/lists/base
Module Name:src Committed By: riastradh Date: Thu Aug 27 15:28:53 UTC 2020 Modified Files: src/distrib/sets/lists/base: shl.mi Log Message: Fix obsolete entry for /usr/lib/libcdk.so. This was broken in rev. 1.1230. To generate a diff of this commit: cvs rdiff -u -r1.897 -r1.898 src/distrib/sets/lists/base/shl.mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/doc
Module Name:src Committed By: martin Date: Thu Aug 27 14:16:50 UTC 2020 Modified Files: src/doc [netbsd-9]: CHANGES-9.1 Log Message: Ticket #1065 To generate a diff of this commit: cvs rdiff -u -r1.1.2.101 -r1.1.2.102 src/doc/CHANGES-9.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/doc
Module Name:src Committed By: martin Date: Thu Aug 27 14:16:50 UTC 2020 Modified Files: src/doc [netbsd-9]: CHANGES-9.1 Log Message: Ticket #1065 To generate a diff of this commit: cvs rdiff -u -r1.1.2.101 -r1.1.2.102 src/doc/CHANGES-9.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-9.1 diff -u src/doc/CHANGES-9.1:1.1.2.101 src/doc/CHANGES-9.1:1.1.2.102 --- src/doc/CHANGES-9.1:1.1.2.101 Thu Aug 27 09:16:52 2020 +++ src/doc/CHANGES-9.1 Thu Aug 27 14:16:50 2020 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-9.1,v 1.1.2.101 2020/08/27 09:16:52 martin Exp $ +# $NetBSD: CHANGES-9.1,v 1.1.2.102 2020/08/27 14:16:50 martin Exp $ A complete list of changes from the NetBSD 9.0 release to the NetBSD 9.1 release: @@ -4851,3 +4851,9 @@ bin/sh/exec.c 1.54 PR bin/55526: fix "command foo" when a function "foo" exists. [kre, ticket #1064] +sys/dev/usb/ugen.c1.152-1.157 (1.155 via patch) +sys/dev/usb/usbdevices.config 1.41 (via patch) + + Expose Yubikey CCID interface to userland via ugenif. + [riastradh, ticket #1065] +
CVS commit: src/share/man/man9
Module Name:src Committed By: fcambus Date: Thu Aug 27 14:14:00 UTC 2020 Modified Files: src/share/man/man9: condvar.9 ltsleep.9 pci_configure_bus.9 pci_intr.9 timecounter.9 usbdi.9 uvm_map.9 vfsops.9 Log Message: Fix a bunch of typos in various kernel man pages. To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/share/man/man9/condvar.9 cvs rdiff -u -r1.18 -r1.19 src/share/man/man9/ltsleep.9 cvs rdiff -u -r1.19 -r1.20 src/share/man/man9/pci_configure_bus.9 cvs rdiff -u -r1.26 -r1.27 src/share/man/man9/pci_intr.9 cvs rdiff -u -r1.9 -r1.10 src/share/man/man9/timecounter.9 cvs rdiff -u -r1.34 -r1.35 src/share/man/man9/usbdi.9 cvs rdiff -u -r1.11 -r1.12 src/share/man/man9/uvm_map.9 cvs rdiff -u -r1.51 -r1.52 src/share/man/man9/vfsops.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man9
Module Name:src Committed By: fcambus Date: Thu Aug 27 14:14:00 UTC 2020 Modified Files: src/share/man/man9: condvar.9 ltsleep.9 pci_configure_bus.9 pci_intr.9 timecounter.9 usbdi.9 uvm_map.9 vfsops.9 Log Message: Fix a bunch of typos in various kernel man pages. To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/share/man/man9/condvar.9 cvs rdiff -u -r1.18 -r1.19 src/share/man/man9/ltsleep.9 cvs rdiff -u -r1.19 -r1.20 src/share/man/man9/pci_configure_bus.9 cvs rdiff -u -r1.26 -r1.27 src/share/man/man9/pci_intr.9 cvs rdiff -u -r1.9 -r1.10 src/share/man/man9/timecounter.9 cvs rdiff -u -r1.34 -r1.35 src/share/man/man9/usbdi.9 cvs rdiff -u -r1.11 -r1.12 src/share/man/man9/uvm_map.9 cvs rdiff -u -r1.51 -r1.52 src/share/man/man9/vfsops.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/condvar.9 diff -u src/share/man/man9/condvar.9:1.29 src/share/man/man9/condvar.9:1.30 --- src/share/man/man9/condvar.9:1.29 Wed Aug 19 02:19:07 2020 +++ src/share/man/man9/condvar.9 Thu Aug 27 14:14:00 2020 @@ -1,4 +1,4 @@ -.\" $NetBSD: condvar.9,v 1.29 2020/08/19 02:19:07 msaitoh Exp $ +.\" $NetBSD: condvar.9,v 1.30 2020/08/27 14:14:00 fcambus Exp $ .\" .\" Copyright (c) 2006, 2007, 2008, 2020 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -310,7 +310,7 @@ Consuming a resource: /* * Wait for the resource to become available. Timeout after * five seconds. If the resource is not available within the - * alloted time, return an error. + * allotted time, return an error. */ struct bintime timeout = { .sec = 5, .frac = 0 }; while (res->state == BUSY) { Index: src/share/man/man9/ltsleep.9 diff -u src/share/man/man9/ltsleep.9:1.18 src/share/man/man9/ltsleep.9:1.19 --- src/share/man/man9/ltsleep.9:1.18 Sat Mar 18 19:01:01 2017 +++ src/share/man/man9/ltsleep.9 Thu Aug 27 14:14:00 2020 @@ -1,4 +1,4 @@ -.\" $NetBSD: ltsleep.9,v 1.18 2017/03/18 19:01:01 riastradh Exp $ +.\" $NetBSD: ltsleep.9,v 1.19 2020/08/27 14:14:00 fcambus Exp $ .\" .\" Copyright (c) 1996, 2002, 2007 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -223,7 +223,7 @@ and pairs. The .Fn cv_wait* -variant to use can be determinded from looking at the corresponding +variant to use can be determined from looking at the corresponding .Fn tsleep usage. .Pp Index: src/share/man/man9/pci_configure_bus.9 diff -u src/share/man/man9/pci_configure_bus.9:1.19 src/share/man/man9/pci_configure_bus.9:1.20 --- src/share/man/man9/pci_configure_bus.9:1.19 Fri Jul 10 06:28:49 2020 +++ src/share/man/man9/pci_configure_bus.9 Thu Aug 27 14:14:00 2020 @@ -1,4 +1,4 @@ -.\" $NetBSD: pci_configure_bus.9,v 1.19 2020/07/10 06:28:49 wiz Exp $ +.\" $NetBSD: pci_configure_bus.9,v 1.20 2020/08/27 14:14:00 fcambus Exp $ .\" .\" Copyright 2001 Wasabi Systems, Inc. .\" All rights reserved. @@ -192,7 +192,7 @@ address, and size of the resource being The following resource types are supported: .Bl -tag -width PCICONF_RESOURCE_PREFETCHABLE_MEM -offset indent .It Dv PCICONF_RESOURCE_IO -An adddress region used for PCI I/O accesses. +An address region used for PCI I/O accesses. .It Dv PCICONF_RESOURCE_MEM An address region used for PCI memory accesses where reads may have side effects. Index: src/share/man/man9/pci_intr.9 diff -u src/share/man/man9/pci_intr.9:1.26 src/share/man/man9/pci_intr.9:1.27 --- src/share/man/man9/pci_intr.9:1.26 Thu Sep 20 06:48:53 2018 +++ src/share/man/man9/pci_intr.9 Thu Aug 27 14:14:00 2020 @@ -1,4 +1,4 @@ -.\" $NetBSD: pci_intr.9,v 1.26 2018/09/20 06:48:53 rin Exp $ +.\" $NetBSD: pci_intr.9,v 1.27 2020/08/27 14:14:00 fcambus Exp $ .\" .\" Copyright (c) 2000 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -132,7 +132,7 @@ function sets an attribute .Fa attr of the interrupt handler to .Fa data . -Currenty, only the following attribute is supported: +Currently, only the following attribute is supported: .Bl -tag -width PCI_INTR_MPSAFE .It Dv PCI_INTR_MPSAFE If this attribute is set to Index: src/share/man/man9/timecounter.9 diff -u src/share/man/man9/timecounter.9:1.9 src/share/man/man9/timecounter.9:1.10 --- src/share/man/man9/timecounter.9:1.9 Tue Jun 8 05:50:01 2010 +++ src/share/man/man9/timecounter.9 Thu Aug 27 14:14:00 2020 @@ -1,4 +1,4 @@ -.\" $NetBSD: timecounter.9,v 1.9 2010/06/08 05:50:01 jruoho Exp $ +.\" $NetBSD: timecounter.9,v 1.10 2020/08/27 14:14:00 fcambus Exp $ .\" $OpenBSD: tc_init.9,v 1.4 2007/05/31 19:20:01 jmc Exp $ .\" .\" Copyright (c) 2004 Alexander Yurchenko @@ -163,7 +163,7 @@ The .Va bintime format is a binary number, not a pseudo-decimal number, so it can be used as a simple binary counter -without expensive 64 bit arithmetics. +without expensive 64 bit arithmetic. .Sh CODE REFERENCES The timecounter framework is implemented in the file .Pa sys/kern/kern_tc.c . Index: src/share/man/man9/usbdi.9 diff -u
CVS commit: [netbsd-9] src/sys/dev/usb
Module Name:src Committed By: martin Date: Thu Aug 27 14:13:18 UTC 2020 Modified Files: src/sys/dev/usb [netbsd-9]: ugen.c usbdevices.config Log Message: Pull up following revision(s) (requested by riastradh in ticket #1065): sys/dev/usb/usbdevices.config: revision 1.41 (patch) sys/dev/usb/ugen.c: revision 1.152 sys/dev/usb/ugen.c: revision 1.153 sys/dev/usb/ugen.c: revision 1.154 sys/dev/usb/ugen.c: revision 1.155 (patch) sys/dev/usb/ugen.c: revision 1.156 sys/dev/usb/ugen.c: revision 1.157 Remove UGEN_ASLP microoptimization. cv_signal already has this microoptimization. While here, make the lock cover the relevant things we're issuing cv_signal about -- progress toward real MP-safety. Hold the lock over access to the data structures it covers. Still not MPSAFE, but progress. Convert DIAGNOSTIC prints to KASSERTs. Share unit numbering for ugen and ugenif. This way putting ugenif in kernel config actually works to wire it to the /dev/ugenN.MM device nodes in userland. Not a fully fleshed out solution to the ugen problem -- there's no way for a userland driver to kick out a kernel driver and take over, but this will let us, e.g., use uhidev(4) for Yubikey OTP/U2F/FIDO2 but ugen(4), with pcscd(8), for Yubikey CCID. Fix various MP-safety issues while here (still not MPSAFE, but more progress). Expose Yubikey CCID interface to userland via ugenif. Fix sloppy mistakes in previous. 1. Give the offset of the rbnode, not some other random members to overwrite with garbage. 2. Don't try to unlock a mutex at NULL. 3. Make sure all paths out after ugenif_acquire go via ugenif_release. Fix ugen detach after partial attach. While here, register null pmf handler even for partially attached devices so they don't needlessly interfere with suspend. To generate a diff of this commit: cvs rdiff -u -r1.146.2.1 -r1.146.2.2 src/sys/dev/usb/ugen.c cvs rdiff -u -r1.35.4.1 -r1.35.4.2 src/sys/dev/usb/usbdevices.config Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/dev/usb
Module Name:src Committed By: martin Date: Thu Aug 27 14:13:18 UTC 2020 Modified Files: src/sys/dev/usb [netbsd-9]: ugen.c usbdevices.config Log Message: Pull up following revision(s) (requested by riastradh in ticket #1065): sys/dev/usb/usbdevices.config: revision 1.41 (patch) sys/dev/usb/ugen.c: revision 1.152 sys/dev/usb/ugen.c: revision 1.153 sys/dev/usb/ugen.c: revision 1.154 sys/dev/usb/ugen.c: revision 1.155 (patch) sys/dev/usb/ugen.c: revision 1.156 sys/dev/usb/ugen.c: revision 1.157 Remove UGEN_ASLP microoptimization. cv_signal already has this microoptimization. While here, make the lock cover the relevant things we're issuing cv_signal about -- progress toward real MP-safety. Hold the lock over access to the data structures it covers. Still not MPSAFE, but progress. Convert DIAGNOSTIC prints to KASSERTs. Share unit numbering for ugen and ugenif. This way putting ugenif in kernel config actually works to wire it to the /dev/ugenN.MM device nodes in userland. Not a fully fleshed out solution to the ugen problem -- there's no way for a userland driver to kick out a kernel driver and take over, but this will let us, e.g., use uhidev(4) for Yubikey OTP/U2F/FIDO2 but ugen(4), with pcscd(8), for Yubikey CCID. Fix various MP-safety issues while here (still not MPSAFE, but more progress). Expose Yubikey CCID interface to userland via ugenif. Fix sloppy mistakes in previous. 1. Give the offset of the rbnode, not some other random members to overwrite with garbage. 2. Don't try to unlock a mutex at NULL. 3. Make sure all paths out after ugenif_acquire go via ugenif_release. Fix ugen detach after partial attach. While here, register null pmf handler even for partially attached devices so they don't needlessly interfere with suspend. To generate a diff of this commit: cvs rdiff -u -r1.146.2.1 -r1.146.2.2 src/sys/dev/usb/ugen.c cvs rdiff -u -r1.35.4.1 -r1.35.4.2 src/sys/dev/usb/usbdevices.config Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/usb/ugen.c diff -u src/sys/dev/usb/ugen.c:1.146.2.1 src/sys/dev/usb/ugen.c:1.146.2.2 --- src/sys/dev/usb/ugen.c:1.146.2.1 Wed Dec 11 14:56:36 2019 +++ src/sys/dev/usb/ugen.c Thu Aug 27 14:13:18 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: ugen.c,v 1.146.2.1 2019/12/11 14:56:36 martin Exp $ */ +/* $NetBSD: ugen.c,v 1.146.2.2 2020/08/27 14:13:18 martin Exp $ */ /* * Copyright (c) 1998, 2004 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: ugen.c,v 1.146.2.1 2019/12/11 14:56:36 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ugen.c,v 1.146.2.2 2020/08/27 14:13:18 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_compat_netbsd.h" @@ -58,6 +58,8 @@ __KERNEL_RCSID(0, "$NetBSD: ugen.c,v 1.1 #include #include #include +#include +#include #include #include @@ -97,7 +99,6 @@ struct ugen_endpoint { usb_endpoint_descriptor_t *edesc; struct usbd_interface *iface; int state; -#define UGEN_ASLP 0x02 /* waiting for data */ #define UGEN_SHORT_OK 0x04 /* short xfers are OK */ #define UGEN_BULK_RA 0x08 /* in bulk read-ahead mode */ #define UGEN_BULK_WB 0x10 /* in bulk write-behind mode */ @@ -124,6 +125,8 @@ struct ugen_endpoint { struct ugen_softc { device_t sc_dev; /* base device */ struct usbd_device *sc_udev; + struct rb_node sc_node; + unsigned sc_unit; kmutex_t sc_lock; kcondvar_t sc_detach_cv; @@ -136,8 +139,109 @@ struct ugen_softc { int sc_refcnt; char sc_buffer[UGEN_BBSIZE]; u_char sc_dying; + u_char sc_attached; }; +static struct { + kmutex_t lock; + rb_tree_t tree; +} ugenif __cacheline_aligned; + +static int +compare_ugen(void *cookie, const void *vsca, const void *vscb) +{ + const struct ugen_softc *sca = vsca; + const struct ugen_softc *scb = vscb; + + if (sca->sc_unit < scb->sc_unit) + return -1; + if (sca->sc_unit > scb->sc_unit) + return +1; + return 0; +} + +static int +compare_ugen_key(void *cookie, const void *vsc, const void *vk) +{ + const struct ugen_softc *sc = vsc; + const unsigned *k = vk; + + if (sc->sc_unit < *k) + return -1; + if (sc->sc_unit > *k) + return +1; + return 0; +} + +static const rb_tree_ops_t ugenif_tree_ops = { + .rbto_compare_nodes = compare_ugen, + .rbto_compare_key = compare_ugen_key, + .rbto_node_offset = offsetof(struct ugen_softc, sc_node), +}; + +static void +ugenif_get_unit(struct ugen_softc *sc) +{ + struct ugen_softc *sc0; + unsigned i; + + mutex_enter(); + for (i = 0, sc0 = RB_TREE_MIN(); + sc0 != NULL && i == sc0->sc_unit; + i++, sc0 = RB_TREE_NEXT(, sc0)) + KASSERT(i < UINT_MAX); + KASSERT(rb_tree_find_node(, ) == NULL); + sc->sc_unit = i; + sc0 = rb_tree_insert_node(, sc); + KASSERT(sc0 == sc); + KASSERT(rb_tree_find_node(, ) == sc); + mutex_exit(); +} + +static void +ugenif_put_unit(struct ugen_softc *sc) +{ + + mutex_enter(); +
CVS commit: src/sys
Module Name:src Committed By: riastradh Date: Thu Aug 27 14:11:57 UTC 2020 Modified Files: src/sys/kern: kern_sysctl.c src/sys/rump/librump/rumpkern: Makefile.rumpkern src/sys/sys: systm.h Log Message: Sort includes, nix trailing whitespace, fix comment. To generate a diff of this commit: cvs rdiff -u -r1.265 -r1.266 src/sys/kern/kern_sysctl.c cvs rdiff -u -r1.186 -r1.187 src/sys/rump/librump/rumpkern/Makefile.rumpkern cvs rdiff -u -r1.296 -r1.297 src/sys/sys/systm.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys
Module Name:src Committed By: riastradh Date: Thu Aug 27 14:11:57 UTC 2020 Modified Files: src/sys/kern: kern_sysctl.c src/sys/rump/librump/rumpkern: Makefile.rumpkern src/sys/sys: systm.h Log Message: Sort includes, nix trailing whitespace, fix comment. To generate a diff of this commit: cvs rdiff -u -r1.265 -r1.266 src/sys/kern/kern_sysctl.c cvs rdiff -u -r1.186 -r1.187 src/sys/rump/librump/rumpkern/Makefile.rumpkern cvs rdiff -u -r1.296 -r1.297 src/sys/sys/systm.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/kern_sysctl.c diff -u src/sys/kern/kern_sysctl.c:1.265 src/sys/kern/kern_sysctl.c:1.266 --- src/sys/kern/kern_sysctl.c:1.265 Thu Aug 27 14:01:36 2020 +++ src/sys/kern/kern_sysctl.c Thu Aug 27 14:11:57 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_sysctl.c,v 1.265 2020/08/27 14:01:36 riastradh Exp $ */ +/* $NetBSD: kern_sysctl.c,v 1.266 2020/08/27 14:11:57 riastradh Exp $ */ /*- * Copyright (c) 2003, 2007, 2008 The NetBSD Foundation, Inc. @@ -67,8 +67,10 @@ * sysctl system call. */ +#define __COMPAT_SYSCTL + #include -__KERNEL_RCSID(0, "$NetBSD: kern_sysctl.c,v 1.265 2020/08/27 14:01:36 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_sysctl.c,v 1.266 2020/08/27 14:11:57 riastradh Exp $"); #ifdef _KERNEL_OPT #include "opt_defcorename.h" @@ -77,19 +79,20 @@ __KERNEL_RCSID(0, "$NetBSD: kern_sysctl. #include "ksyms.h" #include -#define __COMPAT_SYSCTL -#include -#include +#include + #include +#include +#include #include +#include #include #include -#include #include -#include -#include -#include #include +#include +#include +#include #include @@ -2827,13 +2830,14 @@ static ONCE_DECL(random_inithook); static int random_address_init(void) { + cprng_strong(kern_cprng, address_key, sizeof(address_key), 0); return 0; } void hash_value(void *d, size_t ds, const void *s, size_t ss) -{ +{ RUN_ONCE(_inithook, random_address_init); blake2s(d, ds, address_key, sizeof(address_key), s, ss); Index: src/sys/rump/librump/rumpkern/Makefile.rumpkern diff -u src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.186 src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.187 --- src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.186 Thu Aug 27 14:01:36 2020 +++ src/sys/rump/librump/rumpkern/Makefile.rumpkern Thu Aug 27 14:11:57 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.rumpkern,v 1.186 2020/08/27 14:01:36 riastradh Exp $ +# $NetBSD: Makefile.rumpkern,v 1.187 2020/08/27 14:11:57 riastradh Exp $ # IOCONFDIR:= ${.PARSEDIR} @@ -15,17 +15,17 @@ MAN= rump.3 rump_lwproc.3 ${RUMPTOP}/../uvm \ ${RUMPTOP}/../conf \ ${RUMPTOP}/../dev \ - ${RUMPTOP}/../crypto/nist_hash_drbg \ ${RUMPTOP}/../crypto/blake2\ - ${RUMPTOP}/../crypto/cprng_fast\ ${RUMPTOP}/../crypto/chacha\ + ${RUMPTOP}/../crypto/cprng_fast\ + ${RUMPTOP}/../crypto/nist_hash_drbg \ ${RUMPTOP}/../secmodel \ ${RUMPTOP}/../secmodel/suser\ ${RUMPTOP}/../compat/common # # Source modules, first the ones specifically implemented for librump. -# +# SRCS+= rump.c rumpcopy.c cons.c emul.c etfs_wrap.c intr.c \ lwproc.c klock.c kobj_rename.c ltsleep.c scheduler.c \ signals.c sleepq.c threads.c vm.c hyperentropy.c \ @@ -154,7 +154,7 @@ SRCS+= vnode_if.c # sys/dev SRCS+= clock_subr.c -# sys/dev/crypto +# sys/crypto # Note: these are here only for cprng. More crypto algos for drivers # are available from the rumpkern_crypto component SRCS+= nist_hash_drbg.c Index: src/sys/sys/systm.h diff -u src/sys/sys/systm.h:1.296 src/sys/sys/systm.h:1.297 --- src/sys/sys/systm.h:1.296 Wed Aug 26 22:56:55 2020 +++ src/sys/sys/systm.h Thu Aug 27 14:11:57 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: systm.h,v 1.296 2020/08/26 22:56:55 christos Exp $ */ +/* $NetBSD: systm.h,v 1.297 2020/08/27 14:11:57 riastradh Exp $ */ /*- * Copyright (c) 1982, 1988, 1991, 1993 @@ -225,7 +225,7 @@ enum hashtype { else \ hash_value(, sizeof(dst), &__v, sizeof(__v)); \ } while (/*CONSTCOND*/0) - + void hash_value(void *, size_t, const void *, size_t); bool get_expose_address(struct proc *); void *hashinit(u_int, enum hashtype, bool, u_long *);
CVS commit: src/sys
Module Name:src Committed By: riastradh Date: Thu Aug 27 14:01:36 UTC 2020 Modified Files: src/sys/kern: init_main.c kern_sysctl.c src/sys/rump/kern/lib/libcrypto: Makefile src/sys/rump/librump/rumpkern: Makefile.rumpkern Log Message: Move address hashing from init_main.c to kern_sysctl.c. This way rump gets it automatically. Make sure blake2s is in librumpkern.so, not just in librumpkern_crypto.so, for this to work. To generate a diff of this commit: cvs rdiff -u -r1.528 -r1.529 src/sys/kern/init_main.c cvs rdiff -u -r1.264 -r1.265 src/sys/kern/kern_sysctl.c cvs rdiff -u -r1.20 -r1.21 src/sys/rump/kern/lib/libcrypto/Makefile cvs rdiff -u -r1.185 -r1.186 src/sys/rump/librump/rumpkern/Makefile.rumpkern Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys
Module Name:src Committed By: riastradh Date: Thu Aug 27 14:01:36 UTC 2020 Modified Files: src/sys/kern: init_main.c kern_sysctl.c src/sys/rump/kern/lib/libcrypto: Makefile src/sys/rump/librump/rumpkern: Makefile.rumpkern Log Message: Move address hashing from init_main.c to kern_sysctl.c. This way rump gets it automatically. Make sure blake2s is in librumpkern.so, not just in librumpkern_crypto.so, for this to work. To generate a diff of this commit: cvs rdiff -u -r1.528 -r1.529 src/sys/kern/init_main.c cvs rdiff -u -r1.264 -r1.265 src/sys/kern/kern_sysctl.c cvs rdiff -u -r1.20 -r1.21 src/sys/rump/kern/lib/libcrypto/Makefile cvs rdiff -u -r1.185 -r1.186 src/sys/rump/librump/rumpkern/Makefile.rumpkern Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/init_main.c diff -u src/sys/kern/init_main.c:1.528 src/sys/kern/init_main.c:1.529 --- src/sys/kern/init_main.c:1.528 Wed Aug 26 22:56:55 2020 +++ src/sys/kern/init_main.c Thu Aug 27 14:01:36 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: init_main.c,v 1.528 2020/08/26 22:56:55 christos Exp $ */ +/* $NetBSD: init_main.c,v 1.529 2020/08/27 14:01:36 riastradh Exp $ */ /*- * Copyright (c) 2008, 2009, 2019 The NetBSD Foundation, Inc. @@ -97,7 +97,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.528 2020/08/26 22:56:55 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.529 2020/08/27 14:01:36 riastradh Exp $"); #include "opt_ddb.h" #include "opt_inet.h" @@ -228,8 +228,6 @@ extern void *_binary_splash_image_end; #include -#include - #include extern struct lwp lwp0; @@ -732,24 +730,6 @@ main(void) /* NOTREACHED */ } -static uint8_t address_key[32]; /* key used in address hashing */ -static ONCE_DECL(random_inithook); - -static int -random_address_init(void) -{ - cprng_strong(kern_cprng, address_key, sizeof(address_key), 0); - return 0; -} - -void -hash_value(void *d, size_t ds, const void *s, size_t ss) -{ - - RUN_ONCE(_inithook, random_address_init); - blake2s(d, ds, address_key, sizeof(address_key), s, ss); -} - /* * Configure the system's hardware. */ Index: src/sys/kern/kern_sysctl.c diff -u src/sys/kern/kern_sysctl.c:1.264 src/sys/kern/kern_sysctl.c:1.265 --- src/sys/kern/kern_sysctl.c:1.264 Wed Jul 3 17:31:32 2019 +++ src/sys/kern/kern_sysctl.c Thu Aug 27 14:01:36 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_sysctl.c,v 1.264 2019/07/03 17:31:32 maxv Exp $ */ +/* $NetBSD: kern_sysctl.c,v 1.265 2020/08/27 14:01:36 riastradh Exp $ */ /*- * Copyright (c) 2003, 2007, 2008 The NetBSD Foundation, Inc. @@ -68,7 +68,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_sysctl.c,v 1.264 2019/07/03 17:31:32 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_sysctl.c,v 1.265 2020/08/27 14:01:36 riastradh Exp $"); #ifdef _KERNEL_OPT #include "opt_defcorename.h" @@ -84,11 +84,15 @@ __KERNEL_RCSID(0, "$NetBSD: kern_sysctl. #include #include #include +#include +#include #include #include #include #include +#include + #define MAXDESCLEN 1024 MALLOC_DEFINE(M_SYSCTLNODE, "sysctlnode", "sysctl node structures"); MALLOC_DEFINE(M_SYSCTLDATA, "sysctldata", "misc sysctl data"); @@ -2816,3 +2820,21 @@ sysctl_cvt_out(struct lwp *l, int v, con return (0); } + +static uint8_t address_key[32]; /* key used in address hashing */ +static ONCE_DECL(random_inithook); + +static int +random_address_init(void) +{ + cprng_strong(kern_cprng, address_key, sizeof(address_key), 0); + return 0; +} + +void +hash_value(void *d, size_t ds, const void *s, size_t ss) +{ + + RUN_ONCE(_inithook, random_address_init); + blake2s(d, ds, address_key, sizeof(address_key), s, ss); +} Index: src/sys/rump/kern/lib/libcrypto/Makefile diff -u src/sys/rump/kern/lib/libcrypto/Makefile:1.20 src/sys/rump/kern/lib/libcrypto/Makefile:1.21 --- src/sys/rump/kern/lib/libcrypto/Makefile:1.20 Wed Aug 26 15:49:56 2020 +++ src/sys/rump/kern/lib/libcrypto/Makefile Thu Aug 27 14:01:36 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.20 2020/08/26 15:49:56 riastradh Exp $ +# $NetBSD: Makefile,v 1.21 2020/08/27 14:01:36 riastradh Exp $ # SODIUM_IMPORTDIR=${.CURDIR}/../../../../external/isc/libsodium @@ -6,7 +6,6 @@ SODIUM_DIR=${.CURDIR}/../../../../extern .PATH: ${.CURDIR}/../../../../crypto/adiantum\ ${.CURDIR}/../../../../crypto/aes\ - ${.CURDIR}/../../../../crypto/blake2\ ${.CURDIR}/../../../../crypto/blowfish\ ${.CURDIR}/../../../../crypto/camellia\ ${.CURDIR}/../../../../crypto/cast128\ @@ -57,9 +56,6 @@ SRCS+= des_ecb.c des_setkey.c des_enc.c # skipjack SRCS+= skipjack.c -# BLAKE2 -SRCS+= blake2s.c - # libsodium SODIUM_CPPFLAGS+= -I${SODIUM_IMPORTDIR}/include SODIUM_CPPFLAGS+= -I${SODIUM_IMPORTDIR}/dist/src/libsodium/include/sodium Index: src/sys/rump/librump/rumpkern/Makefile.rumpkern diff -u src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.185
CVS commit: src/tests/net/net
Module Name:src Committed By: christos Date: Thu Aug 27 14:00:01 UTC 2020 Modified Files: src/tests/net/net: t_unix.c Log Message: - when running as root, create the socket under a different uid/gid to verify that it works properly with different users opening the socket. - verify that linux works the same for both getpeereid() and fstat() To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/tests/net/net/t_unix.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/net/net/t_unix.c diff -u src/tests/net/net/t_unix.c:1.20 src/tests/net/net/t_unix.c:1.21 --- src/tests/net/net/t_unix.c:1.20 Wed Aug 26 18:52:58 2020 +++ src/tests/net/net/t_unix.c Thu Aug 27 10:00:01 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: t_unix.c,v 1.20 2020/08/26 22:52:58 christos Exp $ */ +/* $NetBSD: t_unix.c,v 1.21 2020/08/27 14:00:01 christos Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -36,9 +36,10 @@ * POSSIBILITY OF SUCH DAMAGE. */ +#define _GNU_SOURCE #include #ifdef __RCSID -__RCSID("$Id: t_unix.c,v 1.20 2020/08/26 22:52:58 christos Exp $"); +__RCSID("$Id: t_unix.c,v 1.21 2020/08/27 14:00:01 christos Exp $"); #else #define getprogname() argv[0] #endif @@ -58,12 +59,19 @@ __RCSID("$Id: t_unix.c,v 1.20 2020/08/26 #include #include #include +#include #include #include #include #include "test.h" +#define UID 666 +#define GID 999 + +uid_t srvruid, clntuid; +gid_t srvrgid, clntgid; + #define OF offsetof(struct sockaddr_un, sun_path) static void @@ -130,28 +138,42 @@ fail: static int peercred(int s, uid_t *euid, gid_t *egid, pid_t *pid) { +#ifdef SO_PEERCRED + /* Linux */ +# define unpcbid ucred +# define unp_euid uid +# define unp_egid gid +# define unp_pid pid +# define LOCAL_PEEREID SO_PEERCRED +# define LEVEL SOL_SOCKET +#else +# define LEVEL 0 +#endif + #ifdef LOCAL_PEEREID + /* NetBSD */ struct unpcbid cred; socklen_t crl; crl = sizeof(cred); - if (getsockopt(s, 0, LOCAL_PEEREID, , ) == -1) + if (getsockopt(s, LEVEL, LOCAL_PEEREID, , ) == -1) return -1; *euid = cred.unp_euid; *egid = cred.unp_egid; *pid = cred.unp_pid; return 0; #else + /* FreeBSD */ *pid = -1; return getpeereid(s, euid, egid); #endif } static int -check_cred(int fd, bool statit, pid_t checkpid, const char *s) +check_cred(int fd, bool statit, pid_t checkpid, pid_t otherpid, const char *s) { pid_t pid; - uid_t euid; - gid_t egid; + uid_t euid, uid; + gid_t egid, gid; if (statit) { struct stat st; @@ -167,8 +189,28 @@ check_cred(int fd, bool statit, pid_t ch printf("%s(%s) euid=%jd egid=%jd pid=%jd\n", statit ? "fstat" : "peercred", s, (intmax_t)euid, (intmax_t)egid, (intmax_t)pid); - CHECK_EQUAL(euid, geteuid(), s); - CHECK_EQUAL(egid, getegid(), s); + + if (statit) { + if (strcmp(s, "server") == 0) { + uid = srvruid; + gid = srvrgid; + } else { + uid = clntuid; + gid = clntgid; + } + } else { + if (checkpid != otherpid && strcmp(s, "server") == 0) { + uid = clntuid; + gid = clntgid; + } else { + uid = srvruid; + gid = srvrgid; + } + } + fflush(stdout); + + CHECK_EQUAL(euid, uid, s); + CHECK_EQUAL(egid, gid, s); CHECK_EQUAL(pid, checkpid, s); return 0; fail: @@ -187,6 +229,8 @@ test(bool forkit, bool closeit, bool sta socklen_t peer_addrlen; struct sockaddr_un peer_addr; + srvruid = geteuid(); + srvrgid = getegid(); srvrpid = clntpid = getpid(); srvr = socket(AF_UNIX, SOCK_STREAM, 0); if (srvr == -1) @@ -207,6 +251,8 @@ test(bool forkit, bool closeit, bool sta #endif sun->sun_family = AF_UNIX; + unlink(sun->sun_path); + if (bind(srvr, (struct sockaddr *)sun, sl) == -1) { if (errno == EINVAL && sl >= 256) { close(srvr); @@ -214,6 +260,8 @@ test(bool forkit, bool closeit, bool sta } FAIL("bind"); } + if (chmod(sun->sun_path, 0777) == -1) + FAIL("chmod `%s'", sun->sun_path); if (listen(srvr, SOMAXCONN) == -1) FAIL("listen"); @@ -223,10 +271,25 @@ test(bool forkit, bool closeit, bool sta case 0: /* child */ srvrpid = getppid(); clntpid = getpid(); + if (srvruid == 0) { +clntuid = UID; +clntgid = GID; +setgid(clntgid); +setegid(clntgid); +setuid(clntuid); +seteuid(clntuid); + } else { +clntuid = srvruid; +clntgid = srvrgid; + } break; case -1: FAIL("fork"); default: + if (srvruid == 0) { +clntuid = UID; +clntgid = GID; + } break; } } @@ -238,7 +301,7 @@ test(bool forkit, bool closeit, bool sta if (connect(clnt, (const struct sockaddr *)sun, sl) == -1) FAIL("connect"); - check_cred(clnt, statit, srvrpid, "client"); + check_cred(clnt, statit, srvrpid, clntpid, "client"); } @@ -261,7 +324,7 @@ test(bool forkit, bool closeit, bool sta } if (srvrpid == getpid()) { - check_cred(acpt, statit, clntpid, "server"); + check_cred(acpt, statit, clntpid, srvrpid,
CVS commit: src/tests/net/net
Module Name:src Committed By: christos Date: Thu Aug 27 14:00:01 UTC 2020 Modified Files: src/tests/net/net: t_unix.c Log Message: - when running as root, create the socket under a different uid/gid to verify that it works properly with different users opening the socket. - verify that linux works the same for both getpeereid() and fstat() To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/tests/net/net/t_unix.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/net
Module Name:src Committed By: riastradh Date: Thu Aug 27 13:44:41 UTC 2020 Modified Files: src/sys/net: if_wg.c Log Message: wg: Assert MCLBYTES is enough for requested length in wg_get_mbuf. To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/sys/net/if_wg.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/net/if_wg.c diff -u src/sys/net/if_wg.c:1.29 src/sys/net/if_wg.c:1.30 --- src/sys/net/if_wg.c:1.29 Thu Aug 27 03:05:34 2020 +++ src/sys/net/if_wg.c Thu Aug 27 13:44:41 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wg.c,v 1.29 2020/08/27 03:05:34 riastradh Exp $ */ +/* $NetBSD: if_wg.c,v 1.30 2020/08/27 13:44:41 riastradh Exp $ */ /* * Copyright (C) Ryota Ozaki @@ -41,7 +41,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_wg.c,v 1.29 2020/08/27 03:05:34 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_wg.c,v 1.30 2020/08/27 13:44:41 riastradh Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -3637,6 +3637,9 @@ wg_get_mbuf(size_t leading_len, size_t l { struct mbuf *m; + KASSERT(leading_len <= MCLBYTES); + KASSERT(len <= MCLBYTES - leading_len); + m = m_gethdr(M_DONTWAIT, MT_DATA); if (m == NULL) return NULL;
CVS commit: src/sys/net
Module Name:src Committed By: riastradh Date: Thu Aug 27 13:44:41 UTC 2020 Modified Files: src/sys/net: if_wg.c Log Message: wg: Assert MCLBYTES is enough for requested length in wg_get_mbuf. To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/sys/net/if_wg.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/mii
Module Name:src Committed By: kardel Date: Thu Aug 27 10:10:23 UTC 2020 Modified Files: src/sys/dev/mii: mii_physubr.c Log Message: Move mii_phy_statusmsg(sc) back to its original position. Fixes deafness bug on macppc reported and tested by martin@ Thanks ! To generate a diff of this commit: cvs rdiff -u -r1.93 -r1.94 src/sys/dev/mii/mii_physubr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/mii/mii_physubr.c diff -u src/sys/dev/mii/mii_physubr.c:1.93 src/sys/dev/mii/mii_physubr.c:1.94 --- src/sys/dev/mii/mii_physubr.c:1.93 Mon Aug 24 12:46:04 2020 +++ src/sys/dev/mii/mii_physubr.c Thu Aug 27 10:10:23 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: mii_physubr.c,v 1.93 2020/08/24 12:46:04 kardel Exp $ */ +/* $NetBSD: mii_physubr.c,v 1.94 2020/08/27 10:10:23 kardel Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mii_physubr.c,v 1.93 2020/08/24 12:46:04 kardel Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mii_physubr.c,v 1.94 2020/08/27 10:10:23 kardel Exp $"); #include #include @@ -451,10 +451,10 @@ mii_phy_update(struct mii_softc *sc, int if (sc->mii_media_active != mii_media_active || sc->mii_media_status != mii_media_status || cmd == MII_MEDIACHG) { + mii_phy_statusmsg(sc); (*mii->mii_statchg)(mii->mii_ifp); sc->mii_media_active = mii_media_active; sc->mii_media_status = mii_media_status; - mii_phy_statusmsg(sc); } }
CVS commit: src/sys/dev/mii
Module Name:src Committed By: kardel Date: Thu Aug 27 10:10:23 UTC 2020 Modified Files: src/sys/dev/mii: mii_physubr.c Log Message: Move mii_phy_statusmsg(sc) back to its original position. Fixes deafness bug on macppc reported and tested by martin@ Thanks ! To generate a diff of this commit: cvs rdiff -u -r1.93 -r1.94 src/sys/dev/mii/mii_physubr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/cddl/osnet/dist/uts/common/fs/zfs
Module Name:src Committed By: hannken Date: Thu Aug 27 09:57:34 UTC 2020 Modified Files: src/external/cddl/osnet/dist/uts/common/fs/zfs: zfs_vfsops.c zfs_vnops.c zfs_znode.c Log Message: Enable NCLOOKUP for ZFS. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 \ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vfsops.c cvs rdiff -u -r1.69 -r1.70 \ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c cvs rdiff -u -r1.33 -r1.34 \ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_znode.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vfsops.c diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vfsops.c:1.28 src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vfsops.c:1.29 --- src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vfsops.c:1.28 Tue May 26 08:39:27 2020 +++ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vfsops.c Thu Aug 27 09:57:33 2020 @@ -1517,7 +1517,7 @@ zfs_domount(vfs_t *vfsp, char *osname) #endif #ifdef __NetBSD__ vfsp->mnt_flag |= MNT_LOCAL; - vfsp->mnt_iflag |= IMNT_MPSAFE; + vfsp->mnt_iflag |= IMNT_MPSAFE | IMNT_NCLOOKUP; #endif /* @@ -2078,7 +2078,7 @@ zfs_mount(vfs_t *vfsp, const char *path, vfsp->vfs_flag |= MNT_NFS4ACLS; #endif #ifdef __NetBSD__ - vfsp->mnt_iflag |= IMNT_MPSAFE; + vfsp->mnt_iflag |= IMNT_MPSAFE | IMNT_NCLOOKUP; #endif /* Index: src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c:1.69 src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c:1.70 --- src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c:1.69 Thu May 21 20:43:23 2020 +++ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c Thu Aug 27 09:57:33 2020 @@ -1354,6 +1354,10 @@ zfs_write(vnode_t *vp, uio_t *uio, int i newmode = zp->z_mode; (void) sa_update(zp->z_sa_hdl, SA_ZPL_MODE(zfsvfs), (void *), sizeof (uint64_t), tx); +#ifdef __NetBSD__ + cache_enter_id(vp, zp->z_mode, zp->z_uid, zp->z_gid, + true); +#endif } mutex_exit(>z_acl_lock); @@ -5645,8 +5649,11 @@ zfs_netbsd_setattr(void *v) } error = zfs_setattr(vp, (vattr_t *), flags, cred, NULL); - if (error == 0) - VN_KNOTE(vp, NOTE_ATTRIB); + if (error) + return error; + + VN_KNOTE(vp, NOTE_ATTRIB); + cache_enter_id(vp, zp->z_mode, zp->z_uid, zp->z_gid, true); return error; } Index: src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_znode.c diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_znode.c:1.33 src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_znode.c:1.34 --- src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_znode.c:1.33 Thu May 7 09:13:06 2020 +++ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_znode.c Thu Aug 27 09:57:33 2020 @@ -871,6 +871,7 @@ zfs_loadvnode(struct mount *mp, struct v return (SET_ERROR(ENOENT)); } ASSERT(zp == VTOZ(vp)); + cache_enter_id(vp, zp->z_mode, zp->z_uid, zp->z_gid, true); ZFS_OBJ_HOLD_EXIT(zfsvfs, obj_num); @@ -891,6 +892,8 @@ zfs_newvnode(struct mount *mp, vnode_t * zfs_mknode1(dzp, vap, tx, cr, flag, , acl_ids, vp); ASSERT(zp == VTOZ(vp)); + cache_enter_id(vp, zp->z_mode, zp->z_uid, zp->z_gid, true); + *key_len = sizeof(zp->z_id); *new_key = >z_id;
CVS commit: src/external/cddl/osnet/dist/uts/common/fs/zfs
Module Name:src Committed By: hannken Date: Thu Aug 27 09:57:34 UTC 2020 Modified Files: src/external/cddl/osnet/dist/uts/common/fs/zfs: zfs_vfsops.c zfs_vnops.c zfs_znode.c Log Message: Enable NCLOOKUP for ZFS. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 \ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vfsops.c cvs rdiff -u -r1.69 -r1.70 \ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c cvs rdiff -u -r1.33 -r1.34 \ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_znode.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src/sys/dev/mii (PR/kern 55538)
Hi Martin ! That is strange - I didn't expect that, especially as the previous code was wrong with respect to state tracking. Can you check whether the addresses do not have the DEtACHED flag? You could try the dtrace script from the PR - it shows a little bit what is going on. There was also some mii fixing just before my patch, but I assume you testes with reverting just this commit. Sorry for the issue - I have yet to find an explaination for that behavior. Maybe comparing the dtrace outputs for both varainst can shed a light on what happens. Frank On 08/27/20 10:20, Martin Husemann wrote: On Mon, Aug 24, 2020 at 12:46:04PM +, Frank Kardel wrote: Module Name:src Committed By: kardel Date: Mon Aug 24 12:46:04 UTC 2020 Modified Files: src/sys/dev/mii: mii_physubr.c Log Message: Keep the change check invariant intact. The previous code could miss status updates by picking up a new status different from the tested status. This left addresses in the DETACHED state although the link status is already UP again. addresses PR/kern 55538 To generate a diff of this commit: cvs rdiff -u -r1.92 -r1.93 src/sys/dev/mii/mii_physubr.c Hi Frank, this change breaks the network on my macppc, with r1.93 it only seems to be able to send packets, but never receives answers (ARP does not complete, but other hosts see the ARP requests). gem0 at pci2 dev 15 function 0: Apple Computer GMAC Ethernet (rev. 0x01) gem0: interrupting at irq 41 brgphy0 at gem0 phy 0: BCM5411 1000BASE-T media interface, rev. 1 brgphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto gem0: Ethernet address 00:03:93:71:ff:cc, 10KB RX fifo, 4KB TX fifo It is connected to a gige switch: media: Ethernet autoselect (1000baseT full-duplex,master) status: active (which looks the same in the non-working kernel). Any ideas how to debug? Martin
CVS commit: [netbsd-9] src/doc
Module Name:src Committed By: martin Date: Thu Aug 27 09:16:52 UTC 2020 Modified Files: src/doc [netbsd-9]: CHANGES-9.1 Log Message: Tickets #1058, #1060 - #1064 To generate a diff of this commit: cvs rdiff -u -r1.1.2.100 -r1.1.2.101 src/doc/CHANGES-9.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-9.1 diff -u src/doc/CHANGES-9.1:1.1.2.100 src/doc/CHANGES-9.1:1.1.2.101 --- src/doc/CHANGES-9.1:1.1.2.100 Thu Aug 20 16:16:33 2020 +++ src/doc/CHANGES-9.1 Thu Aug 27 09:16:52 2020 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-9.1,v 1.1.2.100 2020/08/20 16:16:33 martin Exp $ +# $NetBSD: CHANGES-9.1,v 1.1.2.101 2020/08/27 09:16:52 martin Exp $ A complete list of changes from the NetBSD 9.0 release to the NetBSD 9.1 release: @@ -4786,3 +4786,68 @@ share/mk/bsd.x11.mk1.133,1.136 Fix unexpanded @foo@ tags in X11 manual pages. [kim, ticket #1059] +sys/dev/nvmm/x86/nvmm_x86.c 1.11-1.14 +sys/dev/nvmm/x86/nvmm_x86.h 1.19 +sys/dev/nvmm/x86/nvmm_x86_svm.c 1.69,1.70 +sys/dev/nvmm/x86/nvmm_x86_vmx.c 1.69,1.71 + + nvmm(4): improve CPUID emulation. + [maxv, ticket #1058] + +sys/arch/sun3/sun3x/pmap.c 1.117 + + Make sure pmap_kenter_pa(9) handles uncached mappings properly. + [tsutsui, ticket #1060] + +xsrc/external/mit/xorg-server/dist/hw/sun/README 1.1 +xsrc/external/mit/xorg-server/dist/hw/sun/Xsun.man 1.1 +xsrc/external/mit/xorg-server/dist/hw/sun/circleset.h 1.1 +xsrc/external/mit/xorg-server/dist/hw/sun/constype.c 1.1 +xsrc/external/mit/xorg-server/dist/hw/sun/constype.man 1.1 +xsrc/external/mit/xorg-server/dist/hw/sun/kbd_mode.c 1.1 +xsrc/external/mit/xorg-server/dist/hw/sun/kbd_mode.man 1.1 +xsrc/external/mit/xorg-server/dist/hw/sun/sun.h 1.1-1.7 +xsrc/external/mit/xorg-server/dist/hw/sun/sunCfb.c 1.1-1.6 +xsrc/external/mit/xorg-server/dist/hw/sun/sunCfb24.c 1.1 +xsrc/external/mit/xorg-server/dist/hw/sun/sunCursor.c 1.1 +xsrc/external/mit/xorg-server/dist/hw/sun/sunFbs.c 1.1-1.3 +xsrc/external/mit/xorg-server/dist/hw/sun/sunGX.c 1.1 +xsrc/external/mit/xorg-server/dist/hw/sun/sunGX.h 1.1 +xsrc/external/mit/xorg-server/dist/hw/sun/sunInit.c 1.1-1.9 +xsrc/external/mit/xorg-server/dist/hw/sun/sunIo.c 1.1-1.5 +xsrc/external/mit/xorg-server/dist/hw/sun/sunKbd.c 1.1-1.7 +xsrc/external/mit/xorg-server/dist/hw/sun/sunKeyMap.c 1.1-1.3 +xsrc/external/mit/xorg-server/dist/hw/sun/sunMfb.c 1.1 +xsrc/external/mit/xorg-server/dist/hw/sun/sunMouse.c 1.1,1.2 +xsrc/external/mit/xorg-server/dist/hw/sun/sunMultiDepth.c 1.1 +distrib/sets/lists/xdebug/md.sun3 1.4 +distrib/sets/lists/xserver/md.sun3 1.16 +external/mit/xorg/server/xorg-server.old/Makefile.common 1.3 +external/mit/xorg/server/xorg-server/Makefile.common 1.28 +external/mit/xorg/server/xorg-server/hw/Makefile 1.6 +external/mit/xorg/server/xorg-server/hw/sun/Makefile 1.1 +external/mit/xorg/server/xorg-server/hw/sun/Makefile.Xsun 1.1-1.4 +external/mit/xorg/server/xorg-server/hw/sun/Xsun/Makefile 1.1 +external/mit/xorg/server/xorg-server/hw/sun/Xsun24/Makefile 1.1 +external/mit/xorg/server/xorg-server/hw/sun/XsunMono/Makefile 1.1 + + Add Xorg 1.20 based Xsun servers for sun3. + [tsutsui, ticket #1061] + +sys/fs/union/union.h1.30 +sys/fs/union/union_subr.c 1.79 +sys/fs/union/union_vnops.c 1.74 + + PR kern/2: fix a panic with union mounts. + [hannken, ticket #1062] + +share/man/man8/afterboot.8 1.63-1.73 + + Improve afterboot(8) documentation. + [nia, ticket #1063] + +bin/sh/exec.c 1.54 + + PR bin/55526: fix "command foo" when a function "foo" exists. + [kre, ticket #1064] +
CVS commit: [netbsd-9] src/doc
Module Name:src Committed By: martin Date: Thu Aug 27 09:16:52 UTC 2020 Modified Files: src/doc [netbsd-9]: CHANGES-9.1 Log Message: Tickets #1058, #1060 - #1064 To generate a diff of this commit: cvs rdiff -u -r1.1.2.100 -r1.1.2.101 src/doc/CHANGES-9.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/bin/sh
Module Name:src Committed By: martin Date: Thu Aug 27 09:15:39 UTC 2020 Modified Files: src/bin/sh [netbsd-9]: exec.c Log Message: Pull up following revision(s) (requested by kre in ticket #1064): bin/sh/exec.c: revision 1.54 PR bin/55526 Fix a bug that has existed since the "command" command was added in 2003. "command foo" would cause the definition of a function "foo" to be lost (not freed, simply discarded) if "foo" is (in addition to being a function) a filesystem command. The case where "foo" is a builtin was handled. For now, when a function exists with the same name as a filesystem command, the latter can never appear in the command hash table, and when used (which can only be via "command foo", just "foo" finds the function) will always result in a full PATH search. XXX pullup everything (from NetBSD 2.0 onwards). (really -8 and -9) To generate a diff of this commit: cvs rdiff -u -r1.53 -r1.53.2.1 src/bin/sh/exec.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/bin/sh
Module Name:src Committed By: martin Date: Thu Aug 27 09:15:39 UTC 2020 Modified Files: src/bin/sh [netbsd-9]: exec.c Log Message: Pull up following revision(s) (requested by kre in ticket #1064): bin/sh/exec.c: revision 1.54 PR bin/55526 Fix a bug that has existed since the "command" command was added in 2003. "command foo" would cause the definition of a function "foo" to be lost (not freed, simply discarded) if "foo" is (in addition to being a function) a filesystem command. The case where "foo" is a builtin was handled. For now, when a function exists with the same name as a filesystem command, the latter can never appear in the command hash table, and when used (which can only be via "command foo", just "foo" finds the function) will always result in a full PATH search. XXX pullup everything (from NetBSD 2.0 onwards). (really -8 and -9) To generate a diff of this commit: cvs rdiff -u -r1.53 -r1.53.2.1 src/bin/sh/exec.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/sh/exec.c diff -u src/bin/sh/exec.c:1.53 src/bin/sh/exec.c:1.53.2.1 --- src/bin/sh/exec.c:1.53 Wed Jul 25 14:42:50 2018 +++ src/bin/sh/exec.c Thu Aug 27 09:15:38 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: exec.c,v 1.53 2018/07/25 14:42:50 kre Exp $ */ +/* $NetBSD: exec.c,v 1.53.2.1 2020/08/27 09:15:38 martin Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)exec.c 8.4 (Berkeley) 6/8/95"; #else -__RCSID("$NetBSD: exec.c,v 1.53 2018/07/25 14:42:50 kre Exp $"); +__RCSID("$NetBSD: exec.c,v 1.53.2.1 2020/08/27 09:15:38 martin Exp $"); #endif #endif /* not lint */ @@ -667,6 +667,10 @@ loop: cmdp = _cmd; } else cmdp = cmdlookup(name, 1); + + if (cmdp->cmdtype == CMDFUNCTION) + cmdp = _cmd; + cmdp->cmdtype = CMDNORMAL; cmdp->param.index = idx; INTON;
CVS commit: [netbsd-9] src/share/man/man8
Module Name:src Committed By: martin Date: Thu Aug 27 09:12:52 UTC 2020 Modified Files: src/share/man/man8 [netbsd-9]: afterboot.8 Log Message: Pull up following revision(s) (requested by nia in ticket #1063): share/man/man8/afterboot.8: revision 1.68 share/man/man8/afterboot.8: revision 1.69 share/man/man8/afterboot.8: revision 1.70 share/man/man8/afterboot.8: revision 1.71 share/man/man8/afterboot.8: revision 1.72 share/man/man8/afterboot.8: revision 1.73 share/man/man8/afterboot.8: revision 1.63 share/man/man8/afterboot.8: revision 1.64 share/man/man8/afterboot.8: revision 1.65 share/man/man8/afterboot.8: revision 1.66 share/man/man8/afterboot.8: revision 1.67 afterboot.8: Explain how connecting to open WiFi works with wpa_supplicant afterboot.8: Explain how to install pkgin on a fresh system afterboot.8: Be clearer about exactly when you might need to login as root afterboot.8: Explain devpubd afterboot.8: Mention mdnsd afterboot.8: Use cdn. Don't be arch specific. Requested by leot. afterboot.8: Correct URL directory order afterboot.8: Use wpa_* for everything WiFi, update links reasoning: ifconfig scan is unreliable while wpa_supplicant is running afterboot.8: Start the daemons after configuring wpa_supplicant. afterboot.8: uname -p, pointed out by various people afterboot.8: If it needs a disclaimer that most people shouldn't do it... To generate a diff of this commit: cvs rdiff -u -r1.62 -r1.62.2.1 src/share/man/man8/afterboot.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/share/man/man8
Module Name:src Committed By: martin Date: Thu Aug 27 09:12:52 UTC 2020 Modified Files: src/share/man/man8 [netbsd-9]: afterboot.8 Log Message: Pull up following revision(s) (requested by nia in ticket #1063): share/man/man8/afterboot.8: revision 1.68 share/man/man8/afterboot.8: revision 1.69 share/man/man8/afterboot.8: revision 1.70 share/man/man8/afterboot.8: revision 1.71 share/man/man8/afterboot.8: revision 1.72 share/man/man8/afterboot.8: revision 1.73 share/man/man8/afterboot.8: revision 1.63 share/man/man8/afterboot.8: revision 1.64 share/man/man8/afterboot.8: revision 1.65 share/man/man8/afterboot.8: revision 1.66 share/man/man8/afterboot.8: revision 1.67 afterboot.8: Explain how connecting to open WiFi works with wpa_supplicant afterboot.8: Explain how to install pkgin on a fresh system afterboot.8: Be clearer about exactly when you might need to login as root afterboot.8: Explain devpubd afterboot.8: Mention mdnsd afterboot.8: Use cdn. Don't be arch specific. Requested by leot. afterboot.8: Correct URL directory order afterboot.8: Use wpa_* for everything WiFi, update links reasoning: ifconfig scan is unreliable while wpa_supplicant is running afterboot.8: Start the daemons after configuring wpa_supplicant. afterboot.8: uname -p, pointed out by various people afterboot.8: If it needs a disclaimer that most people shouldn't do it... To generate a diff of this commit: cvs rdiff -u -r1.62 -r1.62.2.1 src/share/man/man8/afterboot.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man8/afterboot.8 diff -u src/share/man/man8/afterboot.8:1.62 src/share/man/man8/afterboot.8:1.62.2.1 --- src/share/man/man8/afterboot.8:1.62 Tue Jun 18 23:11:05 2019 +++ src/share/man/man8/afterboot.8 Thu Aug 27 09:12:52 2020 @@ -1,4 +1,4 @@ -.\" $NetBSD: afterboot.8,v 1.62 2019/06/18 23:11:05 nia Exp $ +.\" $NetBSD: afterboot.8,v 1.62.2.1 2020/08/27 09:12:52 martin Exp $ .\" $OpenBSD: afterboot.8,v 1.72 2002/02/22 02:02:33 miod Exp $ .\" .\" Originally created by Marshall M. Midden -- 1997-10-20, m...@umn.edu @@ -59,7 +59,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd June 18, 2019 +.Dd August 24, 2020 .Dt AFTERBOOT 8 .Os .Sh NAME @@ -109,7 +109,7 @@ and .Xr security.conf 5 for more details. .Ss Login -Login as +On a fresh install with no other user accounts, login as .Dq Ic root . You can do so on the console, or over the network using .Xr ssh 1 . @@ -357,6 +357,24 @@ As an alternative, compile a new kernel .Dq GATEWAY option. Packets are not forwarded by default, due to RFC requirements. +.Ss Device nodes +By default, nodes are created in +.Pa /dev +for a fairly typical number of devices. +.Pp +However, if this system has a large number of devices connected +(e.g. for large scale storage), you may want to enable +.Xr devpubd 8 +to ensure a sufficient number of nodes are available. +Set +.Dq Va devpubd=YES +in +.Pa /etc/rc.conf +to create nodes automatically during system runtime. +You can also run the node creation script by hand: +.Bd -literal -offset indent +.Ic cd /dev && sh MAKEDEV +.Ed .Ss Secure Shell (SSH) By default, all services are disabled in a fresh .Nx @@ -383,6 +401,16 @@ By default, it will query first, and then the DNS resolver specified in .Pa /etc/resolv.conf . .Pp +Multicast DNS and DNS Service Discovery are usually not enabled by +default on a fresh NetBSD system, and can be enabled by setting +.Dq mdnsd=YES +in +.Pa /etc/rc.conf , +and either rebooting or running the following command: +.Bd -literal -offset indent +.Ic service mdnsd start +.Ed +.Pp If your network does not have a usable DNS resolver, e.g. one provided by DHCP, you can run a local caching recursive resolver by setting .Dq named=YES @@ -403,15 +431,27 @@ Then, to make the system use it, put the nameserver 127.0.0.1 .Ed .Ss Wireless networking -You can scan for nearby wireless networks using: +To configure the system to connect to a wireless network with a password +using WPA: .Bd -literal -offset indent -.Ic ifconfig iwm0 up list scan -.Ic ifconfig iwm0 down +.Ic wpa_passphrase networkname password >> /etc/wpa_supplicant.conf .Ed .Pp -To connect to a wireless network using WPA and DHCP: +To to configure the system to connect to an open wireless network with +no password, edit +.Pa /etc/wpa_supplicant.conf +instead of using +.Xr wpa_passphrase 8 : +.Bd -literal -offset indent +network={ + ssid="Public-WiFi" + key_mgmt=NONE + priority=100 +} +.Ed +.Pp +Then start the necessary daemons: .Bd -literal -offset indent -.Ic wpa_passphrase networkname password >> /etc/wpa_supplicant.conf .Ic service wpa_supplicant onestart .Ic service dhcpcd onestart .Ed @@ -421,6 +461,19 @@ To
CVS commit: [netbsd-9] src/sys/fs/union
Module Name:src Committed By: martin Date: Thu Aug 27 09:08:39 UTC 2020 Modified Files: src/sys/fs/union [netbsd-9]: union.h union_subr.c union_vnops.c Log Message: Pull up following revision(s) (requested by hannken in ticket #1062): sys/fs/union/union.h: revision 1.30 sys/fs/union/union_subr.c: revision 1.79 sys/fs/union/union_vnops.c: revision 1.74 Operation union_readdirhook() stores the lower directory as un_uppervp. This breaks the assumption that un_uppervp->v_mount is the upper mount. Fix by storing the directory as un_lowervp and adapt union_readdir(). Should fix PR kern/2: panic with union mount To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.29.10.1 src/sys/fs/union/union.h cvs rdiff -u -r1.77 -r1.77.8.1 src/sys/fs/union/union_subr.c cvs rdiff -u -r1.70 -r1.70.14.1 src/sys/fs/union/union_vnops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/fs/union/union.h diff -u src/sys/fs/union/union.h:1.29 src/sys/fs/union/union.h:1.29.10.1 --- src/sys/fs/union/union.h:1.29 Mon Jul 17 09:22:36 2017 +++ src/sys/fs/union/union.h Thu Aug 27 09:08:39 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: union.h,v 1.29 2017/07/17 09:22:36 hannken Exp $ */ +/* $NetBSD: union.h,v 1.29.10.1 2020/08/27 09:08:39 martin Exp $ */ /* * Copyright (c) 1994 The Regents of the University of California. @@ -130,6 +130,7 @@ struct union_node { char *un_path; /* v: saved component name */ int un_openl; /* v: # of opens on lowervp */ unsigned int un_cflags; /* c: cache flags */ + bool un_hooknode; /* :: from union_readdirhook */ struct vnode **un_dircache; /* v: cached union stack */ off_t un_uppersz; /* l: size of upper object */ off_t un_lowersz; /* l: size of lower object */ Index: src/sys/fs/union/union_subr.c diff -u src/sys/fs/union/union_subr.c:1.77 src/sys/fs/union/union_subr.c:1.77.8.1 --- src/sys/fs/union/union_subr.c:1.77 Sun Jan 28 15:48:44 2018 +++ src/sys/fs/union/union_subr.c Thu Aug 27 09:08:39 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: union_subr.c,v 1.77 2018/01/28 15:48:44 christos Exp $ */ +/* $NetBSD: union_subr.c,v 1.77.8.1 2020/08/27 09:08:39 martin Exp $ */ /* * Copyright (c) 1994 @@ -72,7 +72,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: union_subr.c,v 1.77 2018/01/28 15:48:44 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: union_subr.c,v 1.77.8.1 2020/08/27 09:08:39 martin Exp $"); #include #include @@ -479,6 +479,7 @@ found: un->un_dircache = 0; un->un_openl = 0; un->un_cflags = 0; + un->un_hooknode = false; un->un_uppersz = VNOVAL; un->un_lowersz = VNOVAL; @@ -1065,7 +1066,7 @@ union_dircache(struct vnode *vp, struct } else { vpp = dircache; do { - if (*vpp++ == VTOUNION(vp)->un_uppervp) + if (*vpp++ == VTOUNION(vp)->un_lowervp) break; } while (*vpp != NULLVP); } @@ -1074,10 +1075,12 @@ union_dircache(struct vnode *vp, struct goto out; vref(*vpp); - error = union_allocvp(, vp->v_mount, NULLVP, NULLVP, 0, *vpp, NULLVP, 0); + error = union_allocvp(, vp->v_mount, NULLVP, NULLVP, 0, + NULLVP, *vpp, 0); if (!error) { vn_lock(nvp, LK_EXCLUSIVE | LK_RETRY); VTOUNION(vp)->un_dircache = 0; + VTOUNION(nvp)->un_hooknode = true; VTOUNION(nvp)->un_dircache = dircache; } Index: src/sys/fs/union/union_vnops.c diff -u src/sys/fs/union/union_vnops.c:1.70 src/sys/fs/union/union_vnops.c:1.70.14.1 --- src/sys/fs/union/union_vnops.c:1.70 Fri May 26 14:21:01 2017 +++ src/sys/fs/union/union_vnops.c Thu Aug 27 09:08:39 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: union_vnops.c,v 1.70 2017/05/26 14:21:01 riastradh Exp $ */ +/* $NetBSD: union_vnops.c,v 1.70.14.1 2020/08/27 09:08:39 martin Exp $ */ /* * Copyright (c) 1992, 1993, 1994, 1995 @@ -72,7 +72,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: union_vnops.c,v 1.70 2017/05/26 14:21:01 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: union_vnops.c,v 1.70.14.1 2020/08/27 09:08:39 martin Exp $"); #include #include @@ -1492,13 +1492,29 @@ union_readdir(void *v) int a_ncookies; } */ *ap = v; struct union_node *un = VTOUNION(ap->a_vp); - struct vnode *uvp = un->un_uppervp; + struct vnode *vp; + int dolock, error; - if (uvp == NULLVP) - return (0); + if (un->un_hooknode) { + KASSERT(un->un_uppervp == NULLVP); + KASSERT(un->un_lowervp != NULLVP); + vp = un->un_lowervp; + dolock = 1; + } else { + vp = un->un_uppervp; + dolock = 0; + } + if (vp == NULLVP) + return 0; - ap->a_vp = uvp; - return (VCALL(uvp, VOFFSET(vop_readdir), ap)); + if (dolock) + vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); + ap->a_vp = vp; + error = VCALL(vp, VOFFSET(vop_readdir), ap); + if (dolock) + VOP_UNLOCK(vp); + + return error; } int
CVS commit: [netbsd-9] src/sys/fs/union
Module Name:src Committed By: martin Date: Thu Aug 27 09:08:39 UTC 2020 Modified Files: src/sys/fs/union [netbsd-9]: union.h union_subr.c union_vnops.c Log Message: Pull up following revision(s) (requested by hannken in ticket #1062): sys/fs/union/union.h: revision 1.30 sys/fs/union/union_subr.c: revision 1.79 sys/fs/union/union_vnops.c: revision 1.74 Operation union_readdirhook() stores the lower directory as un_uppervp. This breaks the assumption that un_uppervp->v_mount is the upper mount. Fix by storing the directory as un_lowervp and adapt union_readdir(). Should fix PR kern/2: panic with union mount To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.29.10.1 src/sys/fs/union/union.h cvs rdiff -u -r1.77 -r1.77.8.1 src/sys/fs/union/union_subr.c cvs rdiff -u -r1.70 -r1.70.14.1 src/sys/fs/union/union_vnops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src
Module Name:src Committed By: martin Date: Thu Aug 27 09:05:37 UTC 2020 Modified Files: src/external/mit/xorg/server/xorg-server [netbsd-9]: Makefile.common src/external/mit/xorg/server/xorg-server.old [netbsd-9]: Makefile.common src/external/mit/xorg/server/xorg-server/hw [netbsd-9]: Makefile Added Files: src/distrib/sets/lists/xdebug [netbsd-9]: md.sun3 src/distrib/sets/lists/xserver [netbsd-9]: md.sun3 src/external/mit/xorg/server/xorg-server/hw/sun [netbsd-9]: Makefile Makefile.Xsun src/external/mit/xorg/server/xorg-server/hw/sun/Xsun [netbsd-9]: Makefile src/external/mit/xorg/server/xorg-server/hw/sun/Xsun24 [netbsd-9]: Makefile src/external/mit/xorg/server/xorg-server/hw/sun/XsunMono [netbsd-9]: Makefile Log Message: Pull up following revision(s) (requested by tsutsui in ticket #1061): distrib/sets/lists/xdebug/md.sun3: revision 1.4 distrib/sets/lists/xserver/md.sun3: revision 1.16 external/mit/xorg/server/xorg-server/hw/sun/Xsun/Makefile: revision 1.1 external/mit/xorg/server/xorg-server/hw/Makefile: revision 1.6 external/mit/xorg/server/xorg-server/hw/sun/Makefile: revision 1.1 external/mit/xorg/server/xorg-server/hw/sun/Xsun24/Makefile: revision 1.1 external/mit/xorg/server/xorg-server/hw/sun/Makefile.Xsun: revision 1.1 external/mit/xorg/server/xorg-server/hw/sun/Makefile.Xsun: revision 1.2 external/mit/xorg/server/xorg-server/hw/sun/Makefile.Xsun: revision 1.3 external/mit/xorg/server/xorg-server/hw/sun/Makefile.Xsun: revision 1.4 external/mit/xorg/server/xorg-server/Makefile.common: revision 1.28 external/mit/xorg/server/xorg-server.old/Makefile.common: revision 1.3 external/mit/xorg/server/xorg-server/hw/sun/XsunMono/Makefile: revision 1.1 Add build glue for Xorg-Server-1.20'fied monolithic Xsun servers. Don't build Xsun servers for sparc and sparc64. Not tested, and maybe not worth for wscons'fied ports. Add .debug binaries for Xsun servers. Note daily build.sh on releng.netbsd.org has MKDEBUG=yes so local test builds should also include it. fix build: - add .../xorg subdir to the path - add dbe and present extensions, both wanted via linkage .. but maybe these shouldn't be built? they're not in sets. Explicitly disable dbe, record, and present DIX extentions. Specify default /var/log/Xsun.%s.log path definitions. To generate a diff of this commit: cvs rdiff -u -r0 -r1.4.2.2 src/distrib/sets/lists/xdebug/md.sun3 cvs rdiff -u -r0 -r1.17.2.2 src/distrib/sets/lists/xserver/md.sun3 cvs rdiff -u -r1.27 -r1.27.16.1 \ src/external/mit/xorg/server/xorg-server/Makefile.common cvs rdiff -u -r1.2 -r1.2.16.1 \ src/external/mit/xorg/server/xorg-server.old/Makefile.common cvs rdiff -u -r1.5 -r1.5.28.1 \ src/external/mit/xorg/server/xorg-server/hw/Makefile cvs rdiff -u -r0 -r1.1.2.2 \ src/external/mit/xorg/server/xorg-server/hw/sun/Makefile cvs rdiff -u -r0 -r1.5.2.2 \ src/external/mit/xorg/server/xorg-server/hw/sun/Makefile.Xsun cvs rdiff -u -r0 -r1.1.2.2 \ src/external/mit/xorg/server/xorg-server/hw/sun/Xsun/Makefile cvs rdiff -u -r0 -r1.1.2.2 \ src/external/mit/xorg/server/xorg-server/hw/sun/Xsun24/Makefile cvs rdiff -u -r0 -r1.1.2.2 \ src/external/mit/xorg/server/xorg-server/hw/sun/XsunMono/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src
Module Name:src Committed By: martin Date: Thu Aug 27 09:05:37 UTC 2020 Modified Files: src/external/mit/xorg/server/xorg-server [netbsd-9]: Makefile.common src/external/mit/xorg/server/xorg-server.old [netbsd-9]: Makefile.common src/external/mit/xorg/server/xorg-server/hw [netbsd-9]: Makefile Added Files: src/distrib/sets/lists/xdebug [netbsd-9]: md.sun3 src/distrib/sets/lists/xserver [netbsd-9]: md.sun3 src/external/mit/xorg/server/xorg-server/hw/sun [netbsd-9]: Makefile Makefile.Xsun src/external/mit/xorg/server/xorg-server/hw/sun/Xsun [netbsd-9]: Makefile src/external/mit/xorg/server/xorg-server/hw/sun/Xsun24 [netbsd-9]: Makefile src/external/mit/xorg/server/xorg-server/hw/sun/XsunMono [netbsd-9]: Makefile Log Message: Pull up following revision(s) (requested by tsutsui in ticket #1061): distrib/sets/lists/xdebug/md.sun3: revision 1.4 distrib/sets/lists/xserver/md.sun3: revision 1.16 external/mit/xorg/server/xorg-server/hw/sun/Xsun/Makefile: revision 1.1 external/mit/xorg/server/xorg-server/hw/Makefile: revision 1.6 external/mit/xorg/server/xorg-server/hw/sun/Makefile: revision 1.1 external/mit/xorg/server/xorg-server/hw/sun/Xsun24/Makefile: revision 1.1 external/mit/xorg/server/xorg-server/hw/sun/Makefile.Xsun: revision 1.1 external/mit/xorg/server/xorg-server/hw/sun/Makefile.Xsun: revision 1.2 external/mit/xorg/server/xorg-server/hw/sun/Makefile.Xsun: revision 1.3 external/mit/xorg/server/xorg-server/hw/sun/Makefile.Xsun: revision 1.4 external/mit/xorg/server/xorg-server/Makefile.common: revision 1.28 external/mit/xorg/server/xorg-server.old/Makefile.common: revision 1.3 external/mit/xorg/server/xorg-server/hw/sun/XsunMono/Makefile: revision 1.1 Add build glue for Xorg-Server-1.20'fied monolithic Xsun servers. Don't build Xsun servers for sparc and sparc64. Not tested, and maybe not worth for wscons'fied ports. Add .debug binaries for Xsun servers. Note daily build.sh on releng.netbsd.org has MKDEBUG=yes so local test builds should also include it. fix build: - add .../xorg subdir to the path - add dbe and present extensions, both wanted via linkage .. but maybe these shouldn't be built? they're not in sets. Explicitly disable dbe, record, and present DIX extentions. Specify default /var/log/Xsun.%s.log path definitions. To generate a diff of this commit: cvs rdiff -u -r0 -r1.4.2.2 src/distrib/sets/lists/xdebug/md.sun3 cvs rdiff -u -r0 -r1.17.2.2 src/distrib/sets/lists/xserver/md.sun3 cvs rdiff -u -r1.27 -r1.27.16.1 \ src/external/mit/xorg/server/xorg-server/Makefile.common cvs rdiff -u -r1.2 -r1.2.16.1 \ src/external/mit/xorg/server/xorg-server.old/Makefile.common cvs rdiff -u -r1.5 -r1.5.28.1 \ src/external/mit/xorg/server/xorg-server/hw/Makefile cvs rdiff -u -r0 -r1.1.2.2 \ src/external/mit/xorg/server/xorg-server/hw/sun/Makefile cvs rdiff -u -r0 -r1.5.2.2 \ src/external/mit/xorg/server/xorg-server/hw/sun/Makefile.Xsun cvs rdiff -u -r0 -r1.1.2.2 \ src/external/mit/xorg/server/xorg-server/hw/sun/Xsun/Makefile cvs rdiff -u -r0 -r1.1.2.2 \ src/external/mit/xorg/server/xorg-server/hw/sun/Xsun24/Makefile cvs rdiff -u -r0 -r1.1.2.2 \ src/external/mit/xorg/server/xorg-server/hw/sun/XsunMono/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/mit/xorg/server/xorg-server/Makefile.common diff -u src/external/mit/xorg/server/xorg-server/Makefile.common:1.27 src/external/mit/xorg/server/xorg-server/Makefile.common:1.27.16.1 --- src/external/mit/xorg/server/xorg-server/Makefile.common:1.27 Fri Aug 19 03:59:30 2016 +++ src/external/mit/xorg/server/xorg-server/Makefile.common Thu Aug 27 09:05:37 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.common,v 1.27 2016/08/19 03:59:30 mrg Exp $ +# $NetBSD: Makefile.common,v 1.27.16.1 2020/08/27 09:05:37 martin Exp $ # These define parts of the Xserver tree that are to be # conditionally compiled for different platforms. See @@ -43,9 +43,9 @@ XSERVER_XPMAX= no # XXX should be yes b .endif .if ${MACHINE} == "sparc" || ${MACHINE} == "sparc64" -XSERVER_XSUN= yes -XSERVER_XSUNMONO= yes -XSERVER_XSUN24= yes +#XSERVER_XSUN= yes +#XSERVER_XSUNMONO= yes +#XSERVER_XSUN24= yes .endif .if ${MACHINE} == "sun3" Index: src/external/mit/xorg/server/xorg-server.old/Makefile.common diff -u src/external/mit/xorg/server/xorg-server.old/Makefile.common:1.2 src/external/mit/xorg/server/xorg-server.old/Makefile.common:1.2.16.1 --- src/external/mit/xorg/server/xorg-server.old/Makefile.common:1.2 Fri Aug 19 03:59:31 2016 +++ src/external/mit/xorg/server/xorg-server.old/Makefile.common Thu Aug 27 09:05:37 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.common,v 1.2 2016/08/19 03:59:31 mrg
CVS commit: [netbsd-9] xsrc/external/mit/xorg-server/dist/hw/sun
Module Name:xsrc Committed By: martin Date: Thu Aug 27 08:53:19 UTC 2020 Added Files: xsrc/external/mit/xorg-server/dist/hw/sun [netbsd-9]: README Xsun.man circleset.h constype.c constype.man kbd_mode.c kbd_mode.man sun.h sunCfb.c sunCfb24.c sunCursor.c sunFbs.c sunGX.c sunGX.h sunInit.c sunIo.c sunKbd.c sunKeyMap.c sunMfb.c sunMouse.c sunMultiDepth.c Log Message: Pull up following revision(s) (requested by tsutsui in ticket #1061): external/mit/xorg-server/dist/hw/sun/sunCfb.c: revision 1.6 external/mit/xorg-server/dist/hw/sun/sunCursor.c: revision 1.1 external/mit/xorg-server/dist/hw/sun/sunInit.c: revision 1.1 external/mit/xorg-server/dist/hw/sun/sunInit.c: revision 1.2 external/mit/xorg-server/dist/hw/sun/sunInit.c: revision 1.3 external/mit/xorg-server/dist/hw/sun/sunInit.c: revision 1.4 external/mit/xorg-server/dist/hw/sun/sunFbs.c: revision 1.1 external/mit/xorg-server/dist/hw/sun/sunCfb24.c: revision 1.1 external/mit/xorg-server/dist/hw/sun/sunInit.c: revision 1.5 external/mit/xorg-server/dist/hw/sun/sunFbs.c: revision 1.2 external/mit/xorg-server/dist/hw/sun/sunMouse.c: revision 1.1 external/mit/xorg-server/dist/hw/sun/sunInit.c: revision 1.6 external/mit/xorg-server/dist/hw/sun/sunGX.c: revision 1.1 external/mit/xorg-server/dist/hw/sun/sunFbs.c: revision 1.3 external/mit/xorg-server/dist/hw/sun/kbd_mode.c: revision 1.1 external/mit/xorg-server/dist/hw/sun/sunMouse.c: revision 1.2 external/mit/xorg-server/dist/hw/sun/sunInit.c: revision 1.7 external/mit/xorg-server/dist/hw/sun/sunInit.c: revision 1.8 external/mit/xorg-server/dist/hw/sun/sunIo.c: revision 1.1 external/mit/xorg-server/dist/hw/sun/sunInit.c: revision 1.9 external/mit/xorg-server/dist/hw/sun/sunGX.h: revision 1.1 external/mit/xorg-server/dist/hw/sun/sunIo.c: revision 1.2 external/mit/xorg-server/dist/hw/sun/sun.h: revision 1.1 external/mit/xorg-server/dist/hw/sun/Xsun.man: revision 1.1 external/mit/xorg-server/dist/hw/sun/sunIo.c: revision 1.3 external/mit/xorg-server/dist/hw/sun/sun.h: revision 1.2 external/mit/xorg-server/dist/hw/sun/sunKeyMap.c: revision 1.1 external/mit/xorg-server/dist/hw/sun/sunIo.c: revision 1.4 external/mit/xorg-server/dist/hw/sun/sun.h: revision 1.3 external/mit/xorg-server/dist/hw/sun/constype.c: revision 1.1 external/mit/xorg-server/dist/hw/sun/sunMultiDepth.c: revision 1.1 external/mit/xorg-server/dist/hw/sun/sunKeyMap.c: revision 1.2 external/mit/xorg-server/dist/hw/sun/sunIo.c: revision 1.5 external/mit/xorg-server/dist/hw/sun/sun.h: revision 1.4 external/mit/xorg-server/dist/hw/sun/sunMfb.c: revision 1.1 external/mit/xorg-server/dist/hw/sun/sunKeyMap.c: revision 1.3 external/mit/xorg-server/dist/hw/sun/sun.h: revision 1.5 external/mit/xorg-server/dist/hw/sun/README: revision 1.1 external/mit/xorg-server/dist/hw/sun/sun.h: revision 1.6 external/mit/xorg-server/dist/hw/sun/sun.h: revision 1.7 external/mit/xorg-server/dist/hw/sun/kbd_mode.man: revision 1.1 external/mit/xorg-server/dist/hw/sun/circleset.h: revision 1.1 external/mit/xorg-server/dist/hw/sun/sunKbd.c: revision 1.1 external/mit/xorg-server/dist/hw/sun/sunKbd.c: revision 1.2 external/mit/xorg-server/dist/hw/sun/sunKbd.c: revision 1.3 external/mit/xorg-server/dist/hw/sun/sunKbd.c: revision 1.4 external/mit/xorg-server/dist/hw/sun/sunKbd.c: revision 1.5 external/mit/xorg-server/dist/hw/sun/sunKbd.c: revision 1.6 external/mit/xorg-server/dist/hw/sun/sunKbd.c: revision 1.7 external/mit/xorg-server/dist/hw/sun/constype.man: revision 1.1 external/mit/xorg-server/dist/hw/sun/sunCfb.c: revision 1.1 external/mit/xorg-server/dist/hw/sun/sunCfb.c: revision 1.2 external/mit/xorg-server/dist/hw/sun/sunCfb.c: revision 1.3 external/mit/xorg-server/dist/hw/sun/sunCfb.c: revision 1.4 external/mit/xorg-server/dist/hw/sun/sunCfb.c: revision 1.5 Import WIP Xorg-Server-1.20'fied monolithic Xsun servers. This is based on 1.10 version imported into xorg-server.old and all upstream API changes between xorg-server 1.10 and 1.20 are applied almost mechanically. https://github.com/tsutsui/xorg-server-Xsun/commits/xorg-server-1.20 Xsun and XsunMono servers are also confirmed working with bwtwo on 3/60 and tme, and cgtwo on tme. XKB stuff is still to be resolved. Use proper ANSI offsetof(3) to specify framebuffer offset in struct. Fixes build error on sparc64. No binary change on sun3. Apply upstream "free the EQ allocated memory on shutdown" fixes. This should be updated before 1.20 import:
Re: CVS commit: src/sys/dev/mii (PR/kern 55538)
On Mon, Aug 24, 2020 at 12:46:04PM +, Frank Kardel wrote: > Module Name: src > Committed By: kardel > Date: Mon Aug 24 12:46:04 UTC 2020 > > Modified Files: > src/sys/dev/mii: mii_physubr.c > > Log Message: > Keep the change check invariant intact. The previous code could miss > status updates by picking up a new status different from the tested > status. This left addresses in the DETACHED state although the > link status is already UP again. > > addresses PR/kern 55538 > > > To generate a diff of this commit: > cvs rdiff -u -r1.92 -r1.93 src/sys/dev/mii/mii_physubr.c Hi Frank, this change breaks the network on my macppc, with r1.93 it only seems to be able to send packets, but never receives answers (ARP does not complete, but other hosts see the ARP requests). gem0 at pci2 dev 15 function 0: Apple Computer GMAC Ethernet (rev. 0x01) gem0: interrupting at irq 41 brgphy0 at gem0 phy 0: BCM5411 1000BASE-T media interface, rev. 1 brgphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto gem0: Ethernet address 00:03:93:71:ff:cc, 10KB RX fifo, 4KB TX fifo It is connected to a gige switch: media: Ethernet autoselect (1000baseT full-duplex,master) status: active (which looks the same in the non-working kernel). Any ideas how to debug? Martin
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Thu Aug 27 07:03:48 UTC 2020 Modified Files: src/usr.bin/make: lst.c parse.c suff.c Log Message: make(1): migrate Lst_Last to Lst_LastS To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/usr.bin/make/lst.c cvs rdiff -u -r1.265 -r1.266 src/usr.bin/make/parse.c cvs rdiff -u -r1.119 -r1.120 src/usr.bin/make/suff.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/make/lst.c diff -u src/usr.bin/make/lst.c:1.45 src/usr.bin/make/lst.c:1.46 --- src/usr.bin/make/lst.c:1.45 Thu Aug 27 07:00:29 2020 +++ src/usr.bin/make/lst.c Thu Aug 27 07:03:48 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: lst.c,v 1.45 2020/08/27 07:00:29 rillig Exp $ */ +/* $NetBSD: lst.c,v 1.46 2020/08/27 07:03:48 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -37,11 +37,11 @@ #include "make.h" #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: lst.c,v 1.45 2020/08/27 07:00:29 rillig Exp $"; +static char rcsid[] = "$NetBSD: lst.c,v 1.46 2020/08/27 07:03:48 rillig Exp $"; #else #include #ifndef lint -__RCSID("$NetBSD: lst.c,v 1.45 2020/08/27 07:00:29 rillig Exp $"); +__RCSID("$NetBSD: lst.c,v 1.46 2020/08/27 07:03:48 rillig Exp $"); #endif /* not lint */ #endif @@ -351,18 +351,6 @@ Lst_FirstS(Lst list) return list->first; } -/* Return the last node from the given list, or NULL if the list is empty or - * invalid. */ -LstNode -Lst_Last(Lst list) -{ -if (!LstIsValid(list) || LstIsEmpty(list)) { - return NULL; -} else { - return list->last; -} -} - /* Return the last node from the given list, or NULL if the list is empty. */ LstNode Lst_LastS(Lst list) Index: src/usr.bin/make/parse.c diff -u src/usr.bin/make/parse.c:1.265 src/usr.bin/make/parse.c:1.266 --- src/usr.bin/make/parse.c:1.265 Thu Aug 27 06:53:57 2020 +++ src/usr.bin/make/parse.c Thu Aug 27 07:03:48 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: parse.c,v 1.265 2020/08/27 06:53:57 rillig Exp $ */ +/* $NetBSD: parse.c,v 1.266 2020/08/27 07:03:48 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,14 +69,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: parse.c,v 1.265 2020/08/27 06:53:57 rillig Exp $"; +static char rcsid[] = "$NetBSD: parse.c,v 1.266 2020/08/27 07:03:48 rillig Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)parse.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: parse.c,v 1.265 2020/08/27 06:53:57 rillig Exp $"); +__RCSID("$NetBSD: parse.c,v 1.266 2020/08/27 07:03:48 rillig Exp $"); #endif #endif /* not lint */ #endif @@ -2088,7 +2088,7 @@ ParseAddCmd(void *gnp, void *cmd) /* Add to last (ie current) cohort for :: targets */ if ((gn->type & OP_DOUBLEDEP) && !Lst_IsEmpty(gn->cohorts)) - gn = Lst_DatumS(Lst_Last(gn->cohorts)); + gn = Lst_DatumS(Lst_LastS(gn->cohorts)); /* if target already supplied, ignore commands */ if (!(gn->type & OP_HAS_COMMANDS)) { Index: src/usr.bin/make/suff.c diff -u src/usr.bin/make/suff.c:1.119 src/usr.bin/make/suff.c:1.120 --- src/usr.bin/make/suff.c:1.119 Thu Aug 27 07:00:29 2020 +++ src/usr.bin/make/suff.c Thu Aug 27 07:03:48 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: suff.c,v 1.119 2020/08/27 07:00:29 rillig Exp $ */ +/* $NetBSD: suff.c,v 1.120 2020/08/27 07:03:48 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,14 +69,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: suff.c,v 1.119 2020/08/27 07:00:29 rillig Exp $"; +static char rcsid[] = "$NetBSD: suff.c,v 1.120 2020/08/27 07:03:48 rillig Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)suff.c 8.4 (Berkeley) 3/21/94"; #else -__RCSID("$NetBSD: suff.c,v 1.119 2020/08/27 07:00:29 rillig Exp $"); +__RCSID("$NetBSD: suff.c,v 1.120 2020/08/27 07:03:48 rillig Exp $"); #endif #endif /* not lint */ #endif @@ -776,7 +776,7 @@ Suff_EndTransform(void *gnp, void *dummy GNode *gn = (GNode *)gnp; if ((gn->type & OP_DOUBLEDEP) && !Lst_IsEmpty(gn->cohorts)) - gn = Lst_DatumS(Lst_Last(gn->cohorts)); + gn = Lst_DatumS(Lst_LastS(gn->cohorts)); if ((gn->type & OP_TRANSFORM) && Lst_IsEmpty(gn->commands) && Lst_IsEmpty(gn->children)) { @@ -1836,7 +1836,7 @@ SuffApplyTransform(GNode *tGn, GNode *sG /* * Record last child for expansion purposes */ -ln = Lst_Last(tGn->children); +ln = Lst_LastS(tGn->children); /* * Pass the buck to Make_HandleUse to apply the rule
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Thu Aug 27 07:03:48 UTC 2020 Modified Files: src/usr.bin/make: lst.c parse.c suff.c Log Message: make(1): migrate Lst_Last to Lst_LastS To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/usr.bin/make/lst.c cvs rdiff -u -r1.265 -r1.266 src/usr.bin/make/parse.c cvs rdiff -u -r1.119 -r1.120 src/usr.bin/make/suff.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Thu Aug 27 07:00:30 UTC 2020 Modified Files: src/usr.bin/make: dir.c job.c lst.c lst.h main.c meta.c suff.c Log Message: make(1): migrate Lst_Succ to Lst_SuccS To generate a diff of this commit: cvs rdiff -u -r1.113 -r1.114 src/usr.bin/make/dir.c cvs rdiff -u -r1.217 -r1.218 src/usr.bin/make/job.c cvs rdiff -u -r1.44 -r1.45 src/usr.bin/make/lst.c cvs rdiff -u -r1.47 -r1.48 src/usr.bin/make/lst.h cvs rdiff -u -r1.315 -r1.316 src/usr.bin/make/main.c cvs rdiff -u -r1.101 -r1.102 src/usr.bin/make/meta.c cvs rdiff -u -r1.118 -r1.119 src/usr.bin/make/suff.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Thu Aug 27 07:00:30 UTC 2020 Modified Files: src/usr.bin/make: dir.c job.c lst.c lst.h main.c meta.c suff.c Log Message: make(1): migrate Lst_Succ to Lst_SuccS To generate a diff of this commit: cvs rdiff -u -r1.113 -r1.114 src/usr.bin/make/dir.c cvs rdiff -u -r1.217 -r1.218 src/usr.bin/make/job.c cvs rdiff -u -r1.44 -r1.45 src/usr.bin/make/lst.c cvs rdiff -u -r1.47 -r1.48 src/usr.bin/make/lst.h cvs rdiff -u -r1.315 -r1.316 src/usr.bin/make/main.c cvs rdiff -u -r1.101 -r1.102 src/usr.bin/make/meta.c cvs rdiff -u -r1.118 -r1.119 src/usr.bin/make/suff.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/make/dir.c diff -u src/usr.bin/make/dir.c:1.113 src/usr.bin/make/dir.c:1.114 --- src/usr.bin/make/dir.c:1.113 Thu Aug 27 06:53:57 2020 +++ src/usr.bin/make/dir.c Thu Aug 27 07:00:29 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: dir.c,v 1.113 2020/08/27 06:53:57 rillig Exp $ */ +/* $NetBSD: dir.c,v 1.114 2020/08/27 07:00:29 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: dir.c,v 1.113 2020/08/27 06:53:57 rillig Exp $"; +static char rcsid[] = "$NetBSD: dir.c,v 1.114 2020/08/27 07:00:29 rillig Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)dir.c 8.2 (Berkeley) 1/2/94"; #else -__RCSID("$NetBSD: dir.c,v 1.113 2020/08/27 06:53:57 rillig Exp $"); +__RCSID("$NetBSD: dir.c,v 1.114 2020/08/27 07:00:29 rillig Exp $"); #endif #endif /* not lint */ #endif @@ -1764,7 +1764,7 @@ Dir_Concat(Lst path1, Lst path2) LstNode ln; Path *p; -for (ln = Lst_First(path2); ln != NULL; ln = Lst_Succ(ln)) { +for (ln = Lst_First(path2); ln != NULL; ln = Lst_SuccS(ln)) { p = Lst_DatumS(ln); if (Lst_MemberS(path1, p) == NULL) { p->refCount += 1; Index: src/usr.bin/make/job.c diff -u src/usr.bin/make/job.c:1.217 src/usr.bin/make/job.c:1.218 --- src/usr.bin/make/job.c:1.217 Thu Aug 27 06:53:57 2020 +++ src/usr.bin/make/job.c Thu Aug 27 07:00:29 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: job.c,v 1.217 2020/08/27 06:53:57 rillig Exp $ */ +/* $NetBSD: job.c,v 1.218 2020/08/27 07:00:29 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: job.c,v 1.217 2020/08/27 06:53:57 rillig Exp $"; +static char rcsid[] = "$NetBSD: job.c,v 1.218 2020/08/27 07:00:29 rillig Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)job.c 8.2 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: job.c,v 1.217 2020/08/27 06:53:57 rillig Exp $"); +__RCSID("$NetBSD: job.c,v 1.218 2020/08/27 07:00:29 rillig Exp $"); #endif #endif /* not lint */ #endif @@ -711,7 +711,7 @@ JobPrintCommand(void *cmdp, void *jobp) job->node->type |= OP_SAVE_CMDS; if ((job->flags & JOB_IGNDOTS) == 0) { LstNode dotsNode = Lst_MemberS(job->node->commands, cmd); - job->tailCmds = Lst_Succ(dotsNode); + job->tailCmds = dotsNode != NULL ? Lst_SuccS(dotsNode) : NULL; return 1; } return 0; Index: src/usr.bin/make/lst.c diff -u src/usr.bin/make/lst.c:1.44 src/usr.bin/make/lst.c:1.45 --- src/usr.bin/make/lst.c:1.44 Thu Aug 27 06:53:57 2020 +++ src/usr.bin/make/lst.c Thu Aug 27 07:00:29 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: lst.c,v 1.44 2020/08/27 06:53:57 rillig Exp $ */ +/* $NetBSD: lst.c,v 1.45 2020/08/27 07:00:29 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -37,11 +37,11 @@ #include "make.h" #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: lst.c,v 1.44 2020/08/27 06:53:57 rillig Exp $"; +static char rcsid[] = "$NetBSD: lst.c,v 1.45 2020/08/27 07:00:29 rillig Exp $"; #else #include #ifndef lint -__RCSID("$NetBSD: lst.c,v 1.44 2020/08/27 06:53:57 rillig Exp $"); +__RCSID("$NetBSD: lst.c,v 1.45 2020/08/27 07:00:29 rillig Exp $"); #endif /* not lint */ #endif @@ -374,17 +374,6 @@ Lst_LastS(Lst list) /* Return the successor to the given node on its list, or NULL. */ LstNode -Lst_Succ(LstNode node) -{ -if (node == NULL) { - return NULL; -} else { - return node->next; -} -} - -/* Return the successor to the given node on its list, or NULL. */ -LstNode Lst_SuccS(LstNode node) { assert(LstNodeIsValid(node)); Index: src/usr.bin/make/lst.h diff -u src/usr.bin/make/lst.h:1.47 src/usr.bin/make/lst.h:1.48 --- src/usr.bin/make/lst.h:1.47 Thu Aug 27 06:53:57 2020 +++ src/usr.bin/make/lst.h Thu Aug 27 07:00:29 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: lst.h,v 1.47 2020/08/27 06:53:57 rillig Exp $ */ +/* $NetBSD: lst.h,v 1.48 2020/08/27 07:00:29 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -138,7 +138,6 @@ LstNode Lst_FirstS(Lst); LstNode Lst_Last(Lst); LstNode Lst_LastS(Lst); /* Return
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Thu Aug 27 06:53:57 UTC 2020 Modified Files: src/usr.bin/make: compat.c dir.c job.c lst.c lst.h main.c make.c meta.c parse.c suff.c targ.c Log Message: make(1): migrate Lst_ForEach to Lst_ForEachS Most lists are always valid. Only the "targets" variable may be null in some cases, probably. To generate a diff of this commit: cvs rdiff -u -r1.129 -r1.130 src/usr.bin/make/compat.c cvs rdiff -u -r1.112 -r1.113 src/usr.bin/make/dir.c cvs rdiff -u -r1.216 -r1.217 src/usr.bin/make/job.c cvs rdiff -u -r1.43 -r1.44 src/usr.bin/make/lst.c cvs rdiff -u -r1.46 -r1.47 src/usr.bin/make/lst.h cvs rdiff -u -r1.314 -r1.315 src/usr.bin/make/main.c cvs rdiff -u -r1.125 -r1.126 src/usr.bin/make/make.c cvs rdiff -u -r1.100 -r1.101 src/usr.bin/make/meta.c cvs rdiff -u -r1.264 -r1.265 src/usr.bin/make/parse.c cvs rdiff -u -r1.117 -r1.118 src/usr.bin/make/suff.c cvs rdiff -u -r1.73 -r1.74 src/usr.bin/make/targ.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Thu Aug 27 06:53:57 UTC 2020 Modified Files: src/usr.bin/make: compat.c dir.c job.c lst.c lst.h main.c make.c meta.c parse.c suff.c targ.c Log Message: make(1): migrate Lst_ForEach to Lst_ForEachS Most lists are always valid. Only the "targets" variable may be null in some cases, probably. To generate a diff of this commit: cvs rdiff -u -r1.129 -r1.130 src/usr.bin/make/compat.c cvs rdiff -u -r1.112 -r1.113 src/usr.bin/make/dir.c cvs rdiff -u -r1.216 -r1.217 src/usr.bin/make/job.c cvs rdiff -u -r1.43 -r1.44 src/usr.bin/make/lst.c cvs rdiff -u -r1.46 -r1.47 src/usr.bin/make/lst.h cvs rdiff -u -r1.314 -r1.315 src/usr.bin/make/main.c cvs rdiff -u -r1.125 -r1.126 src/usr.bin/make/make.c cvs rdiff -u -r1.100 -r1.101 src/usr.bin/make/meta.c cvs rdiff -u -r1.264 -r1.265 src/usr.bin/make/parse.c cvs rdiff -u -r1.117 -r1.118 src/usr.bin/make/suff.c cvs rdiff -u -r1.73 -r1.74 src/usr.bin/make/targ.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/make/compat.c diff -u src/usr.bin/make/compat.c:1.129 src/usr.bin/make/compat.c:1.130 --- src/usr.bin/make/compat.c:1.129 Sun Aug 23 19:00:19 2020 +++ src/usr.bin/make/compat.c Thu Aug 27 06:53:57 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: compat.c,v 1.129 2020/08/23 19:00:19 rillig Exp $ */ +/* $NetBSD: compat.c,v 1.130 2020/08/27 06:53:57 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: compat.c,v 1.129 2020/08/23 19:00:19 rillig Exp $"; +static char rcsid[] = "$NetBSD: compat.c,v 1.130 2020/08/27 06:53:57 rillig Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)compat.c 8.2 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: compat.c,v 1.129 2020/08/23 19:00:19 rillig Exp $"); +__RCSID("$NetBSD: compat.c,v 1.130 2020/08/27 06:53:57 rillig Exp $"); #endif #endif /* not lint */ #endif @@ -532,7 +532,7 @@ Compat_Make(void *gnp, void *pgnp) gn->made = BEINGMADE; if ((gn->type & OP_MADE) == 0) Suff_FindDeps(gn); - Lst_ForEach(gn->children, Compat_Make, gn); + Lst_ForEachS(gn->children, Compat_Make, gn); if ((gn->flags & REMAKE) == 0) { gn->made = ABORTED; pgn->flags &= ~(unsigned)REMAKE; @@ -602,7 +602,7 @@ Compat_Make(void *gnp, void *pgnp) meta_job_start(NULL, gn); } #endif - Lst_ForEach(gn->commands, CompatRunCommand, gn); + Lst_ForEachS(gn->commands, CompatRunCommand, gn); curTarg = NULL; } else { Job_Touch(gn, gn->type & OP_SILENT); @@ -671,7 +671,7 @@ Compat_Make(void *gnp, void *pgnp) } cohorts: -Lst_ForEach(gn->cohorts, Compat_Make, pgnp); +Lst_ForEachS(gn->cohorts, Compat_Make, pgnp); return 0; } Index: src/usr.bin/make/dir.c diff -u src/usr.bin/make/dir.c:1.112 src/usr.bin/make/dir.c:1.113 --- src/usr.bin/make/dir.c:1.112 Thu Aug 27 06:28:44 2020 +++ src/usr.bin/make/dir.c Thu Aug 27 06:53:57 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: dir.c,v 1.112 2020/08/27 06:28:44 rillig Exp $ */ +/* $NetBSD: dir.c,v 1.113 2020/08/27 06:53:57 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: dir.c,v 1.112 2020/08/27 06:28:44 rillig Exp $"; +static char rcsid[] = "$NetBSD: dir.c,v 1.113 2020/08/27 06:53:57 rillig Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)dir.c 8.2 (Berkeley) 1/2/94"; #else -__RCSID("$NetBSD: dir.c,v 1.112 2020/08/27 06:28:44 rillig Exp $"); +__RCSID("$NetBSD: dir.c,v 1.113 2020/08/27 06:53:57 rillig Exp $"); #endif #endif /* not lint */ #endif @@ -924,7 +924,7 @@ Dir_Expand(const char *word, Lst path, L } } if (DEBUG(DIR)) { - Lst_ForEach(expansions, DirPrintWord, NULL); + Lst_ForEachS(expansions, DirPrintWord, NULL); fprintf(debug_file, "\n"); } } @@ -1811,5 +1811,5 @@ DirPrintDir(void *p, void *dummy MAKE_AT void Dir_PrintPath(Lst path) { -Lst_ForEach(path, DirPrintDir, NULL); +Lst_ForEachS(path, DirPrintDir, NULL); } Index: src/usr.bin/make/job.c diff -u src/usr.bin/make/job.c:1.216 src/usr.bin/make/job.c:1.217 --- src/usr.bin/make/job.c:1.216 Thu Aug 27 06:31:46 2020 +++ src/usr.bin/make/job.c Thu Aug 27 06:53:57 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: job.c,v 1.216 2020/08/27 06:31:46 rillig Exp $ */ +/* $NetBSD: job.c,v 1.217 2020/08/27 06:53:57 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: job.c,v 1.216 2020/08/27 06:31:46 rillig Exp $"; +static char rcsid[] = "$NetBSD: job.c,v 1.217 2020/08/27 06:53:57 rillig Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)job.c 8.2 (Berkeley) 3/19/94"; #else
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Thu Aug 27 06:31:46 UTC 2020 Modified Files: src/usr.bin/make: job.c make.c Log Message: make(1): migrate Lst_ForEachFrom to Lst_ForEachFromS To generate a diff of this commit: cvs rdiff -u -r1.215 -r1.216 src/usr.bin/make/job.c cvs rdiff -u -r1.124 -r1.125 src/usr.bin/make/make.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Thu Aug 27 06:31:46 UTC 2020 Modified Files: src/usr.bin/make: job.c make.c Log Message: make(1): migrate Lst_ForEachFrom to Lst_ForEachFromS To generate a diff of this commit: cvs rdiff -u -r1.215 -r1.216 src/usr.bin/make/job.c cvs rdiff -u -r1.124 -r1.125 src/usr.bin/make/make.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/make/job.c diff -u src/usr.bin/make/job.c:1.215 src/usr.bin/make/job.c:1.216 --- src/usr.bin/make/job.c:1.215 Sun Aug 23 18:26:35 2020 +++ src/usr.bin/make/job.c Thu Aug 27 06:31:46 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: job.c,v 1.215 2020/08/23 18:26:35 rillig Exp $ */ +/* $NetBSD: job.c,v 1.216 2020/08/27 06:31:46 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: job.c,v 1.215 2020/08/23 18:26:35 rillig Exp $"; +static char rcsid[] = "$NetBSD: job.c,v 1.216 2020/08/27 06:31:46 rillig Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)job.c 8.2 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: job.c,v 1.215 2020/08/23 18:26:35 rillig Exp $"); +__RCSID("$NetBSD: job.c,v 1.216 2020/08/27 06:31:46 rillig Exp $"); #endif #endif /* not lint */ #endif @@ -1101,9 +1101,9 @@ JobFinish(Job *job, int status) * on the .END target. */ if (job->tailCmds != NULL) { - Lst_ForEachFrom(job->node->commands, job->tailCmds, + Lst_ForEachFromS(job->node->commands, job->tailCmds, JobSaveCommand, - job->node); + job->node); } job->node->made = MADE; if (!(job->flags & JOB_SPECIAL)) @@ -1724,9 +1724,9 @@ JobStart(GNode *gn, int flags) */ if (cmdsOK && aborting == 0) { if (job->tailCmds != NULL) { - Lst_ForEachFrom(job->node->commands, job->tailCmds, -JobSaveCommand, - job->node); + Lst_ForEachFromS(job->node->commands, job->tailCmds, + JobSaveCommand, + job->node); } job->node->made = MADE; Make_Update(job->node); Index: src/usr.bin/make/make.c diff -u src/usr.bin/make/make.c:1.124 src/usr.bin/make/make.c:1.125 --- src/usr.bin/make/make.c:1.124 Wed Aug 26 22:55:46 2020 +++ src/usr.bin/make/make.c Thu Aug 27 06:31:46 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: make.c,v 1.124 2020/08/26 22:55:46 rillig Exp $ */ +/* $NetBSD: make.c,v 1.125 2020/08/27 06:31:46 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,14 +69,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: make.c,v 1.124 2020/08/26 22:55:46 rillig Exp $"; +static char rcsid[] = "$NetBSD: make.c,v 1.125 2020/08/27 06:31:46 rillig Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)make.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: make.c,v 1.124 2020/08/26 22:55:46 rillig Exp $"); +__RCSID("$NetBSD: make.c,v 1.125 2020/08/27 06:31:46 rillig Exp $"); #endif #endif /* not lint */ #endif @@ -1456,7 +1456,7 @@ Make_ProcessWait(Lst targs) cgn = Lst_DatumS(ln); if (cgn->type & OP_WAIT) { /* Make the .WAIT node depend on the previous children */ - Lst_ForEachFrom(pgn->children, owln, add_wait_dep, cgn); + Lst_ForEachFromS(pgn->children, owln, add_wait_dep, cgn); owln = ln; } else { Lst_AppendS(examine, cgn);
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Thu Aug 27 06:28:44 UTC 2020 Modified Files: src/usr.bin/make: dir.c lst.c lst.h Log Message: make(1): migrate remaining code from Lst_Open to Lst_OpenS To generate a diff of this commit: cvs rdiff -u -r1.111 -r1.112 src/usr.bin/make/dir.c cvs rdiff -u -r1.42 -r1.43 src/usr.bin/make/lst.c cvs rdiff -u -r1.45 -r1.46 src/usr.bin/make/lst.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/make/dir.c diff -u src/usr.bin/make/dir.c:1.111 src/usr.bin/make/dir.c:1.112 --- src/usr.bin/make/dir.c:1.111 Wed Aug 26 22:55:46 2020 +++ src/usr.bin/make/dir.c Thu Aug 27 06:28:44 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: dir.c,v 1.111 2020/08/26 22:55:46 rillig Exp $ */ +/* $NetBSD: dir.c,v 1.112 2020/08/27 06:28:44 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: dir.c,v 1.111 2020/08/26 22:55:46 rillig Exp $"; +static char rcsid[] = "$NetBSD: dir.c,v 1.112 2020/08/27 06:28:44 rillig Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)dir.c 8.2 (Berkeley) 1/2/94"; #else -__RCSID("$NetBSD: dir.c,v 1.111 2020/08/26 22:55:46 rillig Exp $"); +__RCSID("$NetBSD: dir.c,v 1.112 2020/08/27 06:28:44 rillig Exp $"); #endif #endif /* not lint */ #endif @@ -795,13 +795,12 @@ DirExpandInt(const char *word, Lst path, { LstNode ln; /* Current node */ -if (Lst_Open(path) == SUCCESS) { - while ((ln = Lst_NextS(path)) != NULL) { - Path *p = Lst_DatumS(ln); - DirMatchFiles(word, p, expansions); - } - Lst_CloseS(path); +Lst_OpenS(path); +while ((ln = Lst_NextS(path)) != NULL) { + Path *p = Lst_DatumS(ln); + DirMatchFiles(word, p, expansions); } +Lst_CloseS(path); } /* Print a word in the list of expansions. @@ -840,6 +839,9 @@ Dir_Expand(const char *word, Lst path, L { const char *cp; +assert(path != NULL); +assert(expansions != NULL); + DIR_DEBUG1("Expanding \"%s\"... ", word); cp = strchr(word, '{'); @@ -1128,12 +1130,13 @@ Dir_FindFile(const char *name, Lst path) DIR_DEBUG1("Searching for %s ...", name); -if (Lst_Open(path) == FAILURE) { +if (path == NULL) { DIR_DEBUG0("couldn't open path, file not found\n"); misses += 1; return NULL; } +Lst_OpenS(path); if ((ln = Lst_First(path)) != NULL) { p = Lst_DatumS(ln); if (p == dotLast) { @@ -1660,7 +1663,8 @@ Dir_MakeFlags(const char *flag, Lst path Buf_Init(, 0); -if (Lst_Open(path) == SUCCESS) { +if (path != NULL) { + Lst_OpenS(path); while ((ln = Lst_NextS(path)) != NULL) { Path *p = Lst_DatumS(ln); Buf_AddStr(, " "); @@ -1780,7 +1784,6 @@ void Dir_PrintDirectories(void) { LstNode ln; -Path *p; fprintf(debug_file, "#*** Directory Cache:\n"); fprintf(debug_file, @@ -1788,14 +1791,14 @@ Dir_PrintDirectories(void) hits, misses, nearmisses, bigmisses, percentage(hits, hits + bigmisses + nearmisses)); fprintf(debug_file, "# %-20s referenced\thits\n", "directory"); -if (Lst_Open(openDirectories) == SUCCESS) { - while ((ln = Lst_NextS(openDirectories)) != NULL) { - p = Lst_DatumS(ln); - fprintf(debug_file, "# %-20s %10d\t%4d\n", p->name, p->refCount, - p->hits); - } - Lst_CloseS(openDirectories); + +Lst_OpenS(openDirectories); +while ((ln = Lst_NextS(openDirectories)) != NULL) { + Path *p = Lst_DatumS(ln); + fprintf(debug_file, "# %-20s %10d\t%4d\n", p->name, p->refCount, + p->hits); } +Lst_CloseS(openDirectories); } static int Index: src/usr.bin/make/lst.c diff -u src/usr.bin/make/lst.c:1.42 src/usr.bin/make/lst.c:1.43 --- src/usr.bin/make/lst.c:1.42 Wed Aug 26 22:55:46 2020 +++ src/usr.bin/make/lst.c Thu Aug 27 06:28:44 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: lst.c,v 1.42 2020/08/26 22:55:46 rillig Exp $ */ +/* $NetBSD: lst.c,v 1.43 2020/08/27 06:28:44 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -37,11 +37,11 @@ #include "make.h" #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: lst.c,v 1.42 2020/08/26 22:55:46 rillig Exp $"; +static char rcsid[] = "$NetBSD: lst.c,v 1.43 2020/08/27 06:28:44 rillig Exp $"; #else #include #ifndef lint -__RCSID("$NetBSD: lst.c,v 1.42 2020/08/26 22:55:46 rillig Exp $"); +__RCSID("$NetBSD: lst.c,v 1.43 2020/08/27 06:28:44 rillig Exp $"); #endif /* not lint */ #endif @@ -637,18 +637,6 @@ Lst_AppendAllS(Lst dst, Lst src) /* Open a list for sequential access. A list can still be searched, etc., * without confusing these functions. */ -ReturnStatus -Lst_Open(Lst list) -{ -if (!LstIsValid(list)) { - return FAILURE; -} -Lst_OpenS(list); -return SUCCESS; -} - -/* Open a list for sequential access. A list can still be searched, etc., - * without confusing these functions. */ void
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Thu Aug 27 06:28:44 UTC 2020 Modified Files: src/usr.bin/make: dir.c lst.c lst.h Log Message: make(1): migrate remaining code from Lst_Open to Lst_OpenS To generate a diff of this commit: cvs rdiff -u -r1.111 -r1.112 src/usr.bin/make/dir.c cvs rdiff -u -r1.42 -r1.43 src/usr.bin/make/lst.c cvs rdiff -u -r1.45 -r1.46 src/usr.bin/make/lst.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Thu Aug 27 06:18:23 UTC 2020 Modified Files: src/usr.bin/make: job.h Log Message: make(1): remove unused declarations from job.h To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/usr.bin/make/job.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/make/job.h diff -u src/usr.bin/make/job.h:1.45 src/usr.bin/make/job.h:1.46 --- src/usr.bin/make/job.h:1.45 Sat Aug 22 08:01:34 2020 +++ src/usr.bin/make/job.h Thu Aug 27 06:18:22 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: job.h,v 1.45 2020/08/22 08:01:34 rillig Exp $ */ +/* $NetBSD: job.h,v 1.46 2020/08/27 06:18:22 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -163,7 +163,7 @@ typedef struct Job { * commands */ #define JOB_TRACED 0x400 /* we've sent 'set -x' */ -int jobPipe[2]; /* Pipe for readind output from job */ +int jobPipe[2]; /* Pipe for reading output from job */ struct pollfd *inPollfd; /* pollfd associated with inPipe */ char outBuf[JOB_BUFSIZE + 1]; /* Buffer for storing the output of the @@ -250,19 +250,16 @@ void Shell_Init(void); const char *Shell_GetNewline(void); void Job_Touch(GNode *, Boolean); Boolean Job_CheckCommands(GNode *, void (*abortProc )(const char *, ...)); -#define CATCH_BLOCK 1 void Job_CatchChildren(void); void Job_CatchOutput(void); void Job_Make(GNode *); void Job_Init(void); -Boolean Job_Full(void); Boolean Job_Empty(void); ReturnStatus Job_ParseShell(char *); int Job_Finish(void); void Job_End(void); void Job_Wait(void); void Job_AbortAll(void); -void JobFlagForMigration(int); void Job_TokenReturn(void); Boolean Job_TokenWithdraw(void); void Job_ServerStart(int, int, int);
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Thu Aug 27 06:18:23 UTC 2020 Modified Files: src/usr.bin/make: job.h Log Message: make(1): remove unused declarations from job.h To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/usr.bin/make/job.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Thu Aug 27 06:13:53 UTC 2020 Modified Files: src/usr.bin/make: arch.c nonints.h parse.c Log Message: make(1): convert Arch_ParseArchive from ReturnStatus to Boolean There are only few functions left that use the ReturnStatus. These will be converted as well, to get rid of the additional typedef. To generate a diff of this commit: cvs rdiff -u -r1.97 -r1.98 src/usr.bin/make/arch.c cvs rdiff -u -r1.98 -r1.99 src/usr.bin/make/nonints.h cvs rdiff -u -r1.263 -r1.264 src/usr.bin/make/parse.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Thu Aug 27 06:13:53 UTC 2020 Modified Files: src/usr.bin/make: arch.c nonints.h parse.c Log Message: make(1): convert Arch_ParseArchive from ReturnStatus to Boolean There are only few functions left that use the ReturnStatus. These will be converted as well, to get rid of the additional typedef. To generate a diff of this commit: cvs rdiff -u -r1.97 -r1.98 src/usr.bin/make/arch.c cvs rdiff -u -r1.98 -r1.99 src/usr.bin/make/nonints.h cvs rdiff -u -r1.263 -r1.264 src/usr.bin/make/parse.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/make/arch.c diff -u src/usr.bin/make/arch.c:1.97 src/usr.bin/make/arch.c:1.98 --- src/usr.bin/make/arch.c:1.97 Wed Aug 26 22:55:46 2020 +++ src/usr.bin/make/arch.c Thu Aug 27 06:13:53 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: arch.c,v 1.97 2020/08/26 22:55:46 rillig Exp $ */ +/* $NetBSD: arch.c,v 1.98 2020/08/27 06:13:53 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,14 +69,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: arch.c,v 1.97 2020/08/26 22:55:46 rillig Exp $"; +static char rcsid[] = "$NetBSD: arch.c,v 1.98 2020/08/27 06:13:53 rillig Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)arch.c 8.2 (Berkeley) 1/2/94"; #else -__RCSID("$NetBSD: arch.c,v 1.97 2020/08/26 22:55:46 rillig Exp $"); +__RCSID("$NetBSD: arch.c,v 1.98 2020/08/27 06:13:53 rillig Exp $"); #endif #endif /* not lint */ #endif @@ -225,7 +225,7 @@ ArchFree(void *ap) * ctxt Context in which to expand variables * * Results: - * SUCCESS if it was a valid specification. The linePtr is updated + * TRUE if it was a valid specification. The linePtr is updated * to point to the first non-space after the archive spec. The * nodes for the members are placed on the given list. * @@ -234,7 +234,7 @@ ArchFree(void *ap) * *--- */ -ReturnStatus +Boolean Arch_ParseArchive(char **linePtr, Lst nodeLst, GNode *ctxt) { char *cp; /* Pointer into line */ @@ -264,7 +264,7 @@ Arch_ParseArchive(char **linePtr, Lst no free(freeIt); if (result == var_Error) { - return FAILURE; + return FALSE; } else { subLibName = TRUE; } @@ -306,7 +306,7 @@ Arch_ParseArchive(char **linePtr, Lst no free(freeIt); if (result == var_Error) { - return FAILURE; + return FALSE; } else { doSubst = TRUE; } @@ -324,7 +324,7 @@ Arch_ParseArchive(char **linePtr, Lst no */ if (*cp == '\0') { printf("No closing parenthesis in archive specification\n"); - return FAILURE; + return FALSE; } /* @@ -373,18 +373,18 @@ Arch_ParseArchive(char **linePtr, Lst no if (gn == NULL) { free(buf); - return FAILURE; + return FALSE; } else { gn->type |= OP_ARCHV; Lst_AppendS(nodeLst, gn); } - } else if (Arch_ParseArchive(, nodeLst, ctxt)!=SUCCESS) { + } else if (!Arch_ParseArchive(, nodeLst, ctxt)) { /* * Error in nested call -- free buffer and return FAILURE * ourselves. */ free(buf); - return FAILURE; + return FALSE; } /* * Free buffer and continue with our work. @@ -409,7 +409,7 @@ Arch_ParseArchive(char **linePtr, Lst no gn = Targ_FindNode(Buf_GetAll(, NULL), TARG_CREATE); if (gn == NULL) { Buf_Destroy(, TRUE); - return FAILURE; + return FALSE; } else { /* * We've found the node, but have to make sure the rest of @@ -436,7 +436,7 @@ Arch_ParseArchive(char **linePtr, Lst no gn = Targ_FindNode(Buf_GetAll(, NULL), TARG_CREATE); Buf_Destroy(, TRUE); if (gn == NULL) { - return FAILURE; + return FALSE; } else { /* * We've found the node, but have to make sure the rest of the @@ -473,7 +473,7 @@ Arch_ParseArchive(char **linePtr, Lst no } while (*cp != '\0' && isspace ((unsigned char)*cp)); *linePtr = cp; -return SUCCESS; +return TRUE; } /*- Index: src/usr.bin/make/nonints.h diff -u src/usr.bin/make/nonints.h:1.98 src/usr.bin/make/nonints.h:1.99 --- src/usr.bin/make/nonints.h:1.98 Sun Aug 23 18:26:35 2020 +++ src/usr.bin/make/nonints.h Thu Aug 27 06:13:53 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: nonints.h,v 1.98 2020/08/23 18:26:35 rillig Exp $ */ +/* $NetBSD: nonints.h,v 1.99 2020/08/27 06:13:53 rillig Exp $ */ /*- * Copyright (c) 1988, 1989, 1990, 1993 @@ -73,7 +73,7 @@ */ /* arch.c */ -ReturnStatus Arch_ParseArchive(char **, Lst, GNode *); +Boolean Arch_ParseArchive(char **, Lst, GNode *); void Arch_Touch(GNode *); void Arch_TouchLib(GNode *); time_t Arch_MTime(GNode *); Index: src/usr.bin/make/parse.c diff -u src/usr.bin/make/parse.c:1.263 src/usr.bin/make/parse.c:1.264 --- src/usr.bin/make/parse.c:1.263 Wed Aug 26 22:55:46 2020 +++ src/usr.bin/make/parse.c Thu Aug 27