Hi Jiří,

I found out that after 645d38325f770af3d73b15f6b1c95d0c2f9de91b
you cannot create or read GPT disk labels. Some assertions fail
in pci-ide.c, the diff bellow fixes it (probably just typos).

There was no conflict with my changes, so I pulled upstream and
then committed the new changes, and just now I found out that it
is not possible to create GPT labels.

--
mc


diff --git a/uspace/drv/block/pci-ide/pci-ide.c 
b/uspace/drv/block/pci-ide/pci-ide.c
index cc1a5f96c..80f3c5242 100644
--- a/uspace/drv/block/pci-ide/pci-ide.c
+++ b/uspace/drv/block/pci-ide/pci-ide.c
@@ -555,7 +555,7 @@ static void pci_ide_dma_chan_setup(void *arg, void *buf, 
size_t buf_size,
        chan->cur_buf_size = buf_size;
 
        if (dir == ata_dma_write) {
-               assert(buf_size < chan->dma_buf_size);
+               assert(buf_size <= chan->dma_buf_size);
                memcpy(chan->dma_buf, buf, buf_size);
        }
 
@@ -591,7 +591,7 @@ static void pci_ide_dma_chan_teardown(void *arg)
        pio_write_8(bmicx, val);
 
        if (chan->cur_dir == ata_dma_read) {
-               assert(chan->cur_buf_size < chan->dma_buf_size);
+               assert(chan->cur_buf_size <= chan->dma_buf_size);
                memcpy(chan->cur_buf, chan->dma_buf, chan->cur_buf_size);
        }
 }



Miroslav Cimerman <m...@doas.su> wrote:

> 
> 
> Hi Jiri,
> 
> I force pushed the changes on the current PR. What do you think?
> 
> --
> mc
> 
> 
> Jiri Svoboda jirik.svob...@seznam.cz wrote:
> 
> > Hi Miroslav,
> > 
> > > Do you mean something like:
> > > 
> > > #define _UUID_NODE_LEN 6
> > > 
> > > typedef struct {
> > > uint32_t time_low;
> > > uint16_t time_mid;
> > > uint16_t time_hi_and_version;
> > > uint8_t clock_seq_hi_and_reserved;
> > > uint8_t clock_seq_low;
> > > uint8_t node[_UUID_NODE_LEN];
> > > } uuid_t;
> > 
> > Yeah, something like that would work. Alternatively, you could also 
> > represent node as uint16_t node_hi + uint32_t node_lo.
> > 
> > Cheers,
> > 
> > Jiri

_______________________________________________
HelenOS-devel mailing list
HelenOS-devel@lists.modry.cz
http://lists.modry.cz/listinfo/helenos-devel

Reply via email to