jcs's openbsd hax
openbsd

Skip inserting rrootdisk and rootdisk into the database. There are callers to devname(3) who get don't understand that the database isn't covering a 1:1 relationship... ok bluhm robert beck this is a part of 7.8 errata 001

deraadt 1fc5576e fa85ee63

+8 -4
+8 -4
usr.sbin/dev_mkdb/dev_mkdb.c
··· 1 - /* $OpenBSD: dev_mkdb.c,v 1.20 2023/12/24 06:35:05 gnezdo Exp $ */ 1 + /* $OpenBSD: dev_mkdb.c,v 1.21 2025/10/27 16:17:08 deraadt Exp $ */ 2 2 3 3 /*- 4 4 * Copyright (c) 1990, 1993 ··· 112 112 continue; 113 113 114 114 /* Create the key. */ 115 - if (S_ISCHR(dp->fts_statp->st_mode)) 115 + if (S_ISCHR(dp->fts_statp->st_mode)) { 116 + if (strcmp(dp->fts_path, "./rrootdisk") == 0) 117 + continue; 116 118 bkey.type = S_IFCHR; 117 - else if (S_ISBLK(dp->fts_statp->st_mode)) 119 + } else if (S_ISBLK(dp->fts_statp->st_mode)) { 120 + if (strcmp(dp->fts_path, "./rootdisk") == 0) 121 + continue; 118 122 bkey.type = S_IFBLK; 119 - else 123 + } else 120 124 continue; 121 125 bkey.dev = dp->fts_statp->st_rdev; 122 126