git: 4932a6e41d1f - main - stand: Create DEV_NAMLEN for the length of a device name

From: Warner Losh <imp_at_FreeBSD.org>
Date: Wed, 27 Jul 2022 15:06:19 UTC
The branch main has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=4932a6e41d1fc3fe474358501d5933e783066bdc

commit 4932a6e41d1fc3fe474358501d5933e783066bdc
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2022-07-27 14:45:59 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2022-07-27 15:04:12 +0000

    stand: Create DEV_NAMLEN for the length of a device name
    
    Rather than hard coding 8 for the device name length, create a #define for it.
    
    Sponsored by:           Netflix
    Reviewed by:            tsoome
    Differential Revision:  https://reviews.freebsd.org/D35910
---
 stand/libsa/stand.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/stand/libsa/stand.h b/stand/libsa/stand.h
index 097d8ba28d0b..6ddbc188e6f6 100644
--- a/stand/libsa/stand.h
+++ b/stand/libsa/stand.h
@@ -139,8 +139,9 @@ extern struct fs_ops efihttp_fsops;
 /* 
  * Device switch
  */
+#define DEV_NAMLEN	8		/* Length of name of device class */
 struct devsw {
-    const char	dv_name[8];
+    const char	dv_name[DEV_NAMLEN];
     int		dv_type;		/* opaque type constant, arch-dependant */
 #define DEVT_NONE	0
 #define DEVT_DISK	1