diff --git a/minix/commands/loadfont/loadfont.c b/minix/commands/loadfont/loadfont.c index 45538e021..e5c1b42fb 100644 --- a/minix/commands/loadfont/loadfont.c +++ b/minix/commands/loadfont/loadfont.c @@ -51,9 +51,9 @@ void usage(void) int main(int argc, char *argv[]) { - static u8_t font[256][32]; - static u8_t font_file[256 * (16+14+8) + 1]; - u8_t *ff; + static uint8_t font[256][32]; + static uint8_t font_file[256 * (16+14+8) + 1]; + uint8_t *ff; int fd, size, tsize, ch, ln; struct winsize ws; diff --git a/minix/commands/minix-service/parse.c b/minix/commands/minix-service/parse.c index ed49920cb..28a946289 100644 --- a/minix/commands/minix-service/parse.c +++ b/minix/commands/minix-service/parse.c @@ -574,7 +574,7 @@ static void do_pci_device(config_t *cpe, struct rs_start *rs_start) static void do_pci_class(config_t *cpe, struct rs_start *rs_start) { - u8_t baseclass, subclass, interface; + uint8_t baseclass, subclass, interface; u32_t class_id, mask; char *check; diff --git a/minix/drivers/audio/als4000/als4000.c b/minix/drivers/audio/als4000/als4000.c index 299126c30..5493e25a7 100644 --- a/minix/drivers/audio/als4000/als4000.c +++ b/minix/drivers/audio/als4000/als4000.c @@ -270,7 +270,7 @@ static int dev_probe(void) { int devind, i, ioflag; u32_t device, bar, size, base; u16_t vid, did, temp; - u8_t *reg; + uint8_t *reg; pci_init(); device = pci_first_dev(&devind, &vid, &did); diff --git a/minix/drivers/audio/als4000/als4000.h b/minix/drivers/audio/als4000/als4000.h index 5e74b6283..b46007bb7 100644 --- a/minix/drivers/audio/als4000/als4000.h +++ b/minix/drivers/audio/als4000/als4000.h @@ -94,7 +94,7 @@ typedef struct aud_sub_dev_conf_t { u32_t sign; u32_t busy; u32_t fragment_size; - u8_t format; + uint8_t format; } aud_sub_dev_conf_t; typedef struct DEV_STRUCT { diff --git a/minix/drivers/audio/als4000/io.h b/minix/drivers/audio/als4000/io.h index 267a0fad2..49692f23b 100644 --- a/minix/drivers/audio/als4000/io.h +++ b/minix/drivers/audio/als4000/io.h @@ -6,16 +6,16 @@ #include "als4000.h" /* I/O function */ -static u8_t my_inb(u32_t port) { +static uint8_t my_inb(u32_t port) { u32_t value; int r; #ifdef DMA_BASE_IOMAP - value = *(volatile u8_t *)(port); + value = *(volatile uint8_t *)(port); #else if ((r = sys_inb(port, &value)) != OK) printf("SDR: sys_inb failed: %d\n", r); #endif - return (u8_t)value; + return (uint8_t)value; } #define sdr_in8(port, offset) (my_inb((port) + (offset))) @@ -48,9 +48,9 @@ static u32_t my_inl(u32_t port) { static void my_outb(u32_t port, u32_t value) { int r; #ifdef DMA_BASE_IOMAP - *(volatile u8_t *)(port) = value; + *(volatile uint8_t *)(port) = value; #else - if ((r = sys_outb(port, (u8_t)value)) != OK) + if ((r = sys_outb(port, (uint8_t)value)) != OK) printf("SDR: sys_outb failed: %d\n", r); #endif } diff --git a/minix/drivers/audio/als4000/mixer.c b/minix/drivers/audio/als4000/mixer.c index c07d1f2b2..f97b4d85b 100644 --- a/minix/drivers/audio/als4000/mixer.c +++ b/minix/drivers/audio/als4000/mixer.c @@ -1,7 +1,7 @@ #include "mixer.h" #ifdef MIXER_AK4531 -u8_t mixer_value[] = { +uint8_t mixer_value[] = { 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x08, 0x7e, 0x3d, 0x01, 0x01, 0x00, 0x00, 0x03, 0x00, diff --git a/minix/drivers/audio/cmi8738/cmi8738.c b/minix/drivers/audio/cmi8738/cmi8738.c index 99e509d8e..c583608dd 100644 --- a/minix/drivers/audio/cmi8738/cmi8738.c +++ b/minix/drivers/audio/cmi8738/cmi8738.c @@ -226,7 +226,7 @@ static int dev_probe(void) { int devind, i, ioflag; u32_t device, bar, size, base; u16_t vid, did, temp; - u8_t *reg; + uint8_t *reg; pci_init(); device = pci_first_dev(&devind, &vid, &did); diff --git a/minix/drivers/audio/cmi8738/cmi8738.h b/minix/drivers/audio/cmi8738/cmi8738.h index c3fdbf9d6..48f013f5e 100644 --- a/minix/drivers/audio/cmi8738/cmi8738.h +++ b/minix/drivers/audio/cmi8738/cmi8738.h @@ -93,7 +93,7 @@ typedef struct aud_sub_dev_conf_t { u32_t sign; u32_t busy; u32_t fragment_size; - u8_t format; + uint8_t format; } aud_sub_dev_conf_t; typedef struct DEV_STRUCT { diff --git a/minix/drivers/audio/cmi8738/io.h b/minix/drivers/audio/cmi8738/io.h index 0c3e7cee1..dda46d61b 100644 --- a/minix/drivers/audio/cmi8738/io.h +++ b/minix/drivers/audio/cmi8738/io.h @@ -6,16 +6,16 @@ #include "cmi8738.h" /* I/O function */ -static u8_t my_inb(u32_t port) { +static uint8_t my_inb(u32_t port) { u32_t value; int r; #ifdef DMA_BASE_IOMAP - value = *(volatile u8_t *)(port); + value = *(volatile uint8_t *)(port); #else if ((r = sys_inb(port, &value)) != OK) printf("SDR: sys_inb failed: %d\n", r); #endif - return (u8_t)value; + return (uint8_t)value; } #define sdr_in8(port, offset) (my_inb((port) + (offset))) @@ -48,9 +48,9 @@ static u32_t my_inl(u32_t port) { static void my_outb(u32_t port, u32_t value) { int r; #ifdef DMA_BASE_IOMAP - *(volatile u8_t *)(port) = value; + *(volatile uint8_t *)(port) = value; #else - if ((r = sys_outb(port, (u8_t)value)) != OK) + if ((r = sys_outb(port, (uint8_t)value)) != OK) printf("SDR: sys_outb failed: %d\n", r); #endif } diff --git a/minix/drivers/audio/cmi8738/mixer.c b/minix/drivers/audio/cmi8738/mixer.c index c07d1f2b2..f97b4d85b 100644 --- a/minix/drivers/audio/cmi8738/mixer.c +++ b/minix/drivers/audio/cmi8738/mixer.c @@ -1,7 +1,7 @@ #include "mixer.h" #ifdef MIXER_AK4531 -u8_t mixer_value[] = { +uint8_t mixer_value[] = { 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x08, 0x7e, 0x3d, 0x01, 0x01, 0x00, 0x00, 0x03, 0x00, diff --git a/minix/drivers/audio/cs4281/cs4281.c b/minix/drivers/audio/cs4281/cs4281.c index 5ffceaf9c..84d786d64 100644 --- a/minix/drivers/audio/cs4281/cs4281.c +++ b/minix/drivers/audio/cs4281/cs4281.c @@ -301,7 +301,7 @@ static int dev_probe(void) { int devind, i, ioflag; u32_t device, bar, size, base; u16_t vid, did, temp; - u8_t *reg; + uint8_t *reg; pci_init(); device = pci_first_dev(&devind, &vid, &did); diff --git a/minix/drivers/audio/cs4281/cs4281.h b/minix/drivers/audio/cs4281/cs4281.h index 00dc7f2d0..687878477 100644 --- a/minix/drivers/audio/cs4281/cs4281.h +++ b/minix/drivers/audio/cs4281/cs4281.h @@ -119,7 +119,7 @@ typedef struct aud_sub_dev_conf_t { u32_t sign; u32_t busy; u32_t fragment_size; - u8_t format; + uint8_t format; } aud_sub_dev_conf_t; typedef struct DEV_STRUCT { diff --git a/minix/drivers/audio/cs4281/io.h b/minix/drivers/audio/cs4281/io.h index 9c7caf48f..1a27fa93f 100644 --- a/minix/drivers/audio/cs4281/io.h +++ b/minix/drivers/audio/cs4281/io.h @@ -6,16 +6,16 @@ #include "cs4281.h" /* I/O function */ -static u8_t my_inb(u32_t port) { +static uint8_t my_inb(u32_t port) { u32_t value; int r; #ifdef DMA_BASE_IOMAP - value = *(volatile u8_t *)(port); + value = *(volatile uint8_t *)(port); #else if ((r = sys_inb(port, &value)) != OK) printf("SDR: sys_inb failed: %d\n", r); #endif - return (u8_t)value; + return (uint8_t)value; } #define sdr_in8(port, offset) (my_inb((port) + (offset))) @@ -48,9 +48,9 @@ static u32_t my_inl(u32_t port) { static void my_outb(u32_t port, u32_t value) { int r; #ifdef DMA_BASE_IOMAP - *(volatile u8_t *)(port) = value; + *(volatile uint8_t *)(port) = value; #else - if ((r = sys_outb(port, (u8_t)value)) != OK) + if ((r = sys_outb(port, (uint8_t)value)) != OK) printf("SDR: sys_outb failed: %d\n", r); #endif } diff --git a/minix/drivers/audio/cs4281/mixer.c b/minix/drivers/audio/cs4281/mixer.c index c07d1f2b2..f97b4d85b 100644 --- a/minix/drivers/audio/cs4281/mixer.c +++ b/minix/drivers/audio/cs4281/mixer.c @@ -1,7 +1,7 @@ #include "mixer.h" #ifdef MIXER_AK4531 -u8_t mixer_value[] = { +uint8_t mixer_value[] = { 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x08, 0x7e, 0x3d, 0x01, 0x01, 0x00, 0x00, 0x03, 0x00, diff --git a/minix/drivers/audio/es1370/ak4531.c b/minix/drivers/audio/es1370/ak4531.c index cfbf194da..50998d702 100644 --- a/minix/drivers/audio/es1370/ak4531.c +++ b/minix/drivers/audio/es1370/ak4531.c @@ -26,7 +26,7 @@ #define MUTE 0x80 -static int ak4531_write(u8_t address, u8_t data); +static int ak4531_write(uint8_t address, uint8_t data); static int ak4531_finished(void); static int set_volume(struct volume_level *level, int cmd_left, int cmd_right, int max_level); @@ -36,14 +36,14 @@ static u16_t status_register; static u16_t status_bit; static u16_t poll_address; -u8_t mixer_values[0x20] = { +uint8_t mixer_values[0x20] = { 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, /* 0x00 - 0x07 */ 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x08, /* 0x08 - 0x0f */ 0x7e, 0x3d, 0x01, 0x01, 0x00, 0x00, 0x03, 0x00, /* 0x10 - 0x17 */ 0x00, 0x01 /* 0x18 - 0x19 */ }; #if 0 -u8_t mixer_values[0x20] = { +uint8_t mixer_values[0x20] = { 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, /* 0x00 - 0x07 */ 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, /* 0x08 - 0x0f */ 0x7f, 0x3d, 0x55, 0x26, 0xf7, 0xef, 0x03, 0x00, /* 0x10 - 0x17 */ @@ -66,7 +66,7 @@ static int ak4531_finished(void) { } -static int ak4531_write (u8_t address, u8_t data) { +static int ak4531_write (uint8_t address, uint8_t data) { u16_t to_be_written; diff --git a/minix/drivers/audio/es1370/pci_helper.c b/minix/drivers/audio/es1370/pci_helper.c index 6e6317344..24099166c 100644 --- a/minix/drivers/audio/es1370/pci_helper.c +++ b/minix/drivers/audio/es1370/pci_helper.c @@ -41,7 +41,7 @@ u32_t pci_inl(u16_t port) { } -void pci_outb(u16_t port, u8_t value) { +void pci_outb(u16_t port, uint8_t value) { int s; if ((s=sys_outb(port, value)) !=OK) printf("%s: warning, sys_outb failed: %d\n", DRIVER_NAME, s); diff --git a/minix/drivers/audio/es1370/pci_helper.h b/minix/drivers/audio/es1370/pci_helper.h index ad5583864..942f0b6ce 100644 --- a/minix/drivers/audio/es1370/pci_helper.h +++ b/minix/drivers/audio/es1370/pci_helper.h @@ -5,7 +5,7 @@ unsigned pci_inb(u16_t port); unsigned pci_inw(u16_t port); unsigned pci_inl(u16_t port); -void pci_outb(u16_t port, u8_t value); +void pci_outb(u16_t port, uint8_t value); void pci_outw(u16_t port, u16_t value); void pci_outl(u16_t port, u32_t value); diff --git a/minix/drivers/audio/es1371/AC97.c b/minix/drivers/audio/es1371/AC97.c index a5204a08b..b90269114 100644 --- a/minix/drivers/audio/es1371/AC97.c +++ b/minix/drivers/audio/es1371/AC97.c @@ -340,7 +340,7 @@ static void set_nice_volume(void) { } -static int get_volume(u8_t *left, u8_t *right, int cmd) { +static int get_volume(uint8_t *left, uint8_t *right, int cmd) { u16_t value = 0; AC97_read_unsynced(dev, (u16_t)cmd, &value); @@ -395,8 +395,8 @@ int AC97_get_set_volume(struct volume_level *level, int flag) { static int AC97_get_volume(struct volume_level *level) { int cmd; - u8_t left; - u8_t right; + uint8_t left; + uint8_t right; switch(level->device) { case Master: diff --git a/minix/drivers/audio/es1371/pci_helper.c b/minix/drivers/audio/es1371/pci_helper.c index c2c473fdb..cb2cd8625 100644 --- a/minix/drivers/audio/es1371/pci_helper.c +++ b/minix/drivers/audio/es1371/pci_helper.c @@ -41,7 +41,7 @@ u32_t pci_inl(u16_t port) { } -void pci_outb(u16_t port, u8_t value) { +void pci_outb(u16_t port, uint8_t value) { int s; if ((s=sys_outb(port, value)) !=OK) printf("%s: warning, sys_outb failed: %d\n", DRIVER_NAME, s); diff --git a/minix/drivers/audio/es1371/pci_helper.h b/minix/drivers/audio/es1371/pci_helper.h index ad5583864..942f0b6ce 100644 --- a/minix/drivers/audio/es1371/pci_helper.h +++ b/minix/drivers/audio/es1371/pci_helper.h @@ -5,7 +5,7 @@ unsigned pci_inb(u16_t port); unsigned pci_inw(u16_t port); unsigned pci_inl(u16_t port); -void pci_outb(u16_t port, u8_t value); +void pci_outb(u16_t port, uint8_t value); void pci_outw(u16_t port, u16_t value); void pci_outl(u16_t port, u32_t value); diff --git a/minix/drivers/audio/sb16/sb16.c b/minix/drivers/audio/sb16/sb16.c index 5ef1a1621..7ab7606b4 100644 --- a/minix/drivers/audio/sb16/sb16.c +++ b/minix/drivers/audio/sb16/sb16.c @@ -296,11 +296,11 @@ static void dsp_dma_setup(phys_bytes address, int count, int DmaMode) { /* set DMA mode */ pv_set(pvb[2], DMA8_MODE, (DmaMode == WRITE_DMA ? DMA8_AUTO_PLAY : DMA8_AUTO_REC)); - pv_set(pvb[3], DMA8_ADDR, (u8_t)(address >> 0)); /* Low_byte of address */ - pv_set(pvb[4], DMA8_ADDR, (u8_t)(address >> 8)); /* High byte of address */ - pv_set(pvb[5], DMA8_PAGE, (u8_t)(address >> 16)); /* 64K page number */ - pv_set(pvb[6], DMA8_COUNT, (u8_t)(count >> 0)); /* Low byte of count */ - pv_set(pvb[7], DMA8_COUNT, (u8_t)(count >> 8)); /* High byte of count */ + pv_set(pvb[3], DMA8_ADDR, (uint8_t)(address >> 0)); /* Low_byte of address */ + pv_set(pvb[4], DMA8_ADDR, (uint8_t)(address >> 8)); /* High byte of address */ + pv_set(pvb[5], DMA8_PAGE, (uint8_t)(address >> 16)); /* 64K page number */ + pv_set(pvb[6], DMA8_COUNT, (uint8_t)(count >> 0)); /* Low byte of count */ + pv_set(pvb[7], DMA8_COUNT, (uint8_t)(count >> 8)); /* High byte of count */ pv_set(pvb[8], DMA8_MASK, SB_DMA_8); /* Enable DMA channel */ sys_voutb(pvb, 9); @@ -317,8 +317,8 @@ static void dsp_dma_setup(phys_bytes address, int count, int DmaMode) { pv_set(pvb[3], DMA16_ADDR, (address >> 1) & 0xFF); /* Low_byte of address */ pv_set(pvb[4], DMA16_ADDR, (address >> 9) & 0xFF); /* High byte of address */ pv_set(pvb[5], DMA16_PAGE, (address >> 16) & 0xFE); /* 128K page number */ - pv_set(pvb[6], DMA16_COUNT, (u8_t)(count >> 1)); /* Low byte of count */ - pv_set(pvb[7], DMA16_COUNT, (u8_t)(count >> 9)); /* High byte of count */ + pv_set(pvb[6], DMA16_COUNT, (uint8_t)(count >> 1)); /* Low byte of count */ + pv_set(pvb[7], DMA16_COUNT, (uint8_t)(count >> 9)); /* High byte of count */ pv_set(pvb[8], DMA16_MASK, SB_DMA_16 & 3); /* Enable DMA channel */ sys_voutb(pvb, 9); diff --git a/minix/drivers/audio/trident/io.h b/minix/drivers/audio/trident/io.h index aacf26223..14e6079e2 100644 --- a/minix/drivers/audio/trident/io.h +++ b/minix/drivers/audio/trident/io.h @@ -6,16 +6,16 @@ #include "trident.h" /* I/O function */ -static u8_t my_inb(u32_t port) { +static uint8_t my_inb(u32_t port) { u32_t value; int r; #ifdef DMA_BASE_IOMAP - value = *(volatile u8_t *)(port); + value = *(volatile uint8_t *)(port); #else if ((r = sys_inb(port, &value)) != OK) printf("SDR: sys_inb failed: %d\n", r); #endif - return (u8_t)value; + return (uint8_t)value; } #define sdr_in8(port, offset) (my_inb((port) + (offset))) @@ -48,9 +48,9 @@ static u32_t my_inl(u32_t port) { static void my_outb(u32_t port, u32_t value) { int r; #ifdef DMA_BASE_IOMAP - *(volatile u8_t *)(port) = value; + *(volatile uint8_t *)(port) = value; #else - if ((r = sys_outb(port, (u8_t)value)) != OK) + if ((r = sys_outb(port, (uint8_t)value)) != OK) printf("SDR: sys_outb failed: %d\n", r); #endif } diff --git a/minix/drivers/audio/trident/mixer.c b/minix/drivers/audio/trident/mixer.c index c07d1f2b2..f97b4d85b 100644 --- a/minix/drivers/audio/trident/mixer.c +++ b/minix/drivers/audio/trident/mixer.c @@ -1,7 +1,7 @@ #include "mixer.h" #ifdef MIXER_AK4531 -u8_t mixer_value[] = { +uint8_t mixer_value[] = { 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x08, 0x7e, 0x3d, 0x01, 0x01, 0x00, 0x00, 0x03, 0x00, diff --git a/minix/drivers/audio/trident/trident.c b/minix/drivers/audio/trident/trident.c index e96f76dd1..e9a4cf7a0 100644 --- a/minix/drivers/audio/trident/trident.c +++ b/minix/drivers/audio/trident/trident.c @@ -234,7 +234,7 @@ static int dev_probe(void) { int devind, i, ioflag; u32_t device, bar, size, base; u16_t vid, did, temp; - u8_t *reg; + uint8_t *reg; pci_init(); device = pci_first_dev(&devind, &vid, &did); diff --git a/minix/drivers/audio/trident/trident.h b/minix/drivers/audio/trident/trident.h index b95bd025f..faee0833e 100644 --- a/minix/drivers/audio/trident/trident.h +++ b/minix/drivers/audio/trident/trident.h @@ -83,7 +83,7 @@ typedef struct aud_sub_dev_conf_t { u32_t sign; u32_t busy; u32_t fragment_size; - u8_t format; + uint8_t format; } aud_sub_dev_conf_t; typedef struct DEV_STRUCT { diff --git a/minix/drivers/bus/pci/main.c b/minix/drivers/bus/pci/main.c index a21080a62..29f5d68b7 100644 --- a/minix/drivers/bus/pci/main.c +++ b/minix/drivers/bus/pci/main.c @@ -117,7 +117,7 @@ static void do_find_dev(message *mp) { int r, devind; - u8_t bus, dev, func; + uint8_t bus, dev, func; bus= mp->m1_i1; dev= mp->m1_i2; @@ -341,7 +341,7 @@ static void do_attr_r8(message *mp) { int r, devind, port; - u8_t v; + uint8_t v; devind= mp->m2_i1; port= mp->m2_i2; @@ -419,7 +419,7 @@ static void do_attr_w8(message *mp) { int r, devind, port; - u8_t v; + uint8_t v; devind= mp->m2_i1; port= mp->m2_i2; diff --git a/minix/drivers/bus/pci/pci.c b/minix/drivers/bus/pci/pci.c index 833e46156..2b5344076 100644 --- a/minix/drivers/bus/pci/pci.c +++ b/minix/drivers/bus/pci/pci.c @@ -48,10 +48,10 @@ static struct pcibus int pb_devind; int pb_busnr; - u8_t (*pb_rreg8)(int busind, int devind, int port); + uint8_t (*pb_rreg8)(int busind, int devind, int port); u16_t (*pb_rreg16)(int busind, int devind, int port); u32_t (*pb_rreg32)(int busind, int devind, int port); - void (*pb_wreg8)(int busind, int devind, int port, u8_t value); + void (*pb_wreg8)(int busind, int devind, int port, uint8_t value); void (*pb_wreg16)(int busind, int devind, int port, u16_t value); void (*pb_wreg32)(int busind, int devind, int port, u32_t value); u16_t (*pb_rsts)(int busind); @@ -61,19 +61,19 @@ static int nr_pcibus= 0; static struct pcidev { - u8_t pd_busnr; - u8_t pd_dev; - u8_t pd_func; - u8_t pd_baseclass; - u8_t pd_subclass; - u8_t pd_infclass; + uint8_t pd_busnr; + uint8_t pd_dev; + uint8_t pd_func; + uint8_t pd_baseclass; + uint8_t pd_subclass; + uint8_t pd_infclass; u16_t pd_vid; u16_t pd_did; u16_t pd_sub_vid; u16_t pd_sub_did; - u8_t pd_ilr; + uint8_t pd_ilr; - u8_t pd_inuse; + uint8_t pd_inuse; endpoint_t pd_proc; struct bar @@ -125,7 +125,7 @@ pci_inl(u16_t port) { } static void -pci_outb(u16_t port, u8_t value) { +pci_outb(u16_t port, uint8_t value) { int s; if ((s=sys_outb(port, value)) !=OK) printf("PCI: warning, sys_outb failed: %d\n", s); @@ -145,10 +145,10 @@ pci_outl(u16_t port, u32_t value) { printf("PCI: warning, sys_outl failed: %d\n", s); } -static u8_t +static uint8_t pcii_rreg8(int busind, int devind, int port) { - u8_t v; + uint8_t v; int s; v= PCII_RREG8_(pcibus[busind].pb_busnr, @@ -206,7 +206,7 @@ pcii_rreg32(int busind, int devind, int port) } static void -pcii_wreg8(int busind, int devind, int port, u8_t value) +pcii_wreg8(int busind, int devind, int port, uint8_t value) { int s; #if 0 @@ -312,7 +312,7 @@ get_busind(int busnr) /*===========================================================================* * Unprotected helper functions * *===========================================================================*/ -static u8_t +static uint8_t __pci_attr_r8(int devind, int port) { int busnr, busind; @@ -343,7 +343,7 @@ __pci_attr_r32(int devind, int port) } static void -__pci_attr_w8(int devind, int port, u8_t value) +__pci_attr_w8(int devind, int port, uint8_t value) { int busnr, busind; @@ -417,7 +417,7 @@ pcii_wsts(int busind, u16_t value) } static int -is_duplicate(u8_t busnr, u8_t dev, u8_t func) +is_duplicate(uint8_t busnr, uint8_t dev, uint8_t func) { int i; @@ -463,7 +463,7 @@ pci_vid_name(u16_t vid) static void -print_hyper_cap(int devind, u8_t capptr) +print_hyper_cap(int devind, uint8_t capptr) { u32_t v; u16_t cmd; @@ -530,7 +530,7 @@ print_hyper_cap(int devind, u8_t capptr) static void print_capabilities(int devind) { - u8_t status, capptr, type, next, subtype; + uint8_t status, capptr, type, next, subtype; const char *str; /* Check capabilities bit in the device status register */ @@ -659,7 +659,7 @@ static int do_amd_isabr(int devind) { int i, busnr, dev, func, xdevind, irq, edge; - u8_t levmask; + uint8_t levmask; u16_t pciirq; /* Find required function */ @@ -734,7 +734,7 @@ static int do_via_isabr(int devind) { int i, irq, edge; - u8_t levmask; + uint8_t levmask; levmask= __pci_attr_r8(devind, VIA_ISABR_EL); irq= 0; /* lint */ @@ -1523,8 +1523,8 @@ probe_bus(int busind) uint32_t t3; #endif u16_t vid, did, sts, sub_vid, sub_did; - u8_t headt; - u8_t baseclass, subclass, infclass; + uint8_t headt; + uint8_t baseclass, subclass, infclass; int devind, busnr; const char *s, *dstr; @@ -1785,7 +1785,7 @@ do_pcibridge(int busind) int devind, busnr; int ind, type; u16_t vid, did; - u8_t sbusn, baseclass, subclass, infclass, headt; + uint8_t sbusn, baseclass, subclass, infclass, headt; u32_t t3; vid= did= 0; /* lint */ @@ -2184,7 +2184,7 @@ map_service(struct rprocpub *rpub) * _pci_find_dev * *===========================================================================*/ int -_pci_find_dev(u8_t bus, u8_t dev, u8_t func, int *devindp) +_pci_find_dev(uint8_t bus, uint8_t dev, uint8_t func, int *devindp) { int devind; @@ -2379,7 +2379,7 @@ _pci_ids(int devind, u16_t *vidp, u16_t *didp) * _pci_rescan_bus * *===========================================================================*/ void -_pci_rescan_bus(u8_t busnr) +_pci_rescan_bus(uint8_t busnr) { int busind; @@ -2472,7 +2472,7 @@ _pci_get_bar(int devind, int port, u32_t *base, u32_t *size, * _pci_attr_r8 * *===========================================================================*/ int -_pci_attr_r8(int devind, int port, u8_t *vp) +_pci_attr_r8(int devind, int port, uint8_t *vp) { if (devind < 0 || devind >= nr_pcidev) return EINVAL; @@ -2517,7 +2517,7 @@ _pci_attr_r32(int devind, int port, u32_t *vp) * _pci_attr_w8 * *===========================================================================*/ int -_pci_attr_w8(int devind, int port, u8_t value) +_pci_attr_w8(int devind, int port, uint8_t value) { if (devind < 0 || devind >= nr_pcidev) return EINVAL; diff --git a/minix/drivers/bus/pci/pci.h b/minix/drivers/bus/pci/pci.h index 110a73e8b..125ce43a1 100644 --- a/minix/drivers/bus/pci/pci.h +++ b/minix/drivers/bus/pci/pci.h @@ -47,9 +47,9 @@ int _pci_first_dev(struct rs_pci *aclp, int *devindp, u16_t *vidp, u16_t *didp); int _pci_next_dev(struct rs_pci *aclp, int *devindp, u16_t *vidp, u16_t *didp); -int _pci_find_dev(u8_t bus, u8_t dev, u8_t func, int *devindp); +int _pci_find_dev(uint8_t bus, uint8_t dev, uint8_t func, int *devindp); -void _pci_rescan_bus(u8_t busnr); +void _pci_rescan_bus(uint8_t busnr); const char *_pci_dev_name(u16_t vid, u16_t did); @@ -59,12 +59,12 @@ int _pci_slot_name(int devind, char **cpp); int _pci_ids(int devind, u16_t *vidp, u16_t *didp); /* PCI Config Read functions */ -int _pci_attr_r8(int devind, int port, u8_t *vp); +int _pci_attr_r8(int devind, int port, uint8_t *vp); int _pci_attr_r16(int devind, int port, u16_t *vp); int _pci_attr_r32(int devind, int port, u32_t *vp); /* PCI Config Write functions */ -int _pci_attr_w8(int devind, int port, u8_t value); +int _pci_attr_w8(int devind, int port, uint8_t value); int _pci_attr_w16(int devind, int port, u16_t value); int _pci_attr_w32(int devind, int port, u32_t value); diff --git a/minix/drivers/bus/ti1225/ti1225.c b/minix/drivers/bus/ti1225/ti1225.c index fb7b68849..65f583f32 100644 --- a/minix/drivers/bus/ti1225/ti1225.c +++ b/minix/drivers/bus/ti1225/ti1225.c @@ -20,7 +20,7 @@ Created: Dec 2005 by Philip Homburg static struct port { int p_devind; - u8_t p_cb_busnr; + uint8_t p_cb_busnr; u16_t p_exca_port; #if USE_INTS int p_irq; @@ -138,7 +138,7 @@ static int hw_probe(int skip) *===========================================================================*/ static void hw_init(struct port *pp, int devind) { - u8_t v8; + uint8_t v8; u16_t v16; u32_t v32; #if USE_INTS @@ -250,7 +250,7 @@ static void do_int(struct port *pp) socket_5v, socket_3v, socket_Xv, socket_Yv; spin_t spin; u32_t csr_event, csr_present, csr_control; - u8_t v8; + uint8_t v8; u16_t v16; #if USE_INTS int r; diff --git a/minix/drivers/iommu/amddev/amddev.c b/minix/drivers/iommu/amddev/amddev.c index b5d61927f..a0964e833 100644 --- a/minix/drivers/iommu/amddev/amddev.c +++ b/minix/drivers/iommu/amddev/amddev.c @@ -46,10 +46,10 @@ Driver for the AMD Device Exclusion Vector (DEV) #define DEVF_ERR_ADDR_HI 7 static int dev_devind; -static u8_t dev_capptr; -static u8_t *table; +static uint8_t dev_capptr; +static uint8_t *table; -static int find_dev(int *devindp, u8_t *capaddrp); +static int find_dev(int *devindp, uint8_t *capaddrp); static u32_t read_reg(int function, int index); static void write_reg(int function, int index, u32_t value); static void init_domain(int index); @@ -200,10 +200,10 @@ static void sef_cb_signal_handler(int signo) /* Returns 0 if no device found, or 1 if a device is found. */ static int find_dev(devindp, capaddrp) int *devindp; -u8_t *capaddrp; +uint8_t *capaddrp; { int r, devind, first; - u8_t capptr, type, next, subtype; + uint8_t capptr, type, next, subtype; u16_t vid, did, status; pci_init(); diff --git a/minix/drivers/net/dec21140A/dec21140A.c b/minix/drivers/net/dec21140A/dec21140A.c index 50f643c86..d76bdc32c 100644 --- a/minix/drivers/net/dec21140A/dec21140A.c +++ b/minix/drivers/net/dec21140A/dec21140A.c @@ -34,7 +34,7 @@ static void de_reset(const dpeth_t *); static void de_hw_conf(const dpeth_t *); static void de_start(const dpeth_t *); static void de_setup_frame(const dpeth_t *, const netdriver_addr_t *); -static u16_t de_read_rom(const dpeth_t *, u8_t, u8_t); +static u16_t de_read_rom(const dpeth_t *, uint8_t, uint8_t); static dpeth_t de_state; @@ -137,7 +137,7 @@ static int de_probe(dpeth_t *dep, unsigned int skip) return TRUE; } -static u16_t de_read_rom(const dpeth_t *dep, u8_t addr, u8_t nbAddrBits) +static u16_t de_read_rom(const dpeth_t *dep, uint8_t addr, uint8_t nbAddrBits) { u16_t retVal = 0; int i; @@ -294,7 +294,7 @@ static void de_init_buf(dpeth_t *dep) descr_vir += sizeof(de_descr_t); /* assign space for buffer */ - loc_descr->buf1 = (u8_t*)buffer_vir; + loc_descr->buf1 = (uint8_t*)buffer_vir; buffer_vir += (i==DESCR_RECV ? DE_RECV_BUF_SIZE : DE_SEND_BUF_SIZE); loc_descr->buf2 = 0; loc_descr++; diff --git a/minix/drivers/net/dec21140A/dec21140A.h b/minix/drivers/net/dec21140A/dec21140A.h index b0a13e91a..6ef143a6f 100644 --- a/minix/drivers/net/dec21140A/dec21140A.h +++ b/minix/drivers/net/dec21140A/dec21140A.h @@ -32,8 +32,8 @@ typedef struct de_descr { typedef struct de_local_descr { de_descr_t *descr; - u8_t *buf1; - u8_t *buf2; + uint8_t *buf1; + uint8_t *buf2; } de_loc_descr_t; typedef struct dpeth { @@ -45,9 +45,9 @@ typedef struct dpeth { /* Space reservation. We will allocate all structures later in the code. here we just make sure we have the space we need at compile time */ - u8_t sendrecv_descr_buf[(DE_NB_SEND_DESCR+DE_NB_RECV_DESCR)* + uint8_t sendrecv_descr_buf[(DE_NB_SEND_DESCR+DE_NB_RECV_DESCR)* sizeof(de_descr_t)]; - u8_t sendrecv_buf[DE_NB_SEND_DESCR*DE_SEND_BUF_SIZE + + uint8_t sendrecv_buf[DE_NB_SEND_DESCR*DE_SEND_BUF_SIZE + DE_NB_RECV_DESCR*DE_RECV_BUF_SIZE]; phys_bytes sendrecv_descr_phys_addr[2]; de_loc_descr_t descr[2][MAX(DE_NB_RECV_DESCR, DE_NB_SEND_DESCR)]; @@ -59,7 +59,7 @@ typedef struct dpeth { /* Serial ROM */ #define SROM_BITWIDTH 6 - u8_t srom[((1<de_dp8390_port+reg,data)) typedef struct dp_rcvhdr { - u8_t dr_status; /* Copy of rsr */ - u8_t dr_next; /* Pointer to next packet */ - u8_t dr_rbcl; /* Receive Byte Count Low */ - u8_t dr_rbch; /* Receive Byte Count High */ + uint8_t dr_status; /* Copy of rsr */ + uint8_t dr_next; /* Pointer to next packet */ + uint8_t dr_rbcl; /* Receive Byte Count Low */ + uint8_t dr_rbch; /* Receive Byte Count High */ } dp_rcvhdr_t; void ns_init(dpeth_t *); diff --git a/minix/drivers/net/dpeth/wd.c b/minix/drivers/net/dpeth/wd.c index 9a46dce10..692a85cfa 100644 --- a/minix/drivers/net/dpeth/wd.c +++ b/minix/drivers/net/dpeth/wd.c @@ -259,7 +259,7 @@ static int we_16bitboard(dpeth_t *dep) * 8 bit board. */ unsigned int icr; - u8_t tlb; + uint8_t tlb; icr = inb_we(dep, EPL_ICR); @@ -292,7 +292,7 @@ static int we_16bitslot(dpeth_t *dep) static int we_ultra(dpeth_t *dep) { /* Determine if we has an '790 chip. */ - u8_t tlb; + uint8_t tlb; tlb = inb_we(dep, EPL_TLB); return tlb == E_TLB_SMC8216C; diff --git a/minix/drivers/net/e1000/e1000.c b/minix/drivers/net/e1000/e1000.c index b8a30691c..707b052e1 100644 --- a/minix/drivers/net/e1000/e1000.c +++ b/minix/drivers/net/e1000/e1000.c @@ -854,7 +854,7 @@ eeprom_ich(e1000_t * e, int reg) u32_t flash_linear_addr; u32_t flash_data = 0; int ret_val = -1; - u8_t count = 0; + uint8_t count = 0; u16_t data = 0; E1000_DEBUG(3, ("e1000_read_flash_data_ich8lan")); diff --git a/minix/drivers/net/e1000/e1000.h b/minix/drivers/net/e1000/e1000.h index 308b934da..926297da0 100644 --- a/minix/drivers/net/e1000/e1000.h +++ b/minix/drivers/net/e1000/e1000.h @@ -114,8 +114,8 @@ typedef struct e1000 { int irq; /**< Interrupt Request Vector. */ int irq_hook; /**< Interrupt Request Vector Hook. */ - u8_t *regs; /**< Memory mapped hardware registers. */ - u8_t *flash; /**< Optional flash memory. */ + uint8_t *regs; /**< Memory mapped hardware registers. */ + uint8_t *flash; /**< Optional flash memory. */ u32_t flash_base_addr; /**< Flash base address. */ u16_t (*eeprom_read)(struct e1000 *, int reg); /**< Function to read the EEPROM. */ diff --git a/minix/drivers/net/e1000/e1000_hw.h b/minix/drivers/net/e1000/e1000_hw.h index 42740a34f..2e40b7940 100644 --- a/minix/drivers/net/e1000/e1000_hw.h +++ b/minix/drivers/net/e1000/e1000_hw.h @@ -34,8 +34,8 @@ typedef struct e1000_rx_desc u32_t buffer_h; /**< High 32-bits of the receive data buffer (unused). */ u16_t length; /**< Size of the receive buffer. */ u16_t checksum; /**< Packet checksum. */ - u8_t status; /**< Descriptor status. */ - u8_t errors; /**< Descriptor errors. */ + uint8_t status; /**< Descriptor status. */ + uint8_t errors; /**< Descriptor errors. */ u16_t special; /**< VLAN information. */ } e1000_rx_desc_t; @@ -48,10 +48,10 @@ typedef struct e1000_tx_desc u32_t buffer; /**< Address of the transmit buffer (64-bit). */ u32_t buffer_h; /**< High 32-bits of the transmit buffer (unused). */ u16_t length; /**< Size of the transmit buffer contents. */ - u8_t checksum_off; /**< Checksum Offset. */ - u8_t command; /**< Command field. */ - u8_t status; /**< Status field. */ - u8_t checksum_st; /**< Checksum Start. */ + uint8_t checksum_off; /**< Checksum Offset. */ + uint8_t command; /**< Command field. */ + uint8_t status; /**< Status field. */ + uint8_t checksum_st; /**< Checksum Start. */ u16_t special; /**< Optional special bits. */ } e1000_tx_desc_t; diff --git a/minix/drivers/net/fxp/fxp.c b/minix/drivers/net/fxp/fxp.c index bc70627d9..af64eaf97 100644 --- a/minix/drivers/net/fxp/fxp.c +++ b/minix/drivers/net/fxp/fxp.c @@ -75,7 +75,7 @@ typedef struct fxp irq_hook_t fxp_hook; struct sc fxp_stat; - u8_t fxp_conf_bytes[CC_BYTES_NR]; + uint8_t fxp_conf_bytes[CC_BYTES_NR]; } fxp_t; /* fxp_type */ @@ -123,9 +123,9 @@ static void fxp_report_link(fxp_t *fp); static u16_t eeprom_read(fxp_t *fp, int reg); static void eeprom_addrsize(fxp_t *fp); static u16_t mii_read(fxp_t *fp, int reg); -static u8_t do_inb(port_t port); +static uint8_t do_inb(port_t port); static u32_t do_inl(port_t port); -static void do_outb(port_t port, u8_t v); +static void do_outb(port_t port, uint8_t v); static void do_outl(port_t port, u32_t v); static void tell_iommu(vir_bytes start, size_t size, int pci_bus, int pci_dev, int pci_func); @@ -236,7 +236,7 @@ static int fxp_probe(fxp_t *fp, int skip) int r, devind; u16_t vid, did, cr; u32_t bar; - u8_t ilr, rev; + uint8_t ilr, rev; const char *str; #if VERBOSE const char *dname; @@ -792,7 +792,7 @@ static int fxp_send(struct netdriver_data *data, size_t size) static void fxp_check_restart(fxp_t *fp) { port_t port; - u8_t scb_status; + uint8_t scb_status; if (!fp->fxp_rx_need_restart) return; @@ -936,7 +936,7 @@ int check_idle; { spin_t spin; port_t port; - u8_t scb_cmd; + uint8_t scb_cmd; port= fp->fxp_base_port; @@ -976,7 +976,7 @@ int check_idle; { spin_t spin; port_t port; - u8_t scb_cmd; + uint8_t scb_cmd; port= fp->fxp_base_port; @@ -1128,7 +1128,7 @@ static void fxp_check_ints(fxp_t *fp) port_t port; u32_t busaddr; u16_t tx_status; - u8_t scb_status; + uint8_t scb_status; struct tx *txp; netdriver_recv(); @@ -1702,7 +1702,7 @@ static u16_t mii_read(fxp_t *fp, int reg) return v & CM_DATA_MASK; } -static u8_t do_inb(port_t port) +static uint8_t do_inb(port_t port) { int r; u32_t value; @@ -1724,7 +1724,7 @@ static u32_t do_inl(port_t port) return value; } -static void do_outb(port_t port, u8_t value) +static void do_outb(port_t port, uint8_t value) { int r; diff --git a/minix/drivers/net/fxp/fxp.h b/minix/drivers/net/fxp/fxp.h index 5c64f222d..44c77b8ce 100644 --- a/minix/drivers/net/fxp/fxp.h +++ b/minix/drivers/net/fxp/fxp.h @@ -170,8 +170,8 @@ struct ias u16_t ias_status; u16_t ias_command; u32_t ias_linkaddr; - u8_t ias_ethaddr[6]; - u8_t ias_reserved[2]; + uint8_t ias_ethaddr[6]; + uint8_t ias_reserved[2]; }; /* Configure (2) */ @@ -181,7 +181,7 @@ struct cbl_conf u16_t cc_status; u16_t cc_command; u32_t cc_linkaddr; - u8_t cc_bytes[CC_BYTES_NR]; + uint8_t cc_bytes[CC_BYTES_NR]; }; /* Byte 0 */ @@ -427,9 +427,9 @@ struct tx u32_t tx_linkaddr; u32_t tx_tbda; u16_t tx_size; - u8_t tx_tthresh; - u8_t tx_ntbd; - u8_t tx_buf[NDEV_ETH_PACKET_MAX_TAGGED]; + uint8_t tx_tthresh; + uint8_t tx_ntbd; + uint8_t tx_buf[NDEV_ETH_PACKET_MAX_TAGGED]; }; #define TXS_C 0x8000 /* Transmit DMA has completed */ @@ -506,7 +506,7 @@ struct rfd u32_t rfd_reserved; u16_t rfd_res; u16_t rfd_size; - u8_t rfd_buf[NDEV_ETH_PACKET_MAX_TAGGED]; + uint8_t rfd_buf[NDEV_ETH_PACKET_MAX_TAGGED]; }; #define RFDS_C 0x8000 /* Frame Reception Completed */ diff --git a/minix/drivers/net/ip1000/io.h b/minix/drivers/net/ip1000/io.h index 6db8d002b..2ce19f91f 100644 --- a/minix/drivers/net/ip1000/io.h +++ b/minix/drivers/net/ip1000/io.h @@ -6,16 +6,16 @@ #include "ip1000.h" /* I/O function */ -static u8_t my_inb(u32_t port) { +static uint8_t my_inb(u32_t port) { u32_t value; int r; #ifdef DMA_BASE_IOMAP - value = *(volatile u8_t *)(port); + value = *(volatile uint8_t *)(port); #else if ((r = sys_inb(port, &value)) != OK) printf("NDR: sys_inb failed: %d\n", r); #endif - return (u8_t)value; + return (uint8_t)value; } #define ndr_in8(port, offset) (my_inb((port) + (offset))) @@ -48,9 +48,9 @@ static u32_t my_inl(u32_t port) { static void my_outb(u32_t port, u32_t value) { int r; #ifdef DMA_BASE_IOMAP - *(volatile u8_t *)(port) = value; + *(volatile uint8_t *)(port) = value; #else - if ((r = sys_outb(port, (u8_t)value)) != OK) + if ((r = sys_outb(port, (uint8_t)value)) != OK) printf("NDR: sys_outb failed: %d\n", r); #endif } diff --git a/minix/drivers/net/ip1000/ip1000.c b/minix/drivers/net/ip1000/ip1000.c index 919b1eb4f..9891fa062 100644 --- a/minix/drivers/net/ip1000/ip1000.c +++ b/minix/drivers/net/ip1000/ip1000.c @@ -34,7 +34,7 @@ static int dev_init_io(u32_t *base); static int dev_init_mii(u32_t *base); static void dev_intr_control(u32_t *base, int flag); static void dev_rx_tx_control(u32_t *base, int flag); -static void dev_get_addr(u32_t *base, u8_t *pa); +static void dev_get_addr(u32_t *base, uint8_t *pa); static int dev_check_link(u32_t *base); static void dev_set_rec_mode(u32_t *base, int mode); static void dev_start_tx(u32_t *base); @@ -77,7 +77,7 @@ static u16_t read_eeprom(u32_t base, int addr) { static u16_t read_phy_reg(u32_t base, int phy_addr, int phy_reg) { int i, j, fieldlen[8]; u32_t field[8]; - u8_t data, polar; + uint8_t data, polar; field[0] = 0xffffffff; fieldlen[0] = 32; field[1] = 0x0001; fieldlen[1] = 2; @@ -130,7 +130,7 @@ static u16_t read_phy_reg(u32_t base, int phy_addr, int phy_reg) { static void write_phy_reg(u32_t base, int phy_addr, int phy_reg, u16_t val) { int i, j, fieldlen[8]; u32_t field[8]; - u8_t data, polar; + uint8_t data, polar; field[0] = 0xffffffff; fieldlen[0] = 32; field[1] = 0x0001; fieldlen[1] = 2; @@ -212,7 +212,7 @@ static int dev_init_io(u32_t *base) { * -- Return OK means success, Others means failure */ static int dev_init_mii(u32_t *base) { int i, phyaddr; - u8_t revision; + uint8_t revision; u16_t phyctrl, cr1000, length, address, value; u16_t *param; u32_t status, base0 = base[0]; @@ -234,7 +234,7 @@ static int dev_init_mii(u32_t *base) { param = &PhyParam[0]; length = (*param) & 0x00ff; - revision = (u8_t)((*param) >> 8); + revision = (uint8_t)((*param) >> 8); param++; while (length != 0) { if (g_driver.revision == revision) { @@ -250,7 +250,7 @@ static int dev_init_mii(u32_t *base) { else { param += length / 2; length = *param & 0x00ff; - revision = (u8_t)((*param) >> 8); + revision = (uint8_t)((*param) >> 8); param++; } } @@ -280,18 +280,18 @@ static void dev_rx_tx_control(u32_t *base, int flag) { } /* Get MAC address to the array 'pa' (### GET_MAC_ADDR ###) */ -static void dev_get_addr(u32_t *base, u8_t *pa) { +static void dev_get_addr(u32_t *base, uint8_t *pa) { u32_t i, sta_addr[3], base0 = base[0]; for (i = 0; i < 3; i++) { sta_addr[i] = read_eeprom(base0, 16 + i); ndr_out16(base0, (REG_STA_ADDR0 + i * 2), sta_addr[i]); } - pa[0] = (u8_t)(ndr_in16(base0, REG_STA_ADDR0) & 0x00ff); - pa[1] = (u8_t)((ndr_in16(base0, REG_STA_ADDR0) & 0xff00) >> 8); - pa[2] = (u8_t)(ndr_in16(base0, REG_STA_ADDR1) & 0x00ff); - pa[3] = (u8_t)((ndr_in16(base0, REG_STA_ADDR1) & 0xff00) >> 8); - pa[4] = (u8_t)(ndr_in16(base0, REG_STA_ADDR2) & 0x00ff); - pa[5] = (u8_t)((ndr_in16(base0, REG_STA_ADDR2) & 0xff00) >> 8); + pa[0] = (uint8_t)(ndr_in16(base0, REG_STA_ADDR0) & 0x00ff); + pa[1] = (uint8_t)((ndr_in16(base0, REG_STA_ADDR0) & 0xff00) >> 8); + pa[2] = (uint8_t)(ndr_in16(base0, REG_STA_ADDR1) & 0x00ff); + pa[3] = (uint8_t)((ndr_in16(base0, REG_STA_ADDR1) & 0xff00) >> 8); + pa[4] = (uint8_t)(ndr_in16(base0, REG_STA_ADDR2) & 0x00ff); + pa[5] = (uint8_t)((ndr_in16(base0, REG_STA_ADDR2) & 0xff00) >> 8); } /* Check link status (### CHECK_LINK ###) @@ -655,8 +655,8 @@ static int dev_probe(NDR_driver *pdev, int instance) { int devind, ioflag, i; u16_t cr, vid, did; u32_t bar, size, base; - u8_t irq, rev; - u8_t *reg; + uint8_t irq, rev; + uint8_t *reg; /* Find pci device */ pci_init(); @@ -797,7 +797,7 @@ err_real_reset: /* Configure MAC address */ static void dev_conf_addr(NDR_driver *pdev, netdriver_addr_t *addr) { - u8_t pa[6]; + uint8_t pa[6]; /* Get MAC address */ /* ### GET_MAC_ADDR ### */ diff --git a/minix/drivers/net/lan8710a/lan8710a.c b/minix/drivers/net/lan8710a/lan8710a.c index ed34c940c..7aeb182fa 100644 --- a/minix/drivers/net/lan8710a/lan8710a.c +++ b/minix/drivers/net/lan8710a/lan8710a.c @@ -17,7 +17,7 @@ static void lan8710a_tick(void); static void lan8710a_enable_interrupt(int interrupt); static void lan8710a_map_regs(void); -static void lan8710a_dma_config_tx(u8_t desc_idx); +static void lan8710a_dma_config_tx(uint8_t desc_idx); static void lan8710a_dma_reset_init(void); static void lan8710a_init_addr(netdriver_addr_t *addr, unsigned int instance); static void lan8710a_init_desc(void); @@ -342,7 +342,7 @@ lan8710a_stop(void) * lan8710a_dma_config_tx * *============================================================================*/ static void -lan8710a_dma_config_tx(u8_t desc_idx) +lan8710a_dma_config_tx(uint8_t desc_idx) { phys_bytes phys_addr; int i; @@ -416,7 +416,7 @@ lan8710a_init_desc(void) lan8710a_desc_t *p_rx_desc; lan8710a_desc_t *p_tx_desc; phys_bytes buf_phys_addr; - u8_t i; + uint8_t i; /* Attempt to allocate. */ if ((lan8710a_state.p_rx_buf = alloc_contig((LAN8710A_NUM_RX_DESC @@ -704,7 +704,7 @@ lan8710a_send(struct netdriver_data * data, size_t size) { lan8710a_t *e = &lan8710a_state; lan8710a_desc_t *p_tx_desc; - u8_t *buf; + uint8_t *buf; /* setup descriptors */ p_tx_desc = &(e->tx_desc[e->tx_desc_idx]); @@ -757,7 +757,7 @@ lan8710a_recv(struct netdriver_data * data, size_t max) lan8710a_t *e = &lan8710a_state; lan8710a_desc_t *p_rx_desc; u32_t flags; - u8_t *buf; + uint8_t *buf; size_t off, size, chunk; /* diff --git a/minix/drivers/net/lan8710a/lan8710a.h b/minix/drivers/net/lan8710a/lan8710a.h index 3bcce840d..bf0b1b986 100644 --- a/minix/drivers/net/lan8710a/lan8710a.h +++ b/minix/drivers/net/lan8710a/lan8710a.h @@ -68,10 +68,10 @@ typedef struct lan8710a_t phys_bytes tx_desc_phy; int irq_rx_hook; /* Rx interrupt Request Vector Hook. */ int irq_tx_hook; /* Tx interrupt Request Vector Hook. */ - u8_t *regs; + uint8_t *regs; u32_t phy_address; - u8_t *p_rx_buf; /* pointer to the buffer with receive frames */ - u8_t *p_tx_buf; /* pointer to the buffer with transmit frames */ + uint8_t *p_rx_buf; /* pointer to the buffer with receive frames */ + uint8_t *p_tx_buf; /* pointer to the buffer with transmit frames */ u16_t tx_desc_idx; /* index of the next transmit desciptor */ u16_t rx_desc_idx; /* index of the next receive desciptor */ diff --git a/minix/drivers/net/lance/lance.c b/minix/drivers/net/lance/lance.c index eed618c16..f5b4ca403 100644 --- a/minix/drivers/net/lance/lance.c +++ b/minix/drivers/net/lance/lance.c @@ -41,7 +41,7 @@ static void lance_init_hw(ether_card_t *ec, netdriver_addr_t *addr, unsigned int instance); /* Accesses Lance Control and Status Registers */ -static u8_t in_byte(port_t port); +static uint8_t in_byte(port_t port); static u16_t in_word(port_t port); static void out_word(port_t port, u16_t value); static u16_t read_csr(port_t ioaddr, u16_t csrno); @@ -838,7 +838,7 @@ static void lance_init_hw(ether_card_t *ec, netdriver_addr_t *addr, /*===========================================================================* * in_byte * *===========================================================================*/ -static u8_t in_byte(port_t port) +static uint8_t in_byte(port_t port) { int r; u32_t value; diff --git a/minix/drivers/net/rtl8139/rtl8139.c b/minix/drivers/net/rtl8139/rtl8139.c index 1aedde499..c7a4f94b3 100644 --- a/minix/drivers/net/rtl8139/rtl8139.c +++ b/minix/drivers/net/rtl8139/rtl8139.c @@ -43,7 +43,7 @@ static unsigned my_inl(u16_t port) { #define rl_inw(port, offset) (my_inw((port) + (offset))) #define rl_inl(port, offset) (my_inl((port) + (offset))) -static void my_outb(u16_t port, u8_t value) { +static void my_outb(u16_t port, uint8_t value) { int s; if ((s=sys_outb(port, value)) !=OK) printf("RTL8139: warning, sys_outb failed: %d\n", s); @@ -260,7 +260,7 @@ static int rl_probe(re_t *rep, unsigned int skip) int r, devind; u16_t cr, vid, did; u32_t bar; - u8_t ilr; + uint8_t ilr; #if VERBOSE const char *dname; #endif @@ -798,7 +798,7 @@ static void rl_check_ints(re_t *rep) static unsigned int rl_get_link(uint32_t *media) { port_t port; - u8_t msr; + uint8_t msr; u16_t mii_ctrl; re_t *rep; @@ -832,7 +832,7 @@ static void rl_report_link(re_t *rep) { port_t port; u16_t mii_ctrl, mii_status, mii_ana, mii_anlpa, mii_ane, mii_extstat; - u8_t msr; + uint8_t msr; int f, link_up; port= rep->re_base_port; @@ -1123,7 +1123,7 @@ static void mii_print_stat_speed(u16_t stat, u16_t extstat) static void rl_clear_rx(re_t *rep) { port_t port; - u8_t cr; + uint8_t cr; rep->re_clear_rx= FALSE; port= rep->re_base_port; diff --git a/minix/drivers/net/rtl8169/rtl8169.c b/minix/drivers/net/rtl8169/rtl8169.c index e59e2155b..3549acc0c 100644 --- a/minix/drivers/net/rtl8169/rtl8169.c +++ b/minix/drivers/net/rtl8169/rtl8169.c @@ -126,7 +126,7 @@ static unsigned my_inl(u16_t port) #define rl_inw(port, offset) (my_inw((port) + (offset))) #define rl_inl(port, offset) (my_inl((port) + (offset))) -static void my_outb(u16_t port, u8_t value) +static void my_outb(u16_t port, uint8_t value) { int s; @@ -402,7 +402,7 @@ static int rl_probe(re_t *rep, unsigned int skip) int r, devind; u16_t vid, did; u32_t bar; - u8_t ilr; + uint8_t ilr; #if VERBOSE const char *dname; #endif @@ -1057,7 +1057,7 @@ static void rl_check_ints(re_t *rep) static unsigned int rl_get_link(uint32_t *media) { re_t *rep; - u8_t mii_status; + uint8_t mii_status; rep = &re_state; @@ -1088,7 +1088,7 @@ static unsigned int rl_get_link(uint32_t *media) static void rl_report_link(re_t *rep) { port_t port; - u8_t mii_status; + uint8_t mii_status; port = rep->re_base_port; diff --git a/minix/drivers/net/virtio_net/virtio_net.h b/minix/drivers/net/virtio_net/virtio_net.h index 5edcf1cbc..eadf85eba 100644 --- a/minix/drivers/net/virtio_net/virtio_net.h +++ b/minix/drivers/net/virtio_net/virtio_net.h @@ -59,7 +59,7 @@ struct virtio_net_config { /* The config defining mac address (if VIRTIO_NET_F_MAC) */ - u8_t mac[6]; + uint8_t mac[6]; /* See VIRTIO_NET_F_STATUS and VIRTIO_NET_S_* above */ u16_t status; } __attribute__((packed)); @@ -69,13 +69,13 @@ struct virtio_net_config { struct virtio_net_hdr { #define VIRTIO_NET_HDR_F_NEEDS_CSUM 1 // Use csum_start, csum_offset #define VIRTIO_NET_HDR_F_DATA_VALID 2 // Csum is valid - u8_t flags; + uint8_t flags; #define VIRTIO_NET_HDR_GSO_NONE 0 // Not a GSO frame #define VIRTIO_NET_HDR_GSO_TCPV4 1 // GSO frame, IPv4 TCP (TSO) #define VIRTIO_NET_HDR_GSO_UDP 3 // GSO frame, IPv4 UDP (UFO) #define VIRTIO_NET_HDR_GSO_TCPV6 4 // GSO frame, IPv6 TCP #define VIRTIO_NET_HDR_GSO_ECN 0x80 // TCP has ECN set - u8_t gso_type; + uint8_t gso_type; u16_t hdr_len; /* Ethernet + IP + tcp/udp hdrs */ u16_t gso_size; /* Bytes to append to hdr_len per frame */ u16_t csum_start; /* Position to start checksumming from */ @@ -97,11 +97,11 @@ struct virtio_net_hdr_mrg_rxbuf { * command goes in between. */ struct virtio_net_ctrl_hdr { - u8_t class; - u8_t cmd; + uint8_t class; + uint8_t cmd; } __attribute__((packed)); -typedef u8_t virtio_net_ctrl_ack; +typedef uint8_t virtio_net_ctrl_ack; #define VIRTIO_NET_OK 0 #define VIRTIO_NET_ERR 1 @@ -139,7 +139,7 @@ typedef u8_t virtio_net_ctrl_ack; struct virtio_net_ctrl_mac { u32_t entries; #define ETH_ALEN 6 - u8_t macs[][ETH_ALEN]; + uint8_t macs[][ETH_ALEN]; } __attribute__((packed)); #define VIRTIO_NET_CTRL_MAC 1 diff --git a/minix/drivers/net/vt6105/io.h b/minix/drivers/net/vt6105/io.h index f313bd87e..0dc71fbef 100644 --- a/minix/drivers/net/vt6105/io.h +++ b/minix/drivers/net/vt6105/io.h @@ -6,16 +6,16 @@ #include "vt6105.h" /* I/O function */ -static u8_t my_inb(u32_t port) { +static uint8_t my_inb(u32_t port) { u32_t value; int r; #ifdef DMA_BASE_IOMAP - value = *(volatile u8_t *)(port); + value = *(volatile uint8_t *)(port); #else if ((r = sys_inb(port, &value)) != OK) printf("NDR: sys_inb failed: %d\n", r); #endif - return (u8_t)value; + return (uint8_t)value; } #define ndr_in8(port, offset) (my_inb((port) + (offset))) @@ -48,9 +48,9 @@ static u32_t my_inl(u32_t port) { static void my_outb(u32_t port, u32_t value) { int r; #ifdef DMA_BASE_IOMAP - *(volatile u8_t *)(port) = value; + *(volatile uint8_t *)(port) = value; #else - if ((r = sys_outb(port, (u8_t)value)) != OK) + if ((r = sys_outb(port, (uint8_t)value)) != OK) printf("NDR: sys_outb failed: %d\n", r); #endif } diff --git a/minix/drivers/net/vt6105/vt6105.c b/minix/drivers/net/vt6105/vt6105.c index 58e97c279..575e10780 100644 --- a/minix/drivers/net/vt6105/vt6105.c +++ b/minix/drivers/net/vt6105/vt6105.c @@ -34,7 +34,7 @@ static int dev_init_io(u32_t *base); static int dev_init_mii(u32_t *base); static void dev_intr_control(u32_t *base, int flag); static void dev_rx_tx_control(u32_t *base, int flag); -static void dev_get_addr(u32_t *base, u8_t *pa); +static void dev_get_addr(u32_t *base, uint8_t *pa); static int dev_check_link(u32_t *base); static void dev_set_rec_mode(u32_t *base, int mode); static void dev_start_tx(u32_t *base); @@ -76,7 +76,7 @@ static int dev_real_reset(u32_t *base) { * -- Return OK means success, Others means failure */ static int dev_init_io(u32_t *base) { u32_t base0 = base[0]; - u8_t stick; + uint8_t stick; stick = ndr_in8(base0, REG_STICK); ndr_out8(base0, REG_STICK, stick & 0xfc); ndr_out16(base0, REG_BCR, 0x0006); @@ -124,7 +124,7 @@ static void dev_rx_tx_control(u32_t *base, int flag) { } /* Get MAC address to the array 'pa' (### GET_MAC_ADDR ###) */ -static void dev_get_addr(u32_t *base, u8_t *pa) { +static void dev_get_addr(u32_t *base, uint8_t *pa) { u32_t i, base0 = base[0]; for (i = 0; i < 6; i++) pa[i] = ndr_in8(base0, REG_ADDR + i); @@ -463,8 +463,8 @@ static int dev_probe(NDR_driver *pdev, int instance) { int devind, ioflag, i; u16_t cr, vid, did; u32_t bar, size, base; - u8_t irq, rev; - u8_t *reg; + uint8_t irq, rev; + uint8_t *reg; /* Find pci device */ pci_init(); @@ -605,7 +605,7 @@ err_real_reset: /* Configure MAC address */ static void dev_conf_addr(NDR_driver *pdev, netdriver_addr_t *addr) { - u8_t pa[6]; + uint8_t pa[6]; /* Get MAC address */ /* ### GET_MAC_ADDR ### */ diff --git a/minix/drivers/power/acpi/osminixxf.c b/minix/drivers/power/acpi/osminixxf.c index 30013550c..422d8c873 100644 --- a/minix/drivers/power/acpi/osminixxf.c +++ b/minix/drivers/power/acpi/osminixxf.c @@ -82,7 +82,7 @@ static u32_t pci_inl(u16_t port) { return value; } -static void pci_outb(u16_t port, u8_t value) { +static void pci_outb(u16_t port, uint8_t value) { int s; if ((s=sys_outb(port, value)) !=OK) printf("ACPI: warning, sys_outb failed: %d\n", s); @@ -958,7 +958,7 @@ AcpiOsReadPciConfiguration ( switch (Width) { case 8: - *(u8_t *)Value = PCII_RREG8_(PciId->Bus, PciId->Device, + *(uint8_t *)Value = PCII_RREG8_(PciId->Bus, PciId->Device, PciId->Function, Register); break; case 16: diff --git a/minix/drivers/power/acpi/pci.c b/minix/drivers/power/acpi/pci.c index 6db5259d7..86a028ee5 100644 --- a/minix/drivers/power/acpi/pci.c +++ b/minix/drivers/power/acpi/pci.c @@ -137,7 +137,7 @@ void do_get_irq(message *m) static void add_irq(struct pci_bridge * bridge, unsigned dev, unsigned pin, - u8_t irq) + uint8_t irq) { assert(dev < PCI_MAX_DEVICES && pin < PCI_MAX_PINS); diff --git a/minix/drivers/storage/ahci/ahci.c b/minix/drivers/storage/ahci/ahci.c index e4d2938a1..b01952a88 100644 --- a/minix/drivers/storage/ahci/ahci.c +++ b/minix/drivers/storage/ahci/ahci.c @@ -143,7 +143,7 @@ static struct port_state { volatile u32_t *reg; /* memory-mapped port registers */ - u8_t *mem_base; /* primary memory buffer virtual address */ + uint8_t *mem_base; /* primary memory buffer virtual address */ phys_bytes mem_phys; /* primary memory buffer physical address */ vir_bytes mem_size; /* primary memory buffer size */ @@ -152,12 +152,12 @@ static struct port_state { phys_bytes fis_phys; /* FIS receive buffer physical address */ u32_t *cl_base; /* command list buffer virtual address */ phys_bytes cl_phys; /* command list buffer physical address */ - u8_t *ct_base[NR_CMDS]; /* command table virtual address */ + uint8_t *ct_base[NR_CMDS]; /* command table virtual address */ phys_bytes ct_phys[NR_CMDS]; /* command table physical address */ - u8_t *tmp_base; /* temporary storage buffer virtual address */ + uint8_t *tmp_base; /* temporary storage buffer virtual address */ phys_bytes tmp_phys; /* temporary storage buffer physical address */ - u8_t *pad_base; /* sector padding buffer virtual address */ + uint8_t *pad_base; /* sector padding buffer virtual address */ phys_bytes pad_phys; /* sector padding buffer physical address */ vir_bytes pad_size; /* sector padding buffer size */ @@ -229,7 +229,7 @@ static int ahci_exiting = FALSE; /* exit after last close? */ #define millis_to_hz(ms) (((ms) * sys_hz() + 999) / 1000) static void port_set_cmd(struct port_state *ps, int cmd, cmd_fis_t *fis, - u8_t packet[ATAPI_PACKET_SIZE], prd_t *prdt, int nr_prds, int write); + uint8_t packet[ATAPI_PACKET_SIZE], prd_t *prdt, int nr_prds, int write); static void port_issue(struct port_state *ps, int cmd, clock_t timeout); static int port_exec(struct port_state *ps, int cmd, clock_t timeout); static void port_timeout(int arg); @@ -265,7 +265,7 @@ static struct blockdriver ahci_dtab = { * atapi_exec * *===========================================================================*/ static int atapi_exec(struct port_state *ps, int cmd, - u8_t packet[ATAPI_PACKET_SIZE], size_t size, int write) + uint8_t packet[ATAPI_PACKET_SIZE], size_t size, int write) { /* Execute an ATAPI command. Return OK or error. */ @@ -304,7 +304,7 @@ static int atapi_test_unit(struct port_state *ps, int cmd) { /* Test whether the ATAPI device and medium are ready. */ - u8_t packet[ATAPI_PACKET_SIZE]; + uint8_t packet[ATAPI_PACKET_SIZE]; memset(packet, 0, sizeof(packet)); packet[0] = ATAPI_CMD_TEST_UNIT; @@ -320,7 +320,7 @@ static int atapi_request_sense(struct port_state *ps, int cmd, int *sense) /* Request error (sense) information from an ATAPI device, and return * the sense key. The additional sense codes are not used at this time. */ - u8_t packet[ATAPI_PACKET_SIZE]; + uint8_t packet[ATAPI_PACKET_SIZE]; int r; memset(packet, 0, sizeof(packet)); @@ -348,7 +348,7 @@ static int atapi_load_eject(struct port_state *ps, int cmd, int load) { /* Load or eject a medium in an ATAPI device. */ - u8_t packet[ATAPI_PACKET_SIZE]; + uint8_t packet[ATAPI_PACKET_SIZE]; memset(packet, 0, sizeof(packet)); packet[0] = ATAPI_CMD_START_STOP; @@ -364,7 +364,7 @@ static int atapi_read_capacity(struct port_state *ps, int cmd) { /* Retrieve the LBA count and sector size of an ATAPI medium. */ - u8_t packet[ATAPI_PACKET_SIZE], *buf; + uint8_t packet[ATAPI_PACKET_SIZE], *buf; int r; memset(packet, 0, sizeof(packet)); @@ -495,7 +495,7 @@ static int atapi_transfer(struct port_state *ps, int cmd, u64_t start_lba, /* Perform data transfer from or to an ATAPI device. */ cmd_fis_t fis; - u8_t packet[ATAPI_PACKET_SIZE]; + uint8_t packet[ATAPI_PACKET_SIZE]; /* Fill in a Register Host to Device FIS. */ memset(&fis, 0, sizeof(fis)); @@ -773,7 +773,7 @@ static int gen_set_wcache(struct port_state *ps, int enable) /*===========================================================================* * ct_set_fis * *===========================================================================*/ -static vir_bytes ct_set_fis(u8_t *ct, cmd_fis_t *fis, unsigned int tag) +static vir_bytes ct_set_fis(uint8_t *ct, cmd_fis_t *fis, unsigned int tag) { /* Fill in the Frame Information Structure part of a command table, * and return the resulting FIS size (in bytes). We only support the @@ -811,7 +811,7 @@ static vir_bytes ct_set_fis(u8_t *ct, cmd_fis_t *fis, unsigned int tag) /*===========================================================================* * ct_set_packet * *===========================================================================*/ -static void ct_set_packet(u8_t *ct, u8_t packet[ATAPI_PACKET_SIZE]) +static void ct_set_packet(uint8_t *ct, uint8_t packet[ATAPI_PACKET_SIZE]) { /* Fill in the packet part of a command table. */ @@ -822,7 +822,7 @@ static void ct_set_packet(u8_t *ct, u8_t packet[ATAPI_PACKET_SIZE]) /*===========================================================================* * ct_set_prdt * *===========================================================================*/ -static void ct_set_prdt(u8_t *ct, prd_t *prdt, int nr_prds) +static void ct_set_prdt(uint8_t *ct, prd_t *prdt, int nr_prds) { /* Fill in the PRDT part of a command table. */ @@ -843,12 +843,12 @@ static void ct_set_prdt(u8_t *ct, prd_t *prdt, int nr_prds) * port_set_cmd * *===========================================================================*/ static void port_set_cmd(struct port_state *ps, int cmd, cmd_fis_t *fis, - u8_t packet[ATAPI_PACKET_SIZE], prd_t *prdt, int nr_prds, int write) + uint8_t packet[ATAPI_PACKET_SIZE], prd_t *prdt, int nr_prds, int write) { /* Prepare the given command for execution, by constructing a command * table and setting up a command list entry pointing to the table. */ - u8_t *ct; + uint8_t *ct; u32_t *cl; vir_bytes size; @@ -1916,7 +1916,7 @@ static void port_alloc(struct port_state *ps) ps->fis_phys = ps->mem_phys + fis_off; assert(ps->fis_phys % AHCI_FIS_SIZE == 0); - ps->tmp_base = (u8_t *) (ps->mem_base + tmp_off); + ps->tmp_base = (uint8_t *) (ps->mem_base + tmp_off); ps->tmp_phys = ps->mem_phys + tmp_off; assert(ps->tmp_phys % AHCI_TMP_ALIGN == 0); @@ -1987,7 +1987,7 @@ static void port_init(struct port_state *ps) for (i = 0; i < NR_CMDS; i++) init_timer(&ps->cmd_info[i].timer); - ps->reg = (u32_t *) ((u8_t *) hba_state.base + + ps->reg = (u32_t *) ((uint8_t *) hba_state.base + AHCI_MEM_BASE_SIZE + AHCI_MEM_PORT_SIZE * (ps - port_state)); /* Allocate memory for the port. */ diff --git a/minix/drivers/storage/ahci/ahci.h b/minix/drivers/storage/ahci/ahci.h index ab7c52c74..3d19f49e6 100644 --- a/minix/drivers/storage/ahci/ahci.h +++ b/minix/drivers/storage/ahci/ahci.h @@ -241,15 +241,15 @@ * the contents of this structure are later converted to an actual FIS. */ typedef struct { - u8_t cf_cmd; /* Command */ - u8_t cf_feat; /* Features */ + uint8_t cf_cmd; /* Command */ + uint8_t cf_feat; /* Features */ u32_t cf_lba; /* LBA (24-bit) */ - u8_t cf_dev; /* Device */ + uint8_t cf_dev; /* Device */ u32_t cf_lba_exp; /* LBA (exp) (24-bit) */ - u8_t cf_feat_exp; /* Features (exp) */ - u8_t cf_sec; /* Sector Count */ - u8_t cf_sec_exp; /* Sector Count (exp) */ - u8_t cf_ctl; /* Control */ + uint8_t cf_feat_exp; /* Features (exp) */ + uint8_t cf_sec; /* Sector Count */ + uint8_t cf_sec_exp; /* Sector Count (exp) */ + uint8_t cf_ctl; /* Control */ } cmd_fis_t; /* Physical Region Descriptor (PRD). For internal and sys_vumap() use only; diff --git a/minix/drivers/storage/at_wini/at_wini.c b/minix/drivers/storage/at_wini/at_wini.c index 6b1295d0d..291af2baf 100644 --- a/minix/drivers/storage/at_wini/at_wini.c +++ b/minix/drivers/storage/at_wini/at_wini.c @@ -24,19 +24,19 @@ /* Common command block */ struct command { - u8_t precomp; /* REG_PRECOMP, etc. */ - u8_t count; - u8_t sector; - u8_t cyl_lo; - u8_t cyl_hi; - u8_t ldh; - u8_t command; + uint8_t precomp; /* REG_PRECOMP, etc. */ + uint8_t count; + uint8_t sector; + uint8_t cyl_lo; + uint8_t cyl_hi; + uint8_t ldh; + uint8_t command; /* The following at for LBA48 */ - u8_t count_prev; - u8_t sector_prev; - u8_t cyl_lo_prev; - u8_t cyl_hi_prev; + uint8_t count_prev; + uint8_t sector_prev; + uint8_t cyl_lo_prev; + uint8_t cyl_hi_prev; }; /* Timeouts and max retries. */ @@ -84,7 +84,7 @@ int w_command; /* current command in execution */ static int w_drive; /* selected drive */ static struct device *w_dv; /* device's base and size */ -static u8_t *tmp_buf; +static uint8_t *tmp_buf; #define ATA_DMA_SECTORS 64 #define ATA_DMA_BUF_SIZE (ATA_DMA_SECTORS*SECTOR_SIZE) @@ -98,8 +98,8 @@ struct prdte { phys_bytes prdte_base; u16_t prdte_count; - u8_t prdte_reserved; - u8_t prdte_flags; + uint8_t prdte_reserved; + uint8_t prdte_flags; }; #define PRDT_BYTES (sizeof(struct prdte) * N_PRDTE) @@ -137,7 +137,7 @@ static int at_intr_wait(void); static int w_waitfor(int mask, int value); static int w_waitfor_dma(unsigned int mask, unsigned int value); static void w_geometry(devminor_t minor, struct part_geom *entry); -static int atapi_sendpacket(u8_t *packet, unsigned cnt, int do_dma); +static int atapi_sendpacket(uint8_t *packet, unsigned cnt, int do_dma); static int atapi_intr_wait(int dma, size_t max); static int atapi_open(void); static void atapi_close(void); @@ -356,7 +356,7 @@ static void w_init(int devind, u16_t vid, u16_t did) * from the PCI slot if it is there. */ int r, irq, native_hook, compat_hook, is_ide, nhooks; - u8_t bcr, scr, interface; + uint8_t bcr, scr, interface; u16_t cr; u32_t base_cmd, base_ctl, base_dma; @@ -1745,7 +1745,7 @@ static void atapi_close(void) static void sense_request(void) { int r, i; - static u8_t sense[100], packet[ATAPI_PACKETSIZE]; + static uint8_t sense[100], packet[ATAPI_PACKETSIZE]; packet[0] = SCSI_SENSE; packet[1] = 0; @@ -1790,7 +1790,7 @@ static int atapi_transfer( unsigned long block; u64_t dv_size = w_dv->dv_size; unsigned nbytes, nblocks, before, chunk; - static u8_t packet[ATAPI_PACKETSIZE]; + static uint8_t packet[ATAPI_PACKETSIZE]; size_t addr_offset = 0; int dmabytes = 0, piobytes = 0; ssize_t total = 0; @@ -1974,7 +1974,7 @@ static int atapi_transfer( * atapi_sendpacket * *===========================================================================*/ static int atapi_sendpacket(packet, cnt, do_dma) -u8_t *packet; +uint8_t *packet; unsigned cnt; int do_dma; { diff --git a/minix/drivers/storage/floppy/floppy.c b/minix/drivers/storage/floppy/floppy.c index fbdb2cc22..a10c29509 100644 --- a/minix/drivers/storage/floppy/floppy.c +++ b/minix/drivers/storage/floppy/floppy.c @@ -159,14 +159,14 @@ * 3 720K 1.44M 9 80 300 RPM 250 kbps PS/2, et al. */ static struct density { - u8_t secpt; /* sectors per track */ - u8_t cyls; /* tracks per side */ - u8_t steps; /* steps per cylinder (2 = double step) */ - u8_t test; /* sector to try for density test */ - u8_t rate; /* data rate (2=250, 1=300, 0=500 kbps) */ + uint8_t secpt; /* sectors per track */ + uint8_t cyls; /* tracks per side */ + uint8_t steps; /* steps per cylinder (2 = double step) */ + uint8_t test; /* sector to try for density test */ + uint8_t rate; /* data rate (2=250, 1=300, 0=500 kbps) */ clock_t start_ms; /* motor start (milliseconds) */ - u8_t gap; /* gap size */ - u8_t spec1; /* first specify byte (SRT/HUT) */ + uint8_t gap; /* gap size */ + uint8_t spec1; /* first specify byte (SRT/HUT) */ } fdensity[NT] = { { 9, 40, 1, 4*9, 2, 500, 0x2A, 0xDF }, /* 360K / 360K */ { 15, 80, 1, 14, 0, 500, 0x1B, 0xDF }, /* 1.2M / 1.2M */ @@ -188,8 +188,8 @@ static struct density { #define b(d) (1 << (d)) /* bit for density d. */ static struct test_order { - u8_t t_density; /* floppy/drive type */ - u8_t t_class; /* limit drive to this class of densities */ + uint8_t t_density; /* floppy/drive type */ + uint8_t t_class; /* limit drive to this class of densities */ } test_order[NT-1] = { { 6, b(3) | b(6) }, /* 1.44M {720K, 1.44M} */ { 1, b(1) | b(4) | b(5) }, /* 1.2M {1.2M, 360K, 720K} */ @@ -210,8 +210,8 @@ static struct floppy { /* main drive struct, one entry per drive */ unsigned fl_sector; /* sector addressed */ unsigned fl_head; /* head number addressed */ char fl_calibration; /* CALIBRATED or UNCALIBRATED */ - u8_t fl_density; /* NO_DENS = ?, 0 = 360K; 1 = 360K/1.2M; etc.*/ - u8_t fl_class; /* bitmap for possible densities */ + uint8_t fl_density; /* NO_DENS = ?, 0 = 360K; 1 = 360K/1.2M; etc.*/ + uint8_t fl_class; /* bitmap for possible densities */ minix_timer_t fl_tmr_stop; /* timer to stop motor */ struct device fl_geom; /* Geometry of the drive */ struct device fl_part[NR_PARTITIONS]; /* partition's base & size */ @@ -229,7 +229,7 @@ static unsigned f_sectors; /* equal to f_dp->secpt (needed a lot) */ u16_t f_busy; /* BSY_IDLE, BSY_IO, BSY_WAKEN */ static struct device *f_dv; /* device's base and size */ static struct disk_parameter_s fmt_param; /* parameters for format */ -static u8_t f_results[MAX_RESULTS];/* the controller can give lots of output */ +static uint8_t f_results[MAX_RESULTS];/* the controller can give lots of output */ /* The floppy uses various timers. These are managed by the floppy driver * itself, because only a single synchronous alarm is available per process. @@ -252,7 +252,7 @@ static void start_motor(void); static int seek(void); static int fdc_transfer(int do_write); static int fdc_results(void); -static int fdc_command(const u8_t *cmd, int len); +static int fdc_command(const uint8_t *cmd, int len); static void fdc_out(int val); static int recalibrate(void); static void f_reset(void); @@ -461,7 +461,7 @@ static ssize_t f_transfer( unsigned long position; signed long uoffsets[MAX_SECTORS], *up; cp_grant_id_t ugrants[MAX_SECTORS], *ug = NULL; - u8_t cmd[3]; + uint8_t cmd[3]; ssize_t total; if (f_prepare(minor) == NULL) return(ENXIO); @@ -808,7 +808,7 @@ static int seek(void) int r; message mess; int ipc_status; - u8_t cmd[3]; + uint8_t cmd[3]; /* Are we already on the correct cylinder? */ if (fp->fl_calibration == UNCALIBRATED) @@ -869,7 +869,7 @@ static int fdc_transfer(int do_write) struct floppy *fp = f_fp; int r, s; - u8_t cmd[9]; + uint8_t cmd[9]; /* Never attempt a transfer if the drive is uncalibrated or motor is off. */ if (fp->fl_calibration == UNCALIBRATED) return(ERR_TRANSFER); @@ -985,7 +985,7 @@ static int fdc_results(void) * fdc_command * *===========================================================================*/ static int fdc_command( - const u8_t *cmd, /* command bytes */ + const uint8_t *cmd, /* command bytes */ int len /* command length */ ) { @@ -1055,7 +1055,7 @@ static int recalibrate(void) struct floppy *fp = f_fp; int r; - u8_t cmd[2]; + uint8_t cmd[2]; /* Issue the RECALIBRATE command and wait for the interrupt. */ cmd[0] = FDC_RECALIBRATE; /* tell drive to recalibrate itself */ @@ -1106,7 +1106,7 @@ static void f_reset(void) * 3) the sense interrupt clears the interrupt (not clear which one). * and for some reason the reset does not work. */ - (void) fdc_command((u8_t *) 0, 0); /* need only the timer */ + (void) fdc_command((uint8_t *) 0, 0); /* need only the timer */ motor_status = 0; pv_set(byte_out[0], DOR, 0); /* strobe reset bit low */ pv_set(byte_out[1], DOR, ENABLE_INT); /* strobe it high again */ @@ -1219,7 +1219,7 @@ static int read_id(void) struct floppy *fp = f_fp; int result; - u8_t cmd[2]; + uint8_t cmd[2]; /* Never attempt a read id if the drive is uncalibrated or motor is off. */ if (fp->fl_calibration == UNCALIBRATED) return(ERR_READ_ID); diff --git a/minix/drivers/storage/virtio_blk/virtio_blk.c b/minix/drivers/storage/virtio_blk/virtio_blk.c index 68737bd82..3102821c6 100644 --- a/minix/drivers/storage/virtio_blk/virtio_blk.c +++ b/minix/drivers/storage/virtio_blk/virtio_blk.c @@ -94,7 +94,7 @@ static int virtio_blk_device(devminor_t minor, device_id_t *id); static int virtio_blk_flush(void); static void virtio_blk_terminate(void); static void virtio_blk_cleanup(void); -static int virtio_blk_status2error(u8_t status); +static int virtio_blk_status2error(uint8_t status); static int virtio_blk_alloc_requests(void); static void virtio_blk_free_requests(void); static int virtio_blk_feature_setup(void); @@ -351,7 +351,7 @@ virtio_blk_transfer(devminor_t minor, int write, u64_t position, /* Put the status at the end */ phys[pcnt + 1].vp_addr = status_phys + tid * sizeof(status_vir[0]); - phys[pcnt + 1].vp_size = sizeof(u8_t); + phys[pcnt + 1].vp_size = sizeof(uint8_t); /* Status always needs write access */ phys[1 + pcnt].vp_addr |= 1; @@ -546,7 +546,7 @@ virtio_blk_cleanup(void) } static int -virtio_blk_status2error(u8_t status) +virtio_blk_status2error(uint8_t status) { /* Convert a status from the host to an error */ switch (status) { diff --git a/minix/drivers/storage/virtio_blk/virtio_blk.h b/minix/drivers/storage/virtio_blk/virtio_blk.h index 28a01365e..7459c20b5 100644 --- a/minix/drivers/storage/virtio_blk/virtio_blk.h +++ b/minix/drivers/storage/virtio_blk/virtio_blk.h @@ -54,8 +54,8 @@ struct virtio_blk_config { /* geometry the device (if VIRTIO_BLK_F_GEOMETRY) */ struct virtio_blk_geometry { u16_t cylinders; - u8_t heads; - u8_t sectors; + uint8_t heads; + uint8_t sectors; } geometry; /* block size of device (if VIRTIO_BLK_F_BLK_SIZE) */ @@ -63,9 +63,9 @@ struct virtio_blk_config { /* the next 4 entries are guarded by VIRTIO_BLK_F_TOPOLOGY */ /* exponent for physical block per logical block. */ - u8_t physical_block_exp; + uint8_t physical_block_exp; /* alignment offset in logical blocks. */ - u8_t alignment_offset; + uint8_t alignment_offset; /* minimum I/O size without performance penalty in logical blocks. */ u16_t min_io_size; /* optimal sustained I/O size in logical blocks. */ diff --git a/minix/drivers/system/random/random.c b/minix/drivers/system/random/random.c index fa76481c4..73859135e 100644 --- a/minix/drivers/system/random/random.c +++ b/minix/drivers/system/random/random.c @@ -26,7 +26,7 @@ static int pool_ind[TOTAL_SOURCES]; static SHA256_CTX pool_ctx[NR_POOLS]; static unsigned samples= 0; static int got_seeded= 0; -static u8_t random_key[2*AES_BLOCKSIZE]; +static uint8_t random_key[2*AES_BLOCKSIZE]; static u32_t count_lo, count_hi; static u32_t reseed_count; @@ -83,9 +83,9 @@ void *buf; size_t size; { int n, r; - u8_t *cp; + uint8_t *cp; rd_keyinstance key; - u8_t output[AES_BLOCKSIZE]; + uint8_t output[AES_BLOCKSIZE]; r= rijndael_makekey(&key, sizeof(random_key), random_key); assert(r == 0); @@ -183,7 +183,7 @@ rd_keyinstance *keyp; void *data; { int r; - u8_t input[AES_BLOCKSIZE]; + uint8_t input[AES_BLOCKSIZE]; memset(input, '\0', sizeof(input)); @@ -207,7 +207,7 @@ static void reseed() { int i; SHA256_CTX ctx; - u8_t digest[SHA256_DIGEST_LENGTH]; + uint8_t digest[SHA256_DIGEST_LENGTH]; if (samples < MIN_SAMPLES) return; diff --git a/minix/drivers/tty/tty/arch/i386/console.c b/minix/drivers/tty/tty/arch/i386/console.c index 5f48c2b79..85cbeb86e 100644 --- a/minix/drivers/tty/tty/arch/i386/console.c +++ b/minix/drivers/tty/tty/arch/i386/console.c @@ -913,7 +913,7 @@ tty_t *tp; /* Initialize the screen driver. */ console_t *cons; u16_t bios_columns, bios_crtbase, bios_fontlines; - u8_t bios_rows; + uint8_t bios_rows; int line; int s; static int vdu_initialized = 0; diff --git a/minix/drivers/usb/usb_hub/usb_hub.c b/minix/drivers/usb/usb_hub/usb_hub.c index 6925f681c..da2515d5a 100644 --- a/minix/drivers/usb/usb_hub/usb_hub.c +++ b/minix/drivers/usb/usb_hub/usb_hub.c @@ -604,7 +604,7 @@ hub_port_feature(int port_num, class_code code, class_feature feature) /* Standard get endpoint request */ setup_buf.bRequestType = 0x23; - setup_buf.bRequest = (u8_t)code; + setup_buf.bRequest = (uint8_t)code; setup_buf.wValue = (u16_t)feature; setup_buf.wIndex = (u16_t)port_num; setup_buf.wLength = 0; @@ -659,7 +659,7 @@ hub_get_port_status(int port_num, hub_port_status * p) /* Standard get endpoint request */ setup_buf.bRequestType = 0xA3; - setup_buf.bRequest = (u8_t)GET_STATUS; + setup_buf.bRequest = (uint8_t)GET_STATUS; setup_buf.wValue = 0x00; setup_buf.wIndex = (u16_t)port_num; setup_buf.wLength = sizeof(*p); diff --git a/minix/drivers/video/fb/fb.c b/minix/drivers/video/fb/fb.c index d7a00eb8f..02c7c4fa9 100644 --- a/minix/drivers/video/fb/fb.c +++ b/minix/drivers/video/fb/fb.c @@ -350,7 +350,7 @@ paint_restartlogo(int minor) static void paint_centered(int minor, char *data, int width, int height) { - u8_t pixel[3]; + uint8_t pixel[3]; u32_t i, min_x, min_y, max_x, max_y, x_painted = 0, rows = 0; int r, bytespp; struct device dev; diff --git a/minix/drivers/vmm_guest/vbox/hgcm.c b/minix/drivers/vmm_guest/vbox/hgcm.c index c230e1d02..b543f98ca 100644 --- a/minix/drivers/vmm_guest/vbox/hgcm.c +++ b/minix/drivers/vmm_guest/vbox/hgcm.c @@ -458,7 +458,7 @@ static int store_pages(int conn, int req, vbox_param_t *inp, size_t *offp) return OK; pagelist = (struct VMMDevHGCMPageList *) - (((u8_t *) hgcm_conn[conn].req[req].ptr) + *offp); + (((uint8_t *) hgcm_conn[conn].req[req].ptr) + *offp); pagelist->flags = 0; if (inp->ptr.dir & VBOX_DIR_IN) diff --git a/minix/fs/ext2/inode.h b/minix/fs/ext2/inode.h index 6ea66c180..5cdbf5a3e 100644 --- a/minix/fs/ext2/inode.h +++ b/minix/fs/ext2/inode.h @@ -46,24 +46,24 @@ EXTERN struct inode { u32_t i_faddr; /* Fragment address */ union { struct { - u8_t l_i_frag; /* Fragment number */ - u8_t l_i_fsize; /* Fragment size */ + uint8_t l_i_frag; /* Fragment number */ + uint8_t l_i_fsize; /* Fragment size */ u16_t i_pad1; u16_t l_i_uid_high; /* these 2 fields */ u16_t l_i_gid_high; /* were reserved2[0] */ u32_t l_i_reserved2; } linux2; struct { - u8_t h_i_frag; /* Fragment number */ - u8_t h_i_fsize; /* Fragment size */ + uint8_t h_i_frag; /* Fragment number */ + uint8_t h_i_fsize; /* Fragment size */ u16_t h_i_mode_high; u16_t h_i_uid_high; u16_t h_i_gid_high; u32_t h_i_author; } hurd2; struct { - u8_t m_i_frag; /* Fragment number */ - u8_t m_i_fsize; /* Fragment size */ + uint8_t m_i_frag; /* Fragment number */ + uint8_t m_i_fsize; /* Fragment size */ u16_t m_pad1; u32_t m_i_reserved2[2]; } masix2; diff --git a/minix/fs/ext2/super.h b/minix/fs/ext2/super.h index 998f6b4e5..b2ed0cd3b 100644 --- a/minix/fs/ext2/super.h +++ b/minix/fs/ext2/super.h @@ -55,7 +55,7 @@ EXTERN struct super_block { u32_t s_feature_compat; /* compatible feature set */ u32_t s_feature_incompat; /* incompatible feature set */ u32_t s_feature_ro_compat; /* readonly-compatible feature set */ - u8_t s_uuid[16]; /* 128-bit uuid for volume */ + uint8_t s_uuid[16]; /* 128-bit uuid for volume */ char s_volume_name[16]; /* volume name */ char s_last_mounted[64]; /* directory where last mounted */ u32_t s_algorithm_usage_bitmap; /* For compression */ @@ -63,19 +63,19 @@ EXTERN struct super_block { * Performance hints. Directory preallocation should only * happen if the EXT2_COMPAT_PREALLOC flag is on. */ - u8_t s_prealloc_blocks; /* Nr of blocks to try to preallocate*/ - u8_t s_prealloc_dir_blocks; /* Nr to preallocate for dirs */ + uint8_t s_prealloc_blocks; /* Nr of blocks to try to preallocate*/ + uint8_t s_prealloc_dir_blocks; /* Nr to preallocate for dirs */ u16_t s_padding1; /* * Journaling support valid if EXT3_FEATURE_COMPAT_HAS_JOURNAL set. */ - u8_t s_journal_uuid[16]; /* uuid of journal superblock */ + uint8_t s_journal_uuid[16]; /* uuid of journal superblock */ u32_t s_journal_inum; /* inode number of journal file */ u32_t s_journal_dev; /* device number of journal file */ u32_t s_last_orphan; /* start of list of inodes to delete */ u32_t s_hash_seed[4]; /* HTREE hash seed */ - u8_t s_def_hash_version; /* Default hash version to use */ - u8_t s_reserved_char_pad; + uint8_t s_def_hash_version; /* Default hash version to use */ + uint8_t s_reserved_char_pad; u16_t s_reserved_word_pad; u32_t s_default_mount_opts; u32_t s_first_meta_bg; /* First metablock block group */ @@ -87,7 +87,7 @@ EXTERN struct super_block { u32_t s_gdb_count; /* Number of group descriptor blocks */ u32_t s_desc_per_block; /* Number of group descriptors per block */ u32_t s_groups_count; /* Number of groups in the fs */ - u8_t s_blocksize_bits; /* Used to calculate offsets + uint8_t s_blocksize_bits; /* Used to calculate offsets * (e.g. inode block), * always s_log_block_size+10. */ diff --git a/minix/fs/ext2/type.h b/minix/fs/ext2/type.h index 1226a51b7..b974de6a2 100644 --- a/minix/fs/ext2/type.h +++ b/minix/fs/ext2/type.h @@ -36,24 +36,24 @@ typedef struct { u32_t i_faddr; /* Fragment address */ union { struct { - u8_t l_i_frag; /* Fragment number */ - u8_t l_i_fsize; /* Fragment size */ + uint8_t l_i_frag; /* Fragment number */ + uint8_t l_i_fsize; /* Fragment size */ u16_t i_pad1; u16_t l_i_uid_high; /* these 2 fields */ u16_t l_i_gid_high; /* were reserved2[0] */ u32_t l_i_reserved2; } linux2; struct { - u8_t h_i_frag; /* Fragment number */ - u8_t h_i_fsize; /* Fragment size */ + uint8_t h_i_frag; /* Fragment number */ + uint8_t h_i_fsize; /* Fragment size */ u16_t h_i_mode_high; u16_t h_i_uid_high; u16_t h_i_gid_high; u32_t h_i_author; } hurd2; struct { - u8_t m_i_frag; /* Fragment number */ - u8_t m_i_fsize; /* Fragment size */ + uint8_t m_i_frag; /* Fragment number */ + uint8_t m_i_fsize; /* Fragment size */ u16_t m_pad1; u32_t m_i_reserved2[2]; } masix2; @@ -70,8 +70,8 @@ typedef struct { struct ext2_disk_dir_desc { u32_t d_ino; u16_t d_rec_len; - u8_t d_name_len; - u8_t d_file_type; + uint8_t d_name_len; + uint8_t d_file_type; char d_name[1]; }; diff --git a/minix/fs/isofs/inode.h b/minix/fs/isofs/inode.h index d0635f8aa..4183af2ce 100644 --- a/minix/fs/isofs/inode.h +++ b/minix/fs/isofs/inode.h @@ -5,18 +5,18 @@ struct iso9660_dir_record { /* * ISO standard directory record. */ - u8_t length; /* The length of the record */ - u8_t ext_attr_rec_length; + uint8_t length; /* The length of the record */ + uint8_t ext_attr_rec_length; u32_t loc_extent_l; /* The same data (in this case loc_extent)is */ u32_t loc_extent_m; /* saved in two ways. The first puts the le- */ u32_t data_length_l; /* ast significant byte first, the second */ u32_t data_length_m; /* does the opposite */ - u8_t rec_date[7]; /* => recording date */ - u8_t file_flags; /* => flags of the file */ - u8_t file_unit_size; /* set of blocks in interleave mode */ - u8_t inter_gap_size; /* gap between file units in interleave mode */ + uint8_t rec_date[7]; /* => recording date */ + uint8_t file_flags; /* => flags of the file */ + uint8_t file_unit_size; /* set of blocks in interleave mode */ + uint8_t inter_gap_size; /* gap between file units in interleave mode */ u32_t vol_seq_number; /* volume sequence number: not used */ - u8_t length_file_id; /* Length name file */ + uint8_t length_file_id; /* Length name file */ char file_id[ISO9660_MAX_FILE_ID_LEN]; /* file name */ } __attribute__((packed)); @@ -24,10 +24,10 @@ struct rrii_dir_record { /* * Rock Ridge directory record extensions. */ - u8_t mtime[7]; /* stat.st_mtime */ - u8_t atime[7]; /* stat.st_atime */ - u8_t ctime[7]; /* stat.st_ctime */ - u8_t birthtime[7]; /* stat.st_birthtime */ + uint8_t mtime[7]; /* stat.st_mtime */ + uint8_t atime[7]; /* stat.st_atime */ + uint8_t ctime[7]; /* stat.st_ctime */ + uint8_t birthtime[7]; /* stat.st_birthtime */ mode_t d_mode; /* file mode */ uid_t uid; /* user ID of the file's owner */ diff --git a/minix/fs/isofs/proto.h b/minix/fs/isofs/proto.h index 8fabfcdb0..ad7185327 100644 --- a/minix/fs/isofs/proto.h +++ b/minix/fs/isofs/proto.h @@ -68,5 +68,5 @@ void free_extent(struct dir_extent *extent); struct buf* read_extent_block(struct dir_extent *e, size_t block); size_t get_extent_absolute_block_id(struct dir_extent *e, size_t block); -time_t date7_to_time_t(const u8_t *date); -void* alloc_mem(size_t s); \ No newline at end of file +time_t date7_to_time_t(const uint8_t *date); +void* alloc_mem(size_t s); diff --git a/minix/fs/isofs/super.h b/minix/fs/isofs/super.h index 9ace51aa2..2122c881c 100644 --- a/minix/fs/isofs/super.h +++ b/minix/fs/isofs/super.h @@ -16,16 +16,16 @@ struct iso9660_vol_pri_desc { * On-disk structure format of the primary volume descriptor, * 2048 bytes long. See ISO specs for details. */ - u8_t vd_type; + uint8_t vd_type; char standard_id[ISO9660_SIZE_STANDARD_ID]; - u8_t vd_version; - u8_t pad1; + uint8_t vd_version; + uint8_t pad1; char system_id[ISO9660_SIZE_SYS_ID]; char volume_id[ISO9660_SIZE_VOLUME_ID]; - u8_t pad2[8]; + uint8_t pad2[8]; u32_t volume_space_size_l; u32_t volume_space_size_m; - u8_t pad3[32]; + uint8_t pad3[32]; u16_t volume_set_size_l; u16_t volume_set_size_m; u16_t volume_sequence_number_l; @@ -38,7 +38,7 @@ struct iso9660_vol_pri_desc { u32_t loc_opt_l_occ_path_table; u32_t loc_m_occ_path_table; u32_t loc_opt_m_occ_path_table; - u8_t root_directory[34]; + uint8_t root_directory[34]; char volume_set_id[ISO9660_SIZE_VOLUME_SET_ID]; char publisher_id[ISO9660_SIZE_PUBLISHER_ID]; char data_preparer_id[ISO9660_SIZE_DATA_PREP_ID]; @@ -50,10 +50,10 @@ struct iso9660_vol_pri_desc { char volume_mod_date[ISO9660_SIZE_DATE17]; char volume_exp_date[ISO9660_SIZE_DATE17]; char volume_eff_date[ISO9660_SIZE_DATE17]; - u8_t file_struct_ver; - u8_t reserved1; - u8_t application_use[512]; - u8_t reserved2[652]; + uint8_t file_struct_ver; + uint8_t reserved1; + uint8_t application_use[512]; + uint8_t reserved2[652]; /* End of the on-disk structure format. */ diff --git a/minix/fs/isofs/susp.c b/minix/fs/isofs/susp.c index 78005b48a..755d4f58f 100644 --- a/minix/fs/isofs/susp.c +++ b/minix/fs/isofs/susp.c @@ -12,8 +12,8 @@ int parse_susp(struct rrii_dir_record *dir, char *buffer) { /* Parse fundamental SUSP entries */ char susp_signature[2]; - u8_t susp_length; - u8_t susp_version; + uint8_t susp_length; + uint8_t susp_version; u32_t ca_block_nr; u32_t ca_offset; u32_t ca_length; @@ -22,8 +22,8 @@ int parse_susp(struct rrii_dir_record *dir, char *buffer) susp_signature[0] = buffer[0]; susp_signature[1] = buffer[1]; - susp_length = *((u8_t*)buffer + 2); - susp_version = *((u8_t*)buffer + 3); + susp_length = *((uint8_t*)buffer + 2); + susp_version = *((uint8_t*)buffer + 3); if ((susp_signature[0] == 'C') && (susp_signature[1] == 'E') && (susp_length >= 28) && (susp_version >= 1)) { @@ -88,7 +88,7 @@ void parse_susp_buffer(struct rrii_dir_record *dir, char *buffer, u32_t size) * routed from here to the relevant handling functions. */ char susp_signature[2]; - u8_t susp_length; + uint8_t susp_length; int parser_return; @@ -99,7 +99,7 @@ void parse_susp_buffer(struct rrii_dir_record *dir, char *buffer, u32_t size) susp_signature[0] = buffer[0]; susp_signature[1] = buffer[1]; - susp_length = *((u8_t*)buffer + 2); + susp_length = *((uint8_t*)buffer + 2); /* Check if SUSP entry is present. */ if (((susp_signature[0] == 0) && (susp_signature[1] == 0)) || diff --git a/minix/fs/isofs/susp_rock_ridge.c b/minix/fs/isofs/susp_rock_ridge.c index b98456227..9cbbe0b1a 100644 --- a/minix/fs/isofs/susp_rock_ridge.c +++ b/minix/fs/isofs/susp_rock_ridge.c @@ -48,11 +48,11 @@ void parse_susp_rock_ridge_sl(struct rrii_dir_record *dir, char *buffer, int len /* Parse a Rock Ridge SUSP symbolic link entry (SL). */ int offset = 0; int slink_size; - u8_t flags, component_length; + uint8_t flags, component_length; while (offset + 2 <= length) { - flags = *((u8_t*)(buffer + offset)); - component_length = *((u8_t*)(buffer + offset + 1)); + flags = *((uint8_t*)(buffer + offset)); + component_length = *((uint8_t*)(buffer + offset + 1)); /* Add directory separator if necessary. */ if (strcmp(dir->slink_rrip, "") != 0 && @@ -135,8 +135,8 @@ int parse_susp_rock_ridge(struct rrii_dir_record *dir, char *buffer) { /* Parse Rock Ridge SUSP entries for a directory entry. */ char susp_signature[2]; - u8_t susp_length; - u8_t susp_version; + uint8_t susp_length; + uint8_t susp_version; int rrii_name_current_size; int rrii_name_append_size; @@ -149,8 +149,8 @@ int parse_susp_rock_ridge(struct rrii_dir_record *dir, char *buffer) susp_signature[0] = buffer[0]; susp_signature[1] = buffer[1]; - susp_length = *((u8_t*)buffer + 2); - susp_version = *((u8_t*)buffer + 3); + susp_length = *((uint8_t*)buffer + 2); + susp_version = *((uint8_t*)buffer + 3); if ((susp_signature[0] == 'P') && (susp_signature[1] == 'X') && (susp_length >= 36) && (susp_version >= 1)) { diff --git a/minix/fs/isofs/utility.c b/minix/fs/isofs/utility.c index e2d99769b..7796bc645 100644 --- a/minix/fs/isofs/utility.c +++ b/minix/fs/isofs/utility.c @@ -49,7 +49,7 @@ size_t get_extent_absolute_block_id(struct dir_extent *e, size_t block) { return e->location + block - extent_offset; } -time_t date7_to_time_t(const u8_t *date) { +time_t date7_to_time_t(const uint8_t *date) { /* * This function converts from the ISO 9660 7-byte time format to a * time_t. diff --git a/minix/fs/procfs/root.c b/minix/fs/procfs/root.c index b75307789..32c242de7 100644 --- a/minix/fs/procfs/root.c +++ b/minix/fs/procfs/root.c @@ -118,7 +118,7 @@ static void root_pci(void) { u16_t vid, did, subvid, subdid; - u8_t bcr, scr, pifr, rev; + uint8_t bcr, scr, pifr, rev; char *slot_name, *dev_name; int r, devind; static int first = TRUE; diff --git a/minix/include/arch/i386/include/archtypes.h b/minix/include/arch/i386/include/archtypes.h index 22a2ed2bc..021fe456e 100644 --- a/minix/include/arch/i386/include/archtypes.h +++ b/minix/include/arch/i386/include/archtypes.h @@ -10,17 +10,17 @@ struct segdesc_s { /* segment descriptor for protected mode */ u16_t limit_low; u16_t base_low; - u8_t base_middle; - u8_t access; /* |P|DL|1|X|E|R|A| */ - u8_t granularity; /* |G|X|0|A|LIMT| */ - u8_t base_high; + uint8_t base_middle; + uint8_t access; /* |P|DL|1|X|E|R|A| */ + uint8_t granularity; /* |G|X|0|A|LIMT| */ + uint8_t base_high; } __attribute__((packed)); struct gatedesc_s { u16_t offset_low; u16_t selector; - u8_t pad; /* |000|XXXXX| ig & trpg, |XXXXXXXX| task g */ - u8_t p_dpl_type; /* |P|DL|0|TYPE| */ + uint8_t pad; /* |000|XXXXX| ig & trpg, |XXXXXXXX| task g */ + uint8_t p_dpl_type; /* |P|DL|0|TYPE| */ u16_t offset_high; } __attribute__((packed)); @@ -37,10 +37,10 @@ typedef struct segframe { } segframe_t; struct cpu_info { - u8_t vendor; - u8_t family; - u8_t model; - u8_t stepping; + uint8_t vendor; + uint8_t family; + uint8_t model; + uint8_t stepping; u32_t freq; /* in MHz */ u32_t flags[2]; }; diff --git a/minix/include/minix/devio.h b/minix/include/minix/devio.h index 435f0f58f..9fbea0eae 100644 --- a/minix/include/minix/devio.h +++ b/minix/include/minix/devio.h @@ -10,7 +10,7 @@ #define _DEVIO_H #include /* needed to include */ -#include /* u8_t, u16_t, u32_t needed */ +#include /* uint8_t, u16_t, u32_t needed */ typedef u16_t port_t; @@ -18,7 +18,7 @@ typedef u16_t port_t; * Also see , which has functions for bytes, words, * and longs. Hence, we need different (port,value)-pair types. */ -typedef struct { u16_t port; u8_t value; } pvb_pair_t; +typedef struct { u16_t port; uint8_t value; } pvb_pair_t; typedef struct { u16_t port; u16_t value; } pvw_pair_t; typedef struct { u16_t port; u32_t value; } pvl_pair_t; diff --git a/minix/include/minix/ipc.h b/minix/include/minix/ipc.h index fab92f976..98838b8a4 100644 --- a/minix/include/minix/ipc.h +++ b/minix/include/minix/ipc.h @@ -719,7 +719,7 @@ typedef struct { int fd; int backlog; - u8_t padding[48]; + uint8_t padding[48]; } mess_lc_vfs_listen; _ASSERT_MSG_SIZE(mess_lc_vfs_listen); @@ -2387,15 +2387,15 @@ typedef struct { ino_t ino; void *block; u32_t *flags_ptr; - u8_t pages; - u8_t flags; + uint8_t pages; + uint8_t flags; uint8_t padding[12]; } mess_vmmcp; _ASSERT_MSG_SIZE(mess_vmmcp); typedef struct { void *addr; - u8_t flags; + uint8_t flags; uint8_t padding[51]; } mess_vmmcp_reply; _ASSERT_MSG_SIZE(mess_vmmcp_reply); @@ -2667,7 +2667,7 @@ typedef struct noxfer_message { mess_vmmcp m_vmmcp; mess_vmmcp_reply m_vmmcp_reply; - u8_t size[56]; /* message payload may have 56 bytes at most */ + uint8_t size[56]; /* message payload may have 56 bytes at most */ }; } message __ALIGNED(16); diff --git a/minix/include/minix/portio.h b/minix/include/minix/portio.h index 0075fb36c..595fb3e43 100644 --- a/minix/include/minix/portio.h +++ b/minix/include/minix/portio.h @@ -12,7 +12,7 @@ Created: Jan 15, 1992 by Philip Homburg unsigned inb(u16_t _port); unsigned inw(u16_t _port); unsigned inl(u16_t _port); -void outb(u16_t _port, u8_t _value); +void outb(u16_t _port, uint8_t _value); void outw(u16_t _port, u16_t _value); void outl(u16_t _port, u32_t _value); void intr_disable(void); diff --git a/minix/include/minix/syslib.h b/minix/include/minix/syslib.h index 1856c41da..379e0e18b 100644 --- a/minix/include/minix/syslib.h +++ b/minix/include/minix/syslib.h @@ -232,15 +232,15 @@ int sys_padconf(u32_t padconf, u32_t mask, u32_t value); void pci_init(void); int pci_first_dev(int *devindp, u16_t *vidp, u16_t *didp); int pci_next_dev(int *devindp, u16_t *vidp, u16_t *didp); -int pci_find_dev(u8_t bus, u8_t dev, u8_t func, int *devindp); +int pci_find_dev(uint8_t bus, uint8_t dev, uint8_t func, int *devindp); void pci_reserve(int devind); int pci_reserve_ok(int devind); void pci_ids(int devind, u16_t *vidp, u16_t *didp); -void pci_rescan_bus(u8_t busnr); -u8_t pci_attr_r8(int devind, int port); +void pci_rescan_bus(uint8_t busnr); +uint8_t pci_attr_r8(int devind, int port); u16_t pci_attr_r16(int devind, int port); u32_t pci_attr_r32(int devind, int port); -void pci_attr_w8(int devind, int port, u8_t value); +void pci_attr_w8(int devind, int port, uint8_t value); void pci_attr_w16(int devind, int port, u16_t value); void pci_attr_w32(int devind, int port, u32_t value); char *pci_dev_name(u16_t vid, u16_t did); diff --git a/minix/include/minix/usb.h b/minix/include/minix/usb.h index 1e52d68c4..387b5bb94 100644 --- a/minix/include/minix/usb.h +++ b/minix/include/minix/usb.h @@ -32,13 +32,13 @@ struct usb_device_id { u16_t idProduct; u32_t bcdDevice; - u8_t bDeviceClass; - u8_t bDeviceSubClass; - u8_t bDeviceProtocol; + uint8_t bDeviceClass; + uint8_t bDeviceSubClass; + uint8_t bDeviceProtocol; - u8_t bInterfaceClass; - u8_t bInterfaceSubClass; - u8_t bInterfaceProtocol; + uint8_t bInterfaceClass; + uint8_t bInterfaceSubClass; + uint8_t bInterfaceProtocol; }; struct usb_iso_packet_desc { @@ -96,8 +96,8 @@ struct usb_urb { }; struct usb_ctrlrequest { - u8_t bRequestType; - u8_t bRequest; + uint8_t bRequestType; + uint8_t bRequest; u16_t wValue; u16_t wIndex; u16_t wLength; diff --git a/minix/include/minix/usb_ch9.h b/minix/include/minix/usb_ch9.h index 6d994a940..542eb4f84 100644 --- a/minix/include/minix/usb_ch9.h +++ b/minix/include/minix/usb_ch9.h @@ -46,9 +46,9 @@ #include -typedef u8_t uByte; -typedef u8_t uWord[2]; -typedef u8_t uDWord[4]; +typedef uint8_t uByte; +typedef uint8_t uWord[2]; +typedef uint8_t uDWord[4]; #define USETW2(w,h,l) ((w)[0] = (u_int8_t)(l), (w)[1] = (u_int8_t)(h)) diff --git a/minix/include/minix/virtio.h b/minix/include/minix/virtio.h index aee338e1c..976a6c2a3 100644 --- a/minix/include/minix/virtio.h +++ b/minix/include/minix/virtio.h @@ -37,9 +37,9 @@ /* Feature description */ struct virtio_feature { const char *name; - u8_t bit; - u8_t host_support; - u8_t guest_support; + uint8_t bit; + uint8_t host_support; + uint8_t guest_support; }; /* Forward declaration of struct virtio_device. @@ -117,10 +117,10 @@ int virtio_had_irq(struct virtio_device *dev); u32_t virtio_read32(struct virtio_device *dev, i32_t offset); u16_t virtio_read16(struct virtio_device *dev, i32_t offset); -u8_t virtio_read8(struct virtio_device *dev, i32_t offset); +uint8_t virtio_read8(struct virtio_device *dev, i32_t offset); void virtio_write32(struct virtio_device *dev, i32_t offset, u32_t val); void virtio_write16(struct virtio_device *dev, i32_t offset, u16_t val); -void virtio_write8(struct virtio_device *dev, i32_t offset, u8_t val); +void virtio_write8(struct virtio_device *dev, i32_t offset, uint8_t val); /* @@ -132,9 +132,9 @@ void virtio_write8(struct virtio_device *dev, i32_t offset, u8_t val); */ u32_t virtio_sread32(struct virtio_device *dev, i32_t offset); u16_t virtio_sread16(struct virtio_device *dev, i32_t offset); -u8_t virtio_sread8(struct virtio_device *dev, i32_t offset); +uint8_t virtio_sread8(struct virtio_device *dev, i32_t offset); void virtio_swrite32(struct virtio_device *dev, i32_t offset, u32_t val); void virtio_swrite16(struct virtio_device *dev, i32_t offset, u16_t val); -void virtio_swrite8(struct virtio_device *dev, i32_t offset, u8_t val); +void virtio_swrite8(struct virtio_device *dev, i32_t offset, uint8_t val); #endif /* _MINIX_VIRTIO_H */ diff --git a/minix/include/net/gen/dhcp.h b/minix/include/net/gen/dhcp.h index 15be0e76d..8e85bddac 100644 --- a/minix/include/net/gen/dhcp.h +++ b/minix/include/net/gen/dhcp.h @@ -6,10 +6,10 @@ #define __NET__GEN__DHCP_H__ typedef struct dhcp { - u8_t op; /* Message opcode/type. */ - u8_t htype; /* Hardware address type. */ - u8_t hlen; /* Hardware address length. */ - u8_t hops; /* Hop count when relaying. */ + uint8_t op; /* Message opcode/type. */ + uint8_t htype; /* Hardware address type. */ + uint8_t hlen; /* Hardware address length. */ + uint8_t hops; /* Hop count when relaying. */ u32_t xid; /* Transaction ID. */ u16_t secs; /* Seconds past since client began. */ u16_t flags; /* Flags. */ @@ -17,11 +17,11 @@ typedef struct dhcp { ipaddr_t yiaddr; /* "Your" IP address. */ ipaddr_t siaddr; /* Boot server IP address. */ ipaddr_t giaddr; /* Relay agent (gateway) IP address. */ - u8_t chaddr[16]; /* Client hardware address. */ - u8_t sname[64]; /* Server host name. */ - u8_t file[128]; /* Boot file. */ + uint8_t chaddr[16]; /* Client hardware address. */ + uint8_t sname[64]; /* Server host name. */ + uint8_t file[128]; /* Boot file. */ u32_t magic; /* Magic number. */ - u8_t options[308]; /* Optional parameters. */ + uint8_t options[308]; /* Optional parameters. */ } dhcp_t; /* DHCP operations and stuff: */ @@ -68,6 +68,6 @@ typedef struct dhcp { void dhcp_init(dhcp_t *_dp); int dhcp_settag(dhcp_t *_dp, int _tag, void *_data, size_t _len); -int dhcp_gettag(dhcp_t *_dp, int _searchtag, u8_t **_pdata, size_t *_plen); +int dhcp_gettag(dhcp_t *_dp, int _searchtag, uint8_t **_pdata, size_t *_plen); #endif /* __NET__GEN__DHCP_H__ */ diff --git a/minix/include/net/gen/icmp_hdr.h b/minix/include/net/gen/icmp_hdr.h index 8e6571dce..e5d302c96 100644 --- a/minix/include/net/gen/icmp_hdr.h +++ b/minix/include/net/gen/icmp_hdr.h @@ -18,15 +18,15 @@ typedef struct icmp_ip_id typedef struct icmp_ram /* RFC 1256 */ { - u8_t iram_na; - u8_t iram_aes; + uint8_t iram_na; + uint8_t iram_aes; u16_t iram_lt; } icmp_ram_t; typedef struct icmp_pp { - u8_t ipp_ptr; - u8_t ipp_unused[3]; + uint8_t ipp_ptr; + uint8_t ipp_unused[3]; } icmp_pp_t; typedef struct icmp_mtu /* RFC 1191 */ @@ -37,7 +37,7 @@ typedef struct icmp_mtu /* RFC 1191 */ typedef struct icmp_hdr { - u8_t ih_type, ih_code; + uint8_t ih_type, ih_code; u16_t ih_chksum; union { @@ -51,7 +51,7 @@ typedef struct icmp_hdr union { icmp_ip_id_t ihd_ipid; - u8_t uhd_data[1]; + uint8_t uhd_data[1]; } ih_dun; } icmp_hdr_t; diff --git a/minix/include/net/gen/in.h b/minix/include/net/gen/in.h index fb4398f8d..ec67237c0 100644 --- a/minix/include/net/gen/in.h +++ b/minix/include/net/gen/in.h @@ -26,11 +26,11 @@ server/ip/gen/in.h #define IP_MC_ALL_SYSTEMS 0xE0000001 /* 224.0.0.1 */ typedef u32_t ipaddr_t; -typedef u8_t ipproto_t; +typedef uint8_t ipproto_t; typedef struct ip_hdropt { - u8_t iho_opt_siz; - u8_t iho_data[IP_MAX_HDR_SIZE-IP_MIN_HDR_SIZE]; + uint8_t iho_opt_siz; + uint8_t iho_data[IP_MAX_HDR_SIZE-IP_MIN_HDR_SIZE]; } ip_hdropt_t; #endif /* __SERVER__IP__GEN__IN_H__ */ diff --git a/minix/include/net/gen/ip_hdr.h b/minix/include/net/gen/ip_hdr.h index f56205281..ecb4b0968 100644 --- a/minix/include/net/gen/ip_hdr.h +++ b/minix/include/net/gen/ip_hdr.h @@ -7,12 +7,12 @@ server/ip/gen/ip_hdr.h typedef struct ip_hdr { - u8_t ih_vers_ihl, + uint8_t ih_vers_ihl, ih_tos; u16_t ih_length, ih_id, ih_flags_fragoff; - u8_t ih_ttl, + uint8_t ih_ttl, ih_proto; u16_t ih_hdr_chk; ipaddr_t ih_src, diff --git a/minix/include/net/gen/ip_io.h b/minix/include/net/gen/ip_io.h index 07e87f088..eae70b9a3 100644 --- a/minix/include/net/gen/ip_io.h +++ b/minix/include/net/gen/ip_io.h @@ -31,9 +31,9 @@ typedef struct nwio_ipopt u32_t nwio_flags; ipaddr_t nwio_rem; ip_hdropt_t nwio_hdropt; - u8_t nwio_tos; - u8_t nwio_ttl; - u8_t nwio_df; + uint8_t nwio_tos; + uint8_t nwio_ttl; + uint8_t nwio_df; ipproto_t nwio_proto; } nwio_ipopt_t; diff --git a/minix/include/net/gen/psip_hdr.h b/minix/include/net/gen/psip_hdr.h index 5dc8bc4e4..615087ddd 100644 --- a/minix/include/net/gen/psip_hdr.h +++ b/minix/include/net/gen/psip_hdr.h @@ -7,8 +7,8 @@ server/ip/gen/psip_hdr.h typedef struct psip_io_hdr { - u8_t pih_flags; - u8_t pih_dummy[3]; + uint8_t pih_flags; + uint8_t pih_dummy[3]; u32_t pih_nexthop; } psip_io_hdr_t; diff --git a/minix/include/net/gen/rip.h b/minix/include/net/gen/rip.h index 7bb56c069..aae157126 100644 --- a/minix/include/net/gen/rip.h +++ b/minix/include/net/gen/rip.h @@ -11,8 +11,8 @@ Created: Aug 16, 1993 by Philip Homburg typedef struct rip_hdr { - u8_t rh_command; - u8_t rh_version; + uint8_t rh_command; + uint8_t rh_version; u16_t rh_zero; } rip_hdr_t; diff --git a/minix/include/net/gen/tcp_hdr.h b/minix/include/net/gen/tcp_hdr.h index f2d93780c..3ee14770e 100644 --- a/minix/include/net/gen/tcp_hdr.h +++ b/minix/include/net/gen/tcp_hdr.h @@ -11,8 +11,8 @@ typedef struct tcp_hdr tcpport_t th_dstport; u32_t th_seq_nr; u32_t th_ack_nr; - u8_t th_data_off; - u8_t th_flags; + uint8_t th_data_off; + uint8_t th_flags; u16_t th_window; u16_t th_chksum; u16_t th_urgptr; @@ -31,7 +31,7 @@ typedef struct tcp_hdr typedef struct tcp_hdropt { int tho_opt_siz; - u8_t tho_data[TCP_MAX_HDR_SIZE-TCP_MIN_HDR_SIZE]; + uint8_t tho_data[TCP_MAX_HDR_SIZE-TCP_MIN_HDR_SIZE]; } tcp_hdropt_t; #define TCP_OPT_EOL 0 diff --git a/minix/include/net/gen/tcp_io.h b/minix/include/net/gen/tcp_io.h index 6443b4746..db83a8b7d 100644 --- a/minix/include/net/gen/tcp_io.h +++ b/minix/include/net/gen/tcp_io.h @@ -72,7 +72,7 @@ typedef struct nwio_tcpopt typedef struct tcp_cookie { u32_t tc_ref; - u8_t tc_secret[TC_SECRET_SIZE]; + uint8_t tc_secret[TC_SECRET_SIZE]; } tcp_cookie_t; #endif /* __SERVER__IP__GEN__TCP_IO_H__ */ diff --git a/minix/kernel/arch/i386/acpi.c b/minix/kernel/arch/i386/acpi.c index 63ddde12e..8129a7a44 100644 --- a/minix/kernel/arch/i386/acpi.c +++ b/minix/kernel/arch/i386/acpi.c @@ -44,7 +44,7 @@ static u16_t slp_typb = 0; static int acpi_check_csum(struct acpi_sdt_header * tb, size_t size) { - u8_t total = 0; + uint8_t total = 0; int i; for (i = 0; i < size; i++) total += ((unsigned char *)tb)[i]; @@ -149,11 +149,11 @@ static void * acpi_madt_get_typed_item(struct acpi_madt_hdr * hdr, unsigned char type, unsigned idx) { - u8_t * t, * end; + uint8_t * t, * end; int i; - t = (u8_t *) hdr + sizeof(struct acpi_madt_hdr); - end = (u8_t *) hdr + hdr->hdr.length; + t = (uint8_t *) hdr + sizeof(struct acpi_madt_hdr); + end = (uint8_t *) hdr + hdr->hdr.length; i = 0; while(t < end) { @@ -173,11 +173,11 @@ static void * acpi_madt_get_typed_item(struct acpi_madt_hdr * hdr, static void * acpi_madt_get_item(struct acpi_madt_hdr * hdr, unsigned idx) { - u8_t * t, * end; + uint8_t * t, * end; int i; - t = (u8_t *) hdr + sizeof(struct acpi_madt_hdr); - end = (u8_t *) hdr + hdr->hdr.length; + t = (uint8_t *) hdr + sizeof(struct acpi_madt_hdr); + end = (uint8_t *) hdr + hdr->hdr.length; for(i = 0 ; i <= idx && t < end; i++) { if (i == idx) @@ -229,9 +229,9 @@ static int get_acpi_rsdp(void) static void acpi_init_poweroff(void) { - u8_t *ptr = NULL; - u8_t *start = NULL; - u8_t *end = NULL; + uint8_t *ptr = NULL; + uint8_t *start = NULL; + uint8_t *end = NULL; struct acpi_fadt_header *fadt_header = NULL; struct acpi_rsdt * dsdt_header = NULL; char *msg = NULL; @@ -255,7 +255,7 @@ static void acpi_init_poweroff(void) pm1a_cnt_blk = fadt_header->pm1a_cnt_blk; pm1b_cnt_blk = fadt_header->pm1b_cnt_blk; - ptr = start = (u8_t *) dsdt_header->data; + ptr = start = (uint8_t *) dsdt_header->data; end = start + dsdt_header->hdr.length - 4; /* See http://forum.osdev.org/viewtopic.php?t=16990 */ diff --git a/minix/kernel/arch/i386/acpi.h b/minix/kernel/arch/i386/acpi.h index 06e978c9a..6cc29d2f6 100644 --- a/minix/kernel/arch/i386/acpi.h +++ b/minix/kernel/arch/i386/acpi.h @@ -6,9 +6,9 @@ /* ACPI root system description pointer */ struct acpi_rsdp { char signature[8]; /* must be "RSD PTR " */ - u8_t checksum; + uint8_t checksum; char oemid[6]; - u8_t revision; + uint8_t revision; u32_t rsdt_addr; u32_t length; }; @@ -21,8 +21,8 @@ struct acpi_rsdp { struct acpi_sdt_header { char signature[ACPI_SDT_SIGNATURE_LEN]; u32_t length; - u8_t revision; - u8_t checksum; + uint8_t revision; + uint8_t checksum; char oemid[6]; char oem_table_id[8]; u32_t oem_revision; @@ -31,10 +31,10 @@ struct acpi_sdt_header { }; struct acpi_generic_address { - u8_t address_space_id; - u8_t register_bit_width; - u8_t register_bit_offset; - u8_t access_size; + uint8_t address_space_id; + uint8_t register_bit_width; + uint8_t register_bit_offset; + uint8_t access_size; u64_t address; }; @@ -43,14 +43,14 @@ struct acpi_fadt_header struct acpi_sdt_header hdr; u32_t facs; u32_t dsdt; - u8_t model; - u8_t preferred_pm_profile; + uint8_t model; + uint8_t preferred_pm_profile; u16_t sci_int; u32_t smi_cmd; - u8_t acpi_enable; - u8_t acpi_disable; - u8_t s4bios_req; - u8_t pstate_cnt; + uint8_t acpi_enable; + uint8_t acpi_disable; + uint8_t s4bios_req; + uint8_t pstate_cnt; u32_t pm1a_evt_blk; u32_t pm1b_evt_blk; u32_t pm1a_cnt_blk; @@ -59,29 +59,29 @@ struct acpi_fadt_header u32_t pm_tmr_blk; u32_t gpe0_blk; u32_t gpe1_blk; - u8_t pm1_evt_len; - u8_t pm1_cnt_len; - u8_t pm2_cnt_len; - u8_t pm_tmr_len; - u8_t gpe0_blk_len; - u8_t gpe1_blk_len; - u8_t gpe1_base; - u8_t cst_cnt; + uint8_t pm1_evt_len; + uint8_t pm1_cnt_len; + uint8_t pm2_cnt_len; + uint8_t pm_tmr_len; + uint8_t gpe0_blk_len; + uint8_t gpe1_blk_len; + uint8_t gpe1_base; + uint8_t cst_cnt; u16_t p_lvl2_lat; u16_t p_lvl3_lat; u16_t flush_size; u16_t flush_stride; - u8_t duty_offset; - u8_t duty_width; - u8_t day_alrm; - u8_t mon_alrm; - u8_t century; + uint8_t duty_offset; + uint8_t duty_width; + uint8_t day_alrm; + uint8_t mon_alrm; + uint8_t century; u16_t iapc_boot_arch; - u8_t reserved1; + uint8_t reserved1; u32_t flags; struct acpi_generic_address reset_reg; - u8_t reset_value; - u8_t reserved2[3]; + uint8_t reset_value; + uint8_t reserved2[3]; u64_t xfacs; u64_t xdsdt; struct acpi_generic_address xpm1a_evt_blk; @@ -113,29 +113,29 @@ struct acpi_madt_hdr { #define ACPI_MADT_TYPE_Lx2APIC_NMI 10 struct acpi_madt_item_hdr{ - u8_t type; - u8_t length; + uint8_t type; + uint8_t length; }; struct acpi_madt_lapic { struct acpi_madt_item_hdr hdr; - u8_t acpi_cpu_id; - u8_t apic_id; + uint8_t acpi_cpu_id; + uint8_t apic_id; u32_t flags; }; struct acpi_madt_ioapic { struct acpi_madt_item_hdr hdr; - u8_t id; - u8_t __reserved; + uint8_t id; + uint8_t __reserved; u32_t address; u32_t global_int_base; }; struct acpi_madt_int_src { struct acpi_madt_item_hdr hdr; - u8_t bus; - u8_t bus_int; + uint8_t bus; + uint8_t bus_int; u32_t global_int; u16_t mps_flags; }; diff --git a/minix/kernel/arch/i386/apic.c b/minix/kernel/arch/i386/apic.c index 39346b679..a92ca9fdf 100644 --- a/minix/kernel/arch/i386/apic.c +++ b/minix/kernel/arch/i386/apic.c @@ -177,7 +177,7 @@ static u32_t ioapic_read(u32_t ioa_base, u32_t reg) return *(volatile u32_t *)(ioa_base + IOAPIC_IOWIN); } -static void ioapic_write(u32_t ioa_base, u8_t reg, u32_t val) +static void ioapic_write(u32_t ioa_base, uint8_t reg, u32_t val) { *((volatile u32_t *)(ioa_base + IOAPIC_IOREGSEL)) = reg; *((volatile u32_t *)(ioa_base + IOAPIC_IOWIN)) = val; @@ -208,8 +208,8 @@ static void ioapic_redirt_entry_read(void * ioapic_addr, u32_t *hi, u32_t *lo) { - *lo = ioapic_read((u32_t)ioapic_addr, (u8_t) (IOAPIC_REDIR_TABLE + entry * 2)); - *hi = ioapic_read((u32_t)ioapic_addr, (u8_t) (IOAPIC_REDIR_TABLE + entry * 2 + 1)); + *lo = ioapic_read((u32_t)ioapic_addr, (uint8_t) (IOAPIC_REDIR_TABLE + entry * 2)); + *hi = ioapic_read((u32_t)ioapic_addr, (uint8_t) (IOAPIC_REDIR_TABLE + entry * 2 + 1)); } #endif @@ -223,8 +223,8 @@ static void ioapic_redirt_entry_write(void * ioapic_addr, VERBOSE_APIC(printf("IO apic redir entry %3d " "write 0x%08x 0x%08x\n", entry, hi, lo)); #endif - ioapic_write((u32_t)ioapic_addr, (u8_t) (IOAPIC_REDIR_TABLE + entry * 2 + 1), hi); - ioapic_write((u32_t)ioapic_addr, (u8_t) (IOAPIC_REDIR_TABLE + entry * 2), lo); + ioapic_write((u32_t)ioapic_addr, (uint8_t) (IOAPIC_REDIR_TABLE + entry * 2 + 1), hi); + ioapic_write((u32_t)ioapic_addr, (uint8_t) (IOAPIC_REDIR_TABLE + entry * 2), lo); } #define apic_read_tmr_vector(vec) \ @@ -528,7 +528,7 @@ void lapic_set_timer_one_shot(const u32_t usec) /* sleep in micro seconds */ u32_t lvtt; u32_t ticks_per_us; - const u8_t cpu = cpuid; + const uint8_t cpu = cpuid; ticks_per_us = (lapic_bus_freq[cpu] / 1000000) * config_apic_timer_x; @@ -547,7 +547,7 @@ void lapic_set_timer_periodic(const unsigned freq) /* sleep in micro seconds */ u32_t lvtt; u32_t lapic_ticks_per_clock_tick; - const u8_t cpu = cpuid; + const uint8_t cpu = cpuid; lapic_ticks_per_clock_tick = (lapic_bus_freq[cpu] / freq) * config_apic_timer_x; diff --git a/minix/kernel/arch/i386/arch_system.c b/minix/kernel/arch/i386/arch_system.c index bd75b575e..05bc31dad 100644 --- a/minix/kernel/arch/i386/arch_system.c +++ b/minix/kernel/arch/i386/arch_system.c @@ -283,7 +283,7 @@ void arch_init(void) *===========================================================================*/ void do_ser_debug(void) { - u8_t c, lsr; + uint8_t c, lsr; #if CONFIG_OXPCIE { diff --git a/minix/kernel/arch/i386/include/arch_proto.h b/minix/kernel/arch/i386/include/arch_proto.h index 3aa879096..f27d8b5fc 100644 --- a/minix/kernel/arch/i386/include/arch_proto.h +++ b/minix/kernel/arch/i386/include/arch_proto.h @@ -192,7 +192,7 @@ struct tss_s { reg_t ldt; u16_t trap; u16_t iobase; -/* u8_t iomap[0]; */ +/* uint8_t iomap[0]; */ } __attribute__((packed)); void enable_iop(struct proc *pp); diff --git a/minix/kernel/arch/i386/memory.c b/minix/kernel/arch/i386/memory.c index 8450aa344..a11625881 100644 --- a/minix/kernel/arch/i386/memory.c +++ b/minix/kernel/arch/i386/memory.c @@ -991,7 +991,7 @@ void release_address_space(struct proc *pr) /* computes a checksum of a buffer of a given length. The byte sum must be zero */ int platform_tbl_checksum_ok(void *ptr, unsigned int length) { - u8_t total = 0; + uint8_t total = 0; unsigned int i; for (i = 0; i < length; i++) total += ((unsigned char *)ptr)[i]; diff --git a/minix/kernel/proc.h b/minix/kernel/proc.h index 200c3bdfa..96c5956b4 100644 --- a/minix/kernel/proc.h +++ b/minix/kernel/proc.h @@ -112,7 +112,7 @@ struct proc { union ixfer_params{ struct { vir_bytes start, length; /* memory range */ - u8_t writeflag; /* nonzero for write access */ + uint8_t writeflag; /* nonzero for write access */ } check; } params; /* VM result when available */ diff --git a/minix/kernel/system/do_vdevio.c b/minix/kernel/system/do_vdevio.c index 6af9b602c..2dbcc4227 100644 --- a/minix/kernel/system/do_vdevio.c +++ b/minix/kernel/system/do_vdevio.c @@ -50,7 +50,7 @@ int do_vdevio(struct proc * caller, message * m_ptr) switch (io_type) { case _DIO_BYTE: bytes = vec_size * sizeof(pvb_pair_t); - io_size= sizeof(u8_t); + io_size= sizeof(uint8_t); break; case _DIO_WORD: bytes = vec_size * sizeof(pvw_pair_t); diff --git a/minix/lib/libblockdriver/drvlib.c b/minix/lib/libblockdriver/drvlib.c index 15d618ae3..a82682b44 100644 --- a/minix/lib/libblockdriver/drvlib.c +++ b/minix/lib/libblockdriver/drvlib.c @@ -12,13 +12,13 @@ #define ext_part(s) ((s) == 0x05 || (s) == 0x0F) static void parse_part_table(struct blockdriver *bdp, int device, - int style, int atapi, u8_t *tmp_buf); + int style, int atapi, uint8_t *tmp_buf); static void extpartition(struct blockdriver *bdp, int extdev, - unsigned long extbase, u8_t *tmp_buf); + unsigned long extbase, uint8_t *tmp_buf); static int get_part_table(struct blockdriver *bdp, int device, - unsigned long offset, struct part_entry *table, u8_t *tmp_buf); + unsigned long offset, struct part_entry *table, uint8_t *tmp_buf); static void sort(struct part_entry *table); @@ -35,7 +35,7 @@ void partition( /* This routine is called on first open to initialize the partition tables * of a device. */ - u8_t *tmp_buf; + uint8_t *tmp_buf; if ((*bdp->bdr_part)(device) == NULL) return; @@ -60,7 +60,7 @@ static void parse_part_table( int device, /* device to partition */ int style, /* partitioning style: floppy, primary, sub. */ int atapi, /* atapi device */ - u8_t *tmp_buf /* temporary buffer */ + uint8_t *tmp_buf /* temporary buffer */ ) { /* This routine reads and parses a partition table. It may be called @@ -137,7 +137,7 @@ static void extpartition( struct blockdriver *bdp, /* device dependent entry points */ int extdev, /* extended partition to scan */ unsigned long extbase, /* sector offset of the base ext. partition */ - u8_t *tmp_buf /* temporary buffer */ + uint8_t *tmp_buf /* temporary buffer */ ) { /* Extended partitions cannot be ignored alas, because people like to move @@ -188,7 +188,7 @@ static int get_part_table( int device, unsigned long offset, /* sector offset to the table */ struct part_entry *table, /* four entries */ - u8_t *tmp_buf) /* temporary buffer */ + uint8_t *tmp_buf) /* temporary buffer */ { /* Read the partition table for the device, return true iff there were no * errors. diff --git a/minix/lib/libc/sys/mmap.c b/minix/lib/libc/sys/mmap.c index 8503151c5..20dbeb906 100644 --- a/minix/lib/libc/sys/mmap.c +++ b/minix/lib/libc/sys/mmap.c @@ -155,7 +155,7 @@ unsigned long vm_getphys(endpoint_t endpt, void *addr) return (unsigned long) m.m_lc_vm_getphys.ret_addr; } -u8_t vm_getrefcount(endpoint_t endpt, void *addr) +uint8_t vm_getrefcount(endpoint_t endpt, void *addr) { message m; int r; @@ -166,7 +166,7 @@ u8_t vm_getrefcount(endpoint_t endpt, void *addr) r = _syscall(VM_PROC_NR, VM_GETREF, &m); if (r != OK) - return (u8_t) -1; - return (u8_t) m.m_lsys_vm_getref.retc; + return (uint8_t) -1; + return (uint8_t) m.m_lsys_vm_getref.retc; } diff --git a/minix/lib/libhgfs/attr.c b/minix/lib/libhgfs/attr.c index 61e1c1e96..b3a7428d1 100644 --- a/minix/lib/libhgfs/attr.c +++ b/minix/lib/libhgfs/attr.c @@ -59,7 +59,7 @@ int hgfs_setattr(const char *path, struct sffs_attr *attr) { /* Set selected attributes of a file by path name. */ - u8_t mask; + uint8_t mask; RPC_REQUEST(HGFS_REQ_SETATTR); diff --git a/minix/lib/libhgfs/const.h b/minix/lib/libhgfs/const.h index b679fde3d..dfb04ea05 100644 --- a/minix/lib/libhgfs/const.h +++ b/minix/lib/libhgfs/const.h @@ -16,7 +16,7 @@ /* RPC macros. These NEED NOT be portable. VMware only does x86(-64) anyway. */ /* ..all this because ACK can't pack structures :( */ -#define RPC_NEXT8 *(((u8_t*)(++rpc_ptr))-1) /* get/set next byte */ +#define RPC_NEXT8 *(((uint8_t*)(++rpc_ptr))-1) /* get/set next byte */ #define RPC_NEXT16 *(((u16_t*)(rpc_ptr+=2))-1) /* get/set next short */ #define RPC_NEXT32 *(((u32_t*)(rpc_ptr+=4))-1) /* get/set next long */ #define RPC_LEN (rpc_ptr - rpc_buf) /* request length thus far */ diff --git a/minix/lib/libhgfs/file.c b/minix/lib/libhgfs/file.c index 1f5d7d530..768919697 100644 --- a/minix/lib/libhgfs/file.c +++ b/minix/lib/libhgfs/file.c @@ -165,7 +165,7 @@ size_t hgfs_writebuf(char **ptr) */ u32_t off; - off = RPC_HDR_SIZE + sizeof(u32_t) + sizeof(u8_t) + sizeof(u32_t) * 3; + off = RPC_HDR_SIZE + sizeof(u32_t) + sizeof(uint8_t) + sizeof(u32_t) * 3; RPC_RESET; RPC_ADVANCE(off); diff --git a/minix/lib/libsys/arch/earm/frclock_util.c b/minix/lib/libsys/arch/earm/frclock_util.c index cb1924466..dc71be80f 100644 --- a/minix/lib/libsys/arch/earm/frclock_util.c +++ b/minix/lib/libsys/arch/earm/frclock_util.c @@ -62,7 +62,7 @@ read_frclock(u32_t *frclk) assert(frclk); assert(minix_kerninfo->arm_frclock); assert(minix_kerninfo->arm_frclock->tcrr); - *frclk = *(volatile u32_t *)((u8_t *) + *frclk = *(volatile u32_t *)((uint8_t *) minix_kerninfo->arm_frclock->tcrr); } diff --git a/minix/lib/libsys/pci_attr_r8.c b/minix/lib/libsys/pci_attr_r8.c index 2542614b5..54b477628 100644 --- a/minix/lib/libsys/pci_attr_r8.c +++ b/minix/lib/libsys/pci_attr_r8.c @@ -9,7 +9,7 @@ pci_attr_r8.c /*===========================================================================* * pci_attr_r8 * *===========================================================================*/ -u8_t pci_attr_r8(devind, port) +uint8_t pci_attr_r8(devind, port) int devind; int port; { diff --git a/minix/lib/libsys/pci_attr_w8.c b/minix/lib/libsys/pci_attr_w8.c index c18edf52a..5143e2544 100644 --- a/minix/lib/libsys/pci_attr_w8.c +++ b/minix/lib/libsys/pci_attr_w8.c @@ -9,7 +9,7 @@ pci_attr_w8.c /*===========================================================================* * pci_attr_w8 * *===========================================================================*/ -void pci_attr_w8(int devind, int port, u8_t value) +void pci_attr_w8(int devind, int port, uint8_t value) { int r; message m; diff --git a/minix/lib/libsys/pci_find_dev.c b/minix/lib/libsys/pci_find_dev.c index 5244c4ab5..ababaf9f5 100644 --- a/minix/lib/libsys/pci_find_dev.c +++ b/minix/lib/libsys/pci_find_dev.c @@ -9,7 +9,7 @@ pci_find_dev.c /*===========================================================================* * pci_find_dev * *===========================================================================*/ -int pci_find_dev(u8_t bus, u8_t dev, u8_t func, int *devindp) +int pci_find_dev(uint8_t bus, uint8_t dev, uint8_t func, int *devindp) { int r; message m; diff --git a/minix/lib/libsys/pci_rescan_bus.c b/minix/lib/libsys/pci_rescan_bus.c index abe1fb32d..db7396d32 100644 --- a/minix/lib/libsys/pci_rescan_bus.c +++ b/minix/lib/libsys/pci_rescan_bus.c @@ -9,7 +9,7 @@ pci_rescan_bus.c /*===========================================================================* * pci_rescan_bus * *===========================================================================*/ -void pci_rescan_bus(u8_t busnr) +void pci_rescan_bus(uint8_t busnr) { int r; message m; diff --git a/minix/lib/libvboxfs/vboxfs.h b/minix/lib/libvboxfs/vboxfs.h index 79137c9a7..20e770404 100644 --- a/minix/lib/libvboxfs/vboxfs.h +++ b/minix/lib/libvboxfs/vboxfs.h @@ -116,12 +116,12 @@ typedef struct { typedef struct { u32_t namemax; - u8_t remote; - u8_t casesens; - u8_t readonly; - u8_t unicode; - u8_t fscomp; - u8_t filecomp; + uint8_t remote; + uint8_t casesens; + uint8_t readonly; + uint8_t unicode; + uint8_t fscomp; + uint8_t filecomp; u16_t reserved; } vboxfs_fsprops_t; diff --git a/minix/lib/libvirtio/virtio.c b/minix/lib/libvirtio/virtio.c index b71c96c7c..2d3e00911 100644 --- a/minix/lib/libvirtio/virtio.c +++ b/minix/lib/libvirtio/virtio.c @@ -76,7 +76,7 @@ struct virtio_device { u16_t port; /* io port */ struct virtio_feature *features; /* host / guest features */ - u8_t num_features; /* max 32 */ + uint8_t num_features; /* max 32 */ struct virtio_queue *queues; /* our queues */ u16_t num_queues; diff --git a/minix/man/man4/console.4 b/minix/man/man4/console.4 index 8d603214b..13a13e67d 100644 --- a/minix/man/man4/console.4 +++ b/minix/man/man4/console.4 @@ -182,7 +182,7 @@ The console device implements the following ioctl to copy a font into font memory on EGA and VGA adapters: .PP .RS -.BI "ioctl(" fd ", TIOCSFON, u8_t " font "[256][32]);" +.BI "ioctl(" fd ", TIOCSFON, uint8_t " font "[256][32]);" .RE .PP Font memory consists of 256 character definitions of 32 lines per character diff --git a/minix/man/man5/keymap.5 b/minix/man/man5/keymap.5 index aba13743d..f26695409 100644 --- a/minix/man/man5/keymap.5 +++ b/minix/man/man5/keymap.5 @@ -22,7 +22,7 @@ utility. .PP .SS "Types (general): " defines the -.B u8_t +.B uint8_t and .B u16_t types, corresponding to 8 and 16 bit values. diff --git a/minix/servers/ipc/shm.c b/minix/servers/ipc/shm.c index 11b489765..0f6391658 100644 --- a/minix/servers/ipc/shm.c +++ b/minix/servers/ipc/shm.c @@ -172,7 +172,7 @@ do_shmat(message * m) void update_refcount_and_destroy(void) { - u8_t rc; + uint8_t rc; unsigned int i; for (i = 0; i < shm_list_nr; i++) { @@ -180,7 +180,7 @@ update_refcount_and_destroy(void) continue; rc = vm_getrefcount(sef_self(), (void *)shm_list[i].page); - if (rc == (u8_t)-1) { + if (rc == (uint8_t)-1) { printf("IPC: can't find physical region.\n"); continue; } diff --git a/minix/servers/vfs/coredump.c b/minix/servers/vfs/coredump.c index 1139798ac..7a682436c 100644 --- a/minix/servers/vfs/coredump.c +++ b/minix/servers/vfs/coredump.c @@ -297,7 +297,7 @@ static void dump_segments(struct filp *f, Elf_Phdr phdrs[], int phnum) vir_bytes len; off_t off, seg_off; int r; - static u8_t buf[CLICK_SIZE]; + static uint8_t buf[CLICK_SIZE]; for (i = 1; i < phnum; i++) { len = phdrs[i].p_memsz; diff --git a/minix/servers/vm/mmap.c b/minix/servers/vm/mmap.c index b1394a29e..525bc5cdb 100644 --- a/minix/servers/vm/mmap.c +++ b/minix/servers/vm/mmap.c @@ -465,7 +465,7 @@ int do_get_refcount(message *m) int r, n; struct vmproc *vmp; endpoint_t target; - u8_t cnt; + uint8_t cnt; vir_bytes addr; target = m->m_lsys_vm_getref.endpt; diff --git a/minix/servers/vm/proto.h b/minix/servers/vm/proto.h index ba06f05ce..dba95d129 100644 --- a/minix/servers/vm/proto.h +++ b/minix/servers/vm/proto.h @@ -178,7 +178,7 @@ int map_ph_writept(struct vmproc *vmp, struct vir_region *vr, struct vir_region* map_region_lookup_type(struct vmproc *vmp, u32_t flags); int map_get_phys(struct vmproc *vmp, vir_bytes addr, phys_bytes *r); -int map_get_ref(struct vmproc *vmp, vir_bytes addr, u8_t *cnt); +int map_get_ref(struct vmproc *vmp, vir_bytes addr, uint8_t *cnt); unsigned int physregions(struct vir_region *vr); void get_usage_info(struct vmproc *vmp, struct vm_usage_info *vui); diff --git a/minix/servers/vm/region.c b/minix/servers/vm/region.c index e13c0afb9..712fabc2a 100644 --- a/minix/servers/vm/region.c +++ b/minix/servers/vm/region.c @@ -1340,7 +1340,7 @@ int map_get_phys(struct vmproc *vmp, vir_bytes addr, phys_bytes *r) /*========================================================================* * map_get_ref * *========================================================================*/ -int map_get_ref(struct vmproc *vmp, vir_bytes addr, u8_t *cnt) +int map_get_ref(struct vmproc *vmp, vir_bytes addr, uint8_t *cnt) { struct vir_region *vr; diff --git a/minix/servers/vm/region.h b/minix/servers/vm/region.h index 934ec79b6..7a57b0008 100644 --- a/minix/servers/vm/region.h +++ b/minix/servers/vm/region.h @@ -28,8 +28,8 @@ struct phys_block { /* first in list of phys_regions that reference this block */ struct phys_region *firstregion; - u8_t refcount; /* Refcount of these pages */ - u8_t flags; + uint8_t refcount; /* Refcount of these pages */ + uint8_t flags; }; #define PBF_INCACHE 0x01 diff --git a/minix/servers/vm/slaballoc.c b/minix/servers/vm/slaballoc.c index 0466856fc..3adc83174 100644 --- a/minix/servers/vm/slaballoc.c +++ b/minix/servers/vm/slaballoc.c @@ -78,7 +78,7 @@ static int pages = 0; -typedef u8_t element_t; +typedef uint8_t element_t; #define BITS_FULL (~(element_t)0) typedef element_t elements_t[USEELEMENTS]; @@ -116,7 +116,7 @@ struct sdh { #define NOJUNK 0xc0ffee struct slabdata { - u8_t data[DATABYTES]; + uint8_t data[DATABYTES]; struct sdh sdh; }; diff --git a/minix/tests/blocktest/blocktest.c b/minix/tests/blocktest/blocktest.c index e7e235ade..d6b80b322 100644 --- a/minix/tests/blocktest/blocktest.c +++ b/minix/tests/blocktest/blocktest.c @@ -364,7 +364,7 @@ static void vir_xfer(dev_t minor, u64_t pos, iovec_t *iovec, int nr_req, } } -static void simple_xfer(dev_t minor, u64_t pos, u8_t *buf, size_t size, +static void simple_xfer(dev_t minor, u64_t pos, uint8_t *buf, size_t size, int write, ssize_t exp, result_t *res) { /* Perform a transfer involving a single buffer. @@ -377,7 +377,7 @@ static void simple_xfer(dev_t minor, u64_t pos, u8_t *buf, size_t size, vir_xfer(minor, pos, &iov, 1, write, exp, res); } -static void alloc_buf_and_grant(u8_t **ptr, cp_grant_id_t *grant, +static void alloc_buf_and_grant(uint8_t **ptr, cp_grant_id_t *grant, size_t size, int perms) { /* Allocate a buffer suitable for DMA (i.e. contiguous) and create a @@ -391,7 +391,7 @@ static void alloc_buf_and_grant(u8_t **ptr, cp_grant_id_t *grant, panic("unable to allocate grant"); } -static void free_buf_and_grant(u8_t *ptr, cp_grant_id_t grant, size_t size) +static void free_buf_and_grant(uint8_t *ptr, cp_grant_id_t grant, size_t size) { /* Revoke a grant and free a buffer. */ @@ -408,7 +408,7 @@ static void bad_read1(void) message mt, m; iovec_s_t iovt, iov; cp_grant_id_t grant, grant2, grant3; - u8_t *buf_ptr; + uint8_t *buf_ptr; vir_bytes buf_size; result_t res; @@ -509,7 +509,7 @@ static void bad_read1(void) cpf_revoke(grant); } -static u32_t get_sum(u8_t *ptr, size_t size) +static u32_t get_sum(uint8_t *ptr, size_t size) { /* Compute a checksum over the given buffer. */ @@ -521,7 +521,7 @@ static u32_t get_sum(u8_t *ptr, size_t size) return sum; } -static u32_t fill_rand(u8_t *ptr, size_t size) +static u32_t fill_rand(uint8_t *ptr, size_t size) { /* Fill the given buffer with random data. Return a checksum over the * resulting data. @@ -534,7 +534,7 @@ static u32_t fill_rand(u8_t *ptr, size_t size) return get_sum(ptr, size); } -static void test_sum(u8_t *ptr, size_t size, u32_t sum, int should_match, +static void test_sum(uint8_t *ptr, size_t size, u32_t sum, int should_match, result_t *res) { /* If the test succeeded so far, check whether the given buffer does @@ -563,7 +563,7 @@ static void bad_read2(void) * size exceed the per-operation size (128KB ?). On the other hand, we * then need to start checking partition sizes, possibly. */ - u8_t *buf_ptr, *buf2_ptr, *buf3_ptr, c1, c2; + uint8_t *buf_ptr, *buf2_ptr, *buf3_ptr, c1, c2; size_t buf_size, buf2_size, buf3_size; cp_grant_id_t buf_grant, buf2_grant, buf3_grant, grant; u32_t buf_sum, buf2_sum, buf3_sum; @@ -834,7 +834,7 @@ static void bad_write(void) * If handled correctly, these requests will not actually write data. * This part of the test set is in need of further expansion. */ - u8_t *buf_ptr, *buf2_ptr, *buf3_ptr; + uint8_t *buf_ptr, *buf2_ptr, *buf3_ptr; size_t buf_size, buf2_size, buf3_size, sector_unalign; cp_grant_id_t buf_grant, buf2_grant, buf3_grant; cp_grant_id_t grant; @@ -940,7 +940,7 @@ static void vector_and_large_sub(size_t small_size) * succeed. */ size_t large_size, buf_size, buf2_size; - u8_t *buf_ptr, *buf2_ptr; + uint8_t *buf_ptr, *buf2_ptr; iovec_t iovec[NR_IOREQS]; u64_t base_pos; result_t res; @@ -1251,7 +1251,7 @@ static void read_limits(dev_t sub0_minor, dev_t sub1_minor, size_t sub_size) { /* Test reads up to, across, and beyond partition limits. */ - u8_t *buf_ptr; + uint8_t *buf_ptr; size_t buf_size; u32_t sum, sum2, sum3; result_t res; @@ -1366,7 +1366,7 @@ static void write_limits(dev_t sub0_minor, dev_t sub1_minor, size_t sub_size) * subpartitions. Note that the necessity to check the results using * readback, makes this more or less a superset of the read test. */ - u8_t *buf_ptr; + uint8_t *buf_ptr; size_t buf_size; u32_t sum, sum2, sum3, sub1_sum; result_t res; @@ -1569,7 +1569,7 @@ static void real_limits(dev_t sub0_minor, dev_t sub1_minor, int part_secs) /* Create our own subpartitions by writing a partition table, and * perform tests on the resulting real subpartitions. */ - u8_t *buf_ptr; + uint8_t *buf_ptr; size_t buf_size, sub_size; struct part_geom subpart; struct part_entry *entry; @@ -1738,8 +1738,8 @@ static void part_limits(void) } -static void unaligned_size_io(u64_t base_pos, u8_t *buf_ptr, size_t buf_size, - u8_t *sec_ptr[2], int sectors, int pattern, u32_t ssum[5]) +static void unaligned_size_io(u64_t base_pos, uint8_t *buf_ptr, size_t buf_size, + uint8_t *sec_ptr[2], int sectors, int pattern, u32_t ssum[5]) { /* Perform a single small-element I/O read, write, readback test. * The number of sectors and the pattern varies with each call. @@ -1912,7 +1912,7 @@ static void unaligned_size(void) /* Test sector-unaligned sizes in I/O vector elements. The total size * of the request, however, has to add up to the sector size. */ - u8_t *buf_ptr, *sec_ptr[2]; + uint8_t *buf_ptr, *sec_ptr[2]; size_t buf_size; u32_t sum = 0L, ssum[5]; u64_t base_pos; @@ -2010,7 +2010,7 @@ static void unaligned_pos1(void) * In the current context, the term "lead" means an unwanted first part * of a sector, and "trail" means an unwanted last part of a sector. */ - u8_t *buf_ptr, *buf2_ptr; + uint8_t *buf_ptr, *buf2_ptr; size_t buf_size, buf2_size, size; u32_t sum, sum2; u64_t base_pos; @@ -2159,7 +2159,7 @@ static void unaligned_pos2(void) * tries to push the limits of the driver by completely filling an I/O * vector and going up to the maximum request size. */ - u8_t *buf_ptr, *buf2_ptr; + uint8_t *buf_ptr, *buf2_ptr; size_t buf_size, buf2_size, max_block; u32_t sum = 0L, sum2 = 0L, rsum[NR_IOREQS]; u64_t base_pos; @@ -2299,7 +2299,7 @@ static void sweep_area(u64_t base_pos) * address), reading and optionally writing in three-sector chunks, and * advancing one sector at a time. */ - u8_t *buf_ptr; + uint8_t *buf_ptr; size_t buf_size; u32_t sum = 0L, ssum[8]; result_t res; @@ -2389,7 +2389,7 @@ static void sweep_and_check(u64_t pos, int check_integ) * known data into it if that is allowed) before doing the sweep, and * test the integrity checksum against the disk contents afterwards. */ - u8_t *buf_ptr; + uint8_t *buf_ptr; size_t buf_size; u32_t sum = 0L; result_t res;