[warnings] remove some extraneous __PACKED attributes

Also remove a few extra data structures that were marked packed but not
otherwise used anywhere.
This commit is contained in:
Travis Geiselbrecht
2024-04-18 23:51:38 -07:00
parent 6ed6f36fa0
commit 9a4fae0714
5 changed files with 12 additions and 25 deletions

View File

@@ -7,11 +7,15 @@
*/
#pragma once
#include <lk/compiler.h>
#include <sys/types.h>
__BEGIN_CDECLS
/* examine and try to publish partitions on a particular device at a particular offset */
int partition_publish(const char *device, off_t offset);
/* remove any published subdevices on this device */
int partition_unpublish(const char *device);
__END_CDECLS

View File

@@ -5,6 +5,8 @@
* license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT
*/
#include "lib/partition.h"
#include <lk/debug.h>
#include <stdio.h>
#include <string.h>
@@ -12,13 +14,13 @@
#include <stdlib.h>
#include <arch.h>
#include <lib/bio.h>
#include <lib/partition.h>
#include <assert.h>
struct chs {
uint8_t c;
uint8_t h;
uint8_t s;
} __PACKED;
};
struct mbr_part {
uint8_t status;
@@ -27,7 +29,8 @@ struct mbr_part {
struct chs end;
uint32_t lba_start;
uint32_t lba_length;
} __PACKED;
};
static_assert(sizeof(struct mbr_part) == 16, "");
static status_t validate_mbr_partition(bdev_t *dev, const struct mbr_part *part) {
/* check for invalid types */