git: a4fafcbcebfd - stable/13 - stand: Create DEV_NAMLEN for the length of a device name
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 24 Jan 2023 22:11:27 UTC
The branch stable/13 has been updated by imp:
URL: https://cgit.FreeBSD.org/src/commit/?id=a4fafcbcebfdd3c9e80ce9494d55e160d57f8dcf
commit a4fafcbcebfdd3c9e80ce9494d55e160d57f8dcf
Author: Warner Losh <imp@FreeBSD.org>
AuthorDate: 2022-07-27 14:45:59 +0000
Commit: Warner Losh <imp@FreeBSD.org>
CommitDate: 2023-01-24 21:49:27 +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
(cherry picked from commit 4932a6e41d1fc3fe474358501d5933e783066bdc)
---
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