Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F143945097
D37405.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
D37405.diff
View Options
diff --git a/usr.sbin/bhyve/basl.h b/usr.sbin/bhyve/basl.h
--- a/usr.sbin/bhyve/basl.h
+++ b/usr.sbin/bhyve/basl.h
@@ -42,6 +42,13 @@
int basl_finish(void);
int basl_init(void);
+int basl_table_add_checksum(struct basl_table *const table, const uint32_t off,
+ const uint32_t start, const uint32_t len);
+int basl_table_add_length(struct basl_table *const table, const uint32_t off,
+ const uint8_t size);
+int basl_table_add_pointer(struct basl_table *const table,
+ const uint8_t src_signature[ACPI_NAMESEG_SIZE], const uint32_t off,
+ const uint8_t size);
int basl_table_append_bytes(struct basl_table *table, const void *bytes,
uint32_t len);
int basl_table_append_checksum(struct basl_table *table, uint32_t start,
diff --git a/usr.sbin/bhyve/basl.c b/usr.sbin/bhyve/basl.c
--- a/usr.sbin/bhyve/basl.c
+++ b/usr.sbin/bhyve/basl.c
@@ -322,12 +322,14 @@
return (0);
}
-static int
+int
basl_table_add_checksum(struct basl_table *const table, const uint32_t off,
const uint32_t start, const uint32_t len)
{
struct basl_table_checksum *checksum;
+ assert(table != NULL);
+
checksum = calloc(1, sizeof(struct basl_table_checksum));
if (checksum == NULL) {
warnx("%s: failed to allocate checksum", __func__);
@@ -343,12 +345,15 @@
return (0);
}
-static int
+int
basl_table_add_length(struct basl_table *const table, const uint32_t off,
const uint8_t size)
{
struct basl_table_length *length;
+ assert(table != NULL);
+ assert(size == 4 || size == 8);
+
length = calloc(1, sizeof(struct basl_table_length));
if (length == NULL) {
warnx("%s: failed to allocate length", __func__);
@@ -363,13 +368,16 @@
return (0);
}
-static int
+int
basl_table_add_pointer(struct basl_table *const table,
const uint8_t src_signature[ACPI_NAMESEG_SIZE], const uint32_t off,
const uint8_t size)
{
struct basl_table_pointer *pointer;
+ assert(table != NULL);
+ assert(size == 4 || size == 8);
+
pointer = calloc(1, sizeof(struct basl_table_pointer));
if (pointer == NULL) {
warnx("%s: failed to allocate pointer", __func__);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Feb 3, 9:10 AM (5 m, 23 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28422567
Default Alt Text
D37405.diff (2 KB)
Attached To
Mode
D37405: bhyve: make basl_table_add_* functions public
Attached
Detach File
Event Timeline
Log In to Comment