Changeset 6387c18 in mainline


Ignore:
Timestamp:
2008-05-30T14:54:33Z (17 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8c7294c6
Parents:
afb1e35
Message:

fix kernel ramdisk support

Location:
kernel/generic
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/lib/rd.h

    rafb1e35 r6387c18  
    6767
    6868/** RAM disk header */
    69 typedef struct {
     69struct rd_header {
    7070        uint8_t magic[RD_MAGIC_SIZE];
    7171        uint8_t version;
     
    7373        uint32_t header_size;
    7474        uint64_t data_size;
    75 } rd_header;
     75} __attribute__ ((packed));
    7676
    77 extern int init_rd(rd_header * addr, size_t size);
     77typedef struct rd_header rd_header_t;
     78
     79extern int init_rd(rd_header_t *addr, size_t size);
    7880
    7981#endif
  • kernel/generic/src/lib/rd.c

    rafb1e35 r6387c18  
    4343#include <sysinfo/sysinfo.h>
    4444#include <ddi/ddi.h>
    45 #include <print.h>
    4645#include <align.h>
    4746
     
    5352 * tasks.
    5453 */ 
    55 int init_rd(rd_header * header, size_t size)
     54int init_rd(rd_header_t *header, size_t size)
    5655{
    5756        /* Identify RAM disk */
     
    8180        if ((hsize % FRAME_SIZE) || (dsize % FRAME_SIZE))
    8281                return RE_UNSUPPORTED;
    83        
    84         if (dsize % FRAME_SIZE)
    85                 return RE_UNSUPPORTED;
    86 
     82               
    8783        if (hsize > size)
    8884                return RE_INVALID;
  • kernel/generic/src/main/kinit.c

    rafb1e35 r6387c18  
    179179                                ipc_phone_0 = &utask->answerbox;
    180180                } else {
    181                         int rd = init_rd((rd_header *) init.tasks[i].addr,
     181                        int rd = init_rd((rd_header_t *) init.tasks[i].addr,
    182182                            init.tasks[i].size);
    183183                       
Note: See TracChangeset for help on using the changeset viewer.