Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F146066847
D44006.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D44006.id.diff
View Options
diff --git a/stand/common/bootstrap.h b/stand/common/bootstrap.h
--- a/stand/common/bootstrap.h
+++ b/stand/common/bootstrap.h
@@ -382,8 +382,4 @@
int mount_currdev(struct env_var *, int, const void *);
void set_currdev(const char *devname);
-#ifndef CTASSERT
-#define CTASSERT(x) _Static_assert(x, "compile-time assertion failed")
-#endif
-
#endif /* !_BOOTSTRAP_H_ */
diff --git a/stand/efi/loader/arch/amd64/multiboot2.c b/stand/efi/loader/arch/amd64/multiboot2.c
--- a/stand/efi/loader/arch/amd64/multiboot2.c
+++ b/stand/efi/loader/arch/amd64/multiboot2.c
@@ -334,7 +334,7 @@
struct mb2hdr *hdr;
- CTASSERT(sizeof(header) <= PAGE_SIZE);
+ _Static_assert(sizeof(header) <= PAGE_SIZE, "header too big");
if ((md = file_findmetadata(fp,
MODINFOMD_NOCOPY | MODINFOMD_MB2HDR)) == NULL) {
diff --git a/stand/i386/libi386/multiboot.c b/stand/i386/libi386/multiboot.c
--- a/stand/i386/libi386/multiboot.c
+++ b/stand/i386/libi386/multiboot.c
@@ -165,7 +165,7 @@
int error, mod_num;
struct xen_header header;
- CTASSERT(sizeof(header) <= PAGE_SIZE);
+ _Static_assert(sizeof(header) <= PAGE_SIZE, "header too large for page");
/*
* Don't pass the memory size found by the bootloader, the memory
diff --git a/stand/i386/loader/main.c b/stand/i386/loader/main.c
--- a/stand/i386/loader/main.c
+++ b/stand/i386/loader/main.c
@@ -51,14 +51,13 @@
#include "libzfs.h"
#endif
-CTASSERT(sizeof(struct bootargs) == BOOTARGS_SIZE);
-CTASSERT(offsetof(struct bootargs, bootinfo) == BA_BOOTINFO);
-CTASSERT(offsetof(struct bootargs, bootflags) == BA_BOOTFLAGS);
-CTASSERT(offsetof(struct bootinfo, bi_size) == BI_SIZE);
+_Static_assert(sizeof(struct bootargs) == BOOTARGS_SIZE, "Bootarg size bad");
+_Static_assert(offsetof(struct bootargs, bootinfo) == BA_BOOTINFO, "BA_BOOTINFO");
+_Static_assert(offsetof(struct bootargs, bootflags) == BA_BOOTFLAGS, "BA_BOOTFLAGS");
+_Static_assert(offsetof(struct bootinfo, bi_size) == BI_SIZE, "BI_SIZE");
/* Arguments passed in from the boot1/boot2 loader */
static struct bootargs *kargs;
-
static uint32_t initial_howto;
static uint32_t initial_bootdev;
static struct bootinfo *initial_bootinfo;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Feb 28, 12:40 PM (3 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29068739
Default Alt Text
D44006.id.diff (2 KB)
Attached To
Mode
D44006: loader: Retire CTASSERT
Attached
Detach File
Event Timeline
Log In to Comment