-/* $OpenBSD: autoconf.c,v 1.38 2018/01/27 22:55:23 naddy Exp $ */
+/* $OpenBSD: autoconf.c,v 1.39 2022/09/02 20:06:55 miod Exp $ */
/* $NetBSD: autoconf.c,v 1.16 1996/11/13 21:13:04 cgd Exp $ */
/*
(*platform.device_register)(dev, aux);
}
-struct nam2blk nam2blk[] = {
+const struct nam2blk nam2blk[] = {
{ "wd", 0 },
{ "cd", 3 },
{ "fd", 4 },
-/* $OpenBSD: conf.c,v 1.90 2021/11/11 10:03:08 claudio Exp $ */
+/* $OpenBSD: conf.c,v 1.91 2022/09/02 20:06:55 miod Exp $ */
/* $NetBSD: conf.c,v 1.16 1996/10/18 21:26:57 cgd Exp $ */
/*-
return makedev(mem_no, 2);
}
-int chrtoblktbl[] = {
+const int chrtoblktbl[] = {
/*VCHR*/ /*VBLK*/
/* 0 */ NODEV,
/* 1 */ NODEV,
/* 36 */ 0,
/* 37 */ 4, /* fd */
};
-int nchrtoblktbl = nitems(chrtoblktbl);
+const int nchrtoblktbl = nitems(chrtoblktbl);
-/* $OpenBSD: autoconf.c,v 1.53 2019/01/11 06:25:06 mlarkin Exp $ */
+/* $OpenBSD: autoconf.c,v 1.54 2022/09/02 20:06:55 miod Exp $ */
/* $NetBSD: autoconf.c,v 1.1 2003/04/26 18:39:26 fvdl Exp $ */
/*-
#endif /* HIBERNATE */
}
-struct nam2blk nam2blk[] = {
+const struct nam2blk nam2blk[] = {
{ "wd", 0 },
{ "fd", 2 },
{ "sd", 4 },
-/* $OpenBSD: conf.c,v 1.75 2022/06/28 14:43:50 visa Exp $ */
+/* $OpenBSD: conf.c,v 1.76 2022/09/02 20:06:55 miod Exp $ */
/*
* Copyright (c) 1994, 1995 Charles M. Hannum. All rights reserved.
return makedev(mem_no, 2);
}
-int chrtoblktbl[] = {
+const int chrtoblktbl[] = {
/*VCHR*/ /*VBLK*/
/* 0 */ NODEV,
/* 1 */ NODEV,
/* 47 */ 17, /* rd */
};
-int nchrtoblktbl = nitems(chrtoblktbl);
+const int nchrtoblktbl = nitems(chrtoblktbl);
/*
* In order to map BSD bdev numbers of disks to their BIOS equivalents
-/* $OpenBSD: conf.c,v 1.58 2021/11/11 10:03:08 claudio Exp $ */
+/* $OpenBSD: conf.c,v 1.59 2022/09/02 20:06:55 miod Exp $ */
/* $NetBSD: conf.c,v 1.10 2002/04/19 01:04:38 wiz Exp $ */
/*
}
-int chrtoblktbl[] = {
+const int chrtoblktbl[] = {
/*VCHR*/ /*VBLK*/
/* 0 */ NODEV,
/* 1 */ NODEV,
/* 25 */ NODEV,
/* 26 */ 26, /* cd */
};
-int nchrtoblktbl = nitems(chrtoblktbl);
+const int nchrtoblktbl = nitems(chrtoblktbl);
dev_t
getnulldev(void)
-/* $OpenBSD: autoconf.c,v 1.12 2021/02/21 14:55:16 tobhe Exp $ */
+/* $OpenBSD: autoconf.c,v 1.13 2022/09/02 20:06:55 miod Exp $ */
/*
* Copyright (c) 2009 Miodrag Vallat.
*
{
}
-struct nam2blk nam2blk[] = {
+const struct nam2blk nam2blk[] = {
{ "wd", 0 },
{ "sd", 4 },
{ "cd", 6 },
-/* $OpenBSD: conf.c,v 1.19 2021/11/11 10:03:08 claudio Exp $ */
+/* $OpenBSD: conf.c,v 1.20 2022/09/02 20:06:55 miod Exp $ */
/*
* Copyright (c) 1994, 1995 Charles M. Hannum. All rights reserved.
return makedev(CMAJ_MM, 2);
}
-int chrtoblktbl[] = {
+const int chrtoblktbl[] = {
/*VCHR*/ /*VBLK*/
/* 0 */ NODEV,
/* 1 */ NODEV,
/* 47 */ 17, /* rd */
};
-int nchrtoblktbl = nitems(chrtoblktbl);
+const int nchrtoblktbl = nitems(chrtoblktbl);
/*
* In order to map BSD bdev numbers of disks to their BIOS equivalents
-/* $OpenBSD: autoconf.c,v 1.10 2021/03/25 04:12:01 jsg Exp $ */
+/* $OpenBSD: autoconf.c,v 1.11 2022/09/02 20:06:55 miod Exp $ */
/* $NetBSD: autoconf.c,v 1.2 2001/09/05 16:17:36 matt Exp $ */
/*
dumpconf();
}
-struct nam2blk nam2blk[] = {
+const struct nam2blk nam2blk[] = {
{ "wd", 16 },
{ "rd", 18 },
{ "vnd", 19 },
-/* $OpenBSD: autoconf.c,v 1.62 2018/01/27 22:55:23 naddy Exp $ */
+/* $OpenBSD: autoconf.c,v 1.63 2022/09/02 20:06:55 miod Exp $ */
/*
* Copyright (c) 1998-2003 Michael Shalayeff
dumpconf();
}
-struct nam2blk nam2blk[] = {
+const struct nam2blk nam2blk[] = {
{ "vnd", 2 },
{ "rd", 3 },
{ "sd", 4 },
-/* $OpenBSD: conf.c,v 1.73 2022/04/20 14:21:56 deraadt Exp $ */
+/* $OpenBSD: conf.c,v 1.74 2022/09/02 20:06:55 miod Exp $ */
/*-
* Copyright (c) 1991 The Regents of the University of California.
*/
dev_t swapdev = makedev(0, 0);
-int chrtoblktbl[] = {
+const int chrtoblktbl[] = {
/*VCHR*/ /*VBLK*/
/* 0 */ NODEV,
/* 1 */ NODEV,
/* 38 */ NODEV,
/* 39 */ 8, /* wd */
};
-int nchrtoblktbl = nitems(chrtoblktbl);
+const int nchrtoblktbl = nitems(chrtoblktbl);
/*
* Returns true if dev is /dev/zero.
-/* $OpenBSD: autoconf.c,v 1.106 2019/12/08 12:25:30 mpi Exp $ */
+/* $OpenBSD: autoconf.c,v 1.107 2022/09/02 20:06:55 miod Exp $ */
/* $NetBSD: autoconf.c,v 1.20 1996/05/03 19:41:56 christos Exp $ */
/*-
#endif /* HIBERNATE */
}
-struct nam2blk nam2blk[] = {
+const struct nam2blk nam2blk[] = {
{ "wd", 0 },
{ "fd", 2 },
{ "sd", 4 },
-/* $OpenBSD: conf.c,v 1.173 2022/06/28 14:43:50 visa Exp $ */
+/* $OpenBSD: conf.c,v 1.174 2022/09/02 20:06:56 miod Exp $ */
/* $NetBSD: conf.c,v 1.75 1996/05/03 19:40:20 christos Exp $ */
/*
return makedev(mem_no, 2);
}
-int chrtoblktbl[] = {
+const int chrtoblktbl[] = {
/*VCHR*/ /*VBLK*/
/* 0 */ NODEV,
/* 1 */ NODEV,
/* 46 */ NODEV,
/* 47 */ 17, /* rd */
};
-int nchrtoblktbl = nitems(chrtoblktbl);
+const int nchrtoblktbl = nitems(chrtoblktbl);
/*
* In order to map BSD bdev numbers of disks to their BIOS equivalents
-/* $OpenBSD: autoconf.c,v 1.12 2018/01/27 22:55:23 naddy Exp $ */
+/* $OpenBSD: autoconf.c,v 1.13 2022/09/02 20:06:56 miod Exp $ */
/* $NetBSD: autoconf.c,v 1.1 2006/09/01 21:26:18 uwe Exp $ */
/*-
dumpconf();
}
-struct nam2blk nam2blk[] = {
+const struct nam2blk nam2blk[] = {
{ "wd", 16 },
{ "rd", 18 },
{ "vnd", 19 },
-/* $OpenBSD: conf.c,v 1.44 2021/11/11 10:03:09 claudio Exp $ */
+/* $OpenBSD: conf.c,v 1.45 2022/09/02 20:06:56 miod Exp $ */
/*
* Copyright (c) 1994-1998 Mark Brinicombe.
}
-int chrtoblktbl[] = {
+const int chrtoblktbl[] = {
/*VCHR*/ /*VBLK*/
/* 0 */ NODEV,
/* 1 */ NODEV,
/* 25 */ NODEV,
/* 26 */ 26, /* cd */
};
-int nchrtoblktbl = nitems(chrtoblktbl);
+const int nchrtoblktbl = nitems(chrtoblktbl);
dev_t
-/* $OpenBSD: autoconf.c,v 1.10 2018/04/20 14:08:12 visa Exp $ */
+/* $OpenBSD: autoconf.c,v 1.11 2022/09/02 20:06:56 miod Exp $ */
/*
* Copyright (c) 2009 Miodrag Vallat.
*
(*sys_platform->device_register)(dev, aux);
}
-struct nam2blk nam2blk[] = {
+const struct nam2blk nam2blk[] = {
{ "sd", 0 },
{ "vnd", 2 },
{ "cd", 3 },
-/* $OpenBSD: conf.c,v 1.31 2021/11/11 10:03:09 claudio Exp $ */
+/* $OpenBSD: conf.c,v 1.32 2022/09/02 20:06:56 miod Exp $ */
/*
* Copyright (c) 1992, 1993
}
-int chrtoblktbl[] = {
+const int chrtoblktbl[] = {
/* VCHR VBLK */
/* 0 */ NODEV,
/* 1 */ NODEV,
/* 22 */ 8 /* rd */
};
-int nchrtoblktbl = nitems(chrtoblktbl);
+const int nchrtoblktbl = nitems(chrtoblktbl);
#include <dev/cons.h>
-/* $OpenBSD: autoconf.c,v 1.25 2022/08/13 06:44:48 jsg Exp $ */
+/* $OpenBSD: autoconf.c,v 1.26 2022/09/02 20:06:56 miod Exp $ */
/*
* Copyright (c) 1998 Steve Murphree, Jr.
* Copyright (c) 1996 Nivas Madhur
}
}
-struct nam2blk nam2blk[] = {
+const struct nam2blk nam2blk[] = {
{ "sd", 4 },
{ "cd", 6 },
{ "rd", 7 },
-/* $OpenBSD: conf.c,v 1.35 2021/11/11 10:03:09 claudio Exp $ */
+/* $OpenBSD: conf.c,v 1.36 2022/09/02 20:06:56 miod Exp $ */
/*-
* Copyright (c) 1991 The Regents of the University of California.
return makedev(mem_no, 2);
}
-int chrtoblktbl[] = {
+const int chrtoblktbl[] = {
/*VCHR*/ /*VBLK*/
/* 0 */ NODEV,
/* 1 */ NODEV,
/* 18 */ 7, /* rd */
/* 19 */ 8, /* vnd */
};
-int nchrtoblktbl = nitems(chrtoblktbl);
+const int nchrtoblktbl = nitems(chrtoblktbl);
-/* $OpenBSD: autoconf.c,v 1.46 2019/09/03 17:51:52 deraadt Exp $ */
+/* $OpenBSD: autoconf.c,v 1.47 2022/09/02 20:06:56 miod Exp $ */
/*
* Copyright (c) 1996, 1997 Per Fogelstrom
* Copyright (c) 1995 Theo de Raadt
* from: Utah Hdr: autoconf.c 1.31 91/01/21
*
* from: @(#)autoconf.c 8.1 (Berkeley) 6/10/93
- * $Id: autoconf.c,v 1.46 2019/09/03 17:51:52 deraadt Exp $
+ * $Id: autoconf.c,v 1.47 2022/09/02 20:06:56 miod Exp $
*/
/*
dumpconf();
}
-struct nam2blk nam2blk[] = {
+const struct nam2blk nam2blk[] = {
{ "wd", 0 },
{ "sd", 2 },
{ "cd", 3 },
-/* $OpenBSD: conf.c,v 1.74 2021/11/11 10:03:09 claudio Exp $ */
+/* $OpenBSD: conf.c,v 1.75 2022/09/02 20:06:56 miod Exp $ */
/*
* Copyright (c) 1997 Per Fogelstrom
return makedev(mem_no, 2);
}
-int chrtoblktbl[] = {
+const int chrtoblktbl[] = {
/*VCHR*/ /*VBLK*/
/* 0 */ NODEV,
/* 1 */ NODEV,
/* 18 */ NODEV,
/* 19 */ 14, /* vnd */
};
-int nchrtoblktbl = nitems(chrtoblktbl);
+const int nchrtoblktbl = nitems(chrtoblktbl);
#include <dev/cons.h>
-/* $OpenBSD: autoconf.c,v 1.16 2019/07/12 03:03:48 visa Exp $ */
+/* $OpenBSD: autoconf.c,v 1.17 2022/09/02 20:06:56 miod Exp $ */
/*
* Copyright (c) 2009 Miodrag Vallat.
*
enum devclass
findtype(void)
{
- static struct devmap devmap[] = {
+ static const struct devmap devmap[] = {
{ "wd", DV_DISK },
{ "sd", DV_DISK },
{ "octcf", DV_DISK },
{ "amdcf", DV_DISK },
{ NULL, DV_IFNET }
};
- struct devmap *dp = &devmap[0];
+ const struct devmap *dp = &devmap[0];
if (strlen(bootdev) < 2)
return DV_DISK;
}
}
-struct nam2blk nam2blk[] = {
+const struct nam2blk nam2blk[] = {
{ "sd", 0 },
{ "vnd", 2 },
{ "cd", 3 },
-/* $OpenBSD: conf.c,v 1.27 2021/11/11 10:03:09 claudio Exp $ */
+/* $OpenBSD: conf.c,v 1.28 2022/09/02 20:06:56 miod Exp $ */
/*
* Copyright (c) 1992, 1993
}
-int chrtoblktbl[] = {
+const int chrtoblktbl[] = {
/* VCHR VBLK */
/* 0 */ NODEV,
/* 1 */ NODEV,
/* 22 */ 8 /* rd */
};
-int nchrtoblktbl = nitems(chrtoblktbl);
+const int nchrtoblktbl = nitems(chrtoblktbl);
#include <dev/cons.h>
-/* $OpenBSD: autoconf.c,v 1.7 2020/10/31 17:57:53 patrick Exp $ */
+/* $OpenBSD: autoconf.c,v 1.8 2022/09/02 20:06:56 miod Exp $ */
/*
* Copyright (c) 2020 Mark Kettenis <kettenis@openbsd.org>
{
}
-struct nam2blk nam2blk[] = {
+const struct nam2blk nam2blk[] = {
{ "vnd", 1 },
{ "rd", 2 },
{ "sd", 3 },
-/* $OpenBSD: conf.c,v 1.13 2021/11/11 10:03:09 claudio Exp $ */
+/* $OpenBSD: conf.c,v 1.14 2022/09/02 20:06:56 miod Exp $ */
/*-
* Copyright (c) 1991 The Regents of the University of California.
return makedev(mem_no, 2);
}
-int chrtoblktbl[] = {
+const int chrtoblktbl[] = {
/*VCHR*/ /*VBLK*/
/* 0 */ NODEV,
/* 1 */ NODEV,
/* 26 */ 3, /* sd */
/* 27 */ 4, /* cd */
};
-int nchrtoblktbl = nitems(chrtoblktbl);
+const int nchrtoblktbl = nitems(chrtoblktbl);
-/* $OpenBSD: autoconf.c,v 1.4 2021/05/14 06:48:52 jsg Exp $ */
+/* $OpenBSD: autoconf.c,v 1.5 2022/09/02 20:06:56 miod Exp $ */
/*
* Copyright (c) 2009 Miodrag Vallat.
{
}
-struct nam2blk nam2blk[] = {
+const struct nam2blk nam2blk[] = {
{ "wd", 0 },
{ "sd", 4 },
{ "cd", 6 },
-/* $OpenBSD: conf.c,v 1.14 2022/02/18 10:51:43 visa Exp $ */
+/* $OpenBSD: conf.c,v 1.15 2022/09/02 20:06:56 miod Exp $ */
/*
* Copyright (c) 1994, 1995 Charles M. Hannum. All rights reserved.
return makedev(mem_no, 2);
}
-int chrtoblktbl[] = {
+const int chrtoblktbl[] = {
/*VCHR*/ /*VBLK*/
/* 0 */ NODEV,
/* 1 */ NODEV,
/* 47 */ 8, /* rd */
};
-int nchrtoblktbl = nitems(chrtoblktbl);
+const int nchrtoblktbl = nitems(chrtoblktbl);
/*
* In order to map BSD bdev numbers of disks to their BIOS equivalents
-/* $OpenBSD: autoconf.c,v 1.140 2021/10/24 17:05:04 mpi Exp $ */
+/* $OpenBSD: autoconf.c,v 1.141 2022/09/02 20:06:56 miod Exp $ */
/* $NetBSD: autoconf.c,v 1.51 2001/07/24 19:32:11 eeh Exp $ */
/*
bootpath_store(1, NULL);
}
-struct nam2blk nam2blk[] = {
+const struct nam2blk nam2blk[] = {
{ "rd", 5 },
{ "sd", 7 },
{ "vnd", 8 },
-/* $OpenBSD: conf.c,v 1.86 2021/11/11 10:03:09 claudio Exp $ */
+/* $OpenBSD: conf.c,v 1.87 2022/09/02 20:06:56 miod Exp $ */
/* $NetBSD: conf.c,v 1.17 2001/03/26 12:33:26 lukem Exp $ */
/*
return makedev(mem_no, 2);
}
-int chrtoblktbl[] = {
+const int chrtoblktbl[] = {
/*VCHR*/ /*VBLK*/
/* 0 */ NODEV,
/* 1 */ NODEV,
/*109 */ NODEV,
/*110 */ 8, /* vnd */
};
-int nchrtoblktbl = nitems(chrtoblktbl);
+const int nchrtoblktbl = nitems(chrtoblktbl);
-/* $OpenBSD: subr_disk.c,v 1.258 2022/09/02 14:18:47 krw Exp $ */
+/* $OpenBSD: subr_disk.c,v 1.259 2022/09/02 20:06:56 miod Exp $ */
/* $NetBSD: subr_disk.c,v 1.17 1996/03/16 23:17:08 christos Exp $ */
/*
printf("\n");
}
-extern struct nam2blk nam2blk[];
+extern const struct nam2blk nam2blk[];
int
findblkmajor(struct device *dv)
-/* $OpenBSD: conf.h,v 1.158 2022/06/28 14:43:50 visa Exp $ */
+/* $OpenBSD: conf.h,v 1.159 2022/09/02 20:06:56 miod Exp $ */
/* $NetBSD: conf.h,v 1.33 1996/05/03 20:03:32 christos Exp $ */
/*-
#ifdef _KERNEL
extern struct swdevt swdevt[];
-extern int chrtoblktbl[];
-extern int nchrtoblktbl;
+extern const int chrtoblktbl[];
+extern const int nchrtoblktbl;
struct bdevsw *bdevsw_lookup(dev_t);
struct cdevsw *cdevsw_lookup(dev_t);