[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:
@@ -36,27 +36,6 @@ typedef struct {
|
||||
bool valid;
|
||||
} pci_bar_t;
|
||||
|
||||
typedef struct {
|
||||
uint8_t id;
|
||||
uint8_t next;
|
||||
} __PACKED pci_capability_t;
|
||||
|
||||
typedef struct {
|
||||
uint8_t bus;
|
||||
uint8_t device;
|
||||
uint8_t link_int_a;
|
||||
uint16_t irq_int_a;
|
||||
uint8_t link_int_b;
|
||||
uint16_t irq_int_b;
|
||||
uint8_t link_int_c;
|
||||
uint16_t irq_int_c;
|
||||
uint8_t link_int_d;
|
||||
uint16_t irq_int_d;
|
||||
uint8_t slot;
|
||||
uint8_t reserved;
|
||||
} __PACKED irq_routing_entry;
|
||||
|
||||
|
||||
// only use one of these two:
|
||||
// try to detect PCI based on legacy PC PCI accessor methods
|
||||
status_t pci_init_legacy(void);
|
||||
|
||||
@@ -141,7 +141,7 @@ typedef struct {
|
||||
uint16_t bridge_control;
|
||||
} type1; // configuration for bridge devices
|
||||
};
|
||||
} __PACKED pci_config_t;
|
||||
} pci_config_t;
|
||||
static_assert(sizeof(pci_config_t) == 0x40, "");
|
||||
|
||||
/* Class/subclass codes (incomplete) */
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -35,6 +35,7 @@ struct tga_header {
|
||||
uint8_t bitsperpixel;
|
||||
uint8_t imagedescriptor;
|
||||
} __PACKED;
|
||||
static_assert(sizeof(struct tga_header) == 18, "");
|
||||
|
||||
static void print_tga_info(const struct tga_header *header) {
|
||||
LTRACEF("idlength %hhd\n", header->idlength);
|
||||
|
||||
Reference in New Issue
Block a user