Changeset 89128f3 in mainline for uspace/lib


Ignore:
Timestamp:
2011-12-08T23:12:14Z (14 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9c986d3
Parents:
b25199bc (diff), c40f385 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

Location:
uspace/lib
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/ddi.c

    rb25199bc r89128f3  
    5353}
    5454
    55 /** Map piece of physical memory to task.
     55/** Map a piece of physical memory to task.
    5656 *
    5757 * Caller of this function must have the CAP_MEM_MANAGER capability.
    5858 *
    59  * @param pf            Physical address of the starting frame.
    60  * @param vp            Virtual address of the starting page.
    61  * @param pages         Number of pages to map.
    62  * @param flags         Flags for the new address space area.
     59 * @param pf    Physical address of the starting frame.
     60 * @param vp    Virtual address of the starting page.
     61 * @param pages Number of pages to map.
     62 * @param flags Flags for the new address space area.
    6363 *
    64  * @return              0 on success, EPERM if the caller lacks the
    65  *                      CAP_MEM_MANAGER capability, ENOENT if there is no task
    66  *                      with specified ID and ENOMEM if there was some problem
    67  *                      in creating address space area.
     64 * @return EOK on success
     65 * @return EPERM if the caller lacks the CAP_MEM_MANAGER capability
     66 * @return ENOENT if there is no task with specified ID
     67 * @return ENOMEM if there was some problem in creating
     68 *         the address space area.
     69 *
    6870 */
    69 int physmem_map(void *pf, void *vp, unsigned long pages, int flags)
     71int physmem_map(void *pf, void *vp, size_t pages, unsigned int flags)
    7072{
    71         return __SYSCALL4(SYS_PHYSMEM_MAP, (sysarg_t) pf, (sysarg_t) vp, pages,
    72             flags);
     73        return __SYSCALL4(SYS_PHYSMEM_MAP, (sysarg_t) pf, (sysarg_t) vp,
     74            pages, flags);
    7375}
    7476
  • uspace/lib/c/include/ddi.h

    rb25199bc r89128f3  
    4141
    4242extern int device_assign_devno(void);
    43 extern int physmem_map(void *, void *, unsigned long, int);
     43extern int physmem_map(void *, void *, size_t, unsigned int);
    4444extern int iospace_enable(task_id_t, void *, unsigned long);
    4545extern int pio_enable(void *, size_t, void **);
  • uspace/lib/minix/minix.h

    rb25199bc r89128f3  
    3939#define S_ISDIR(m)              (((m) & S_IFMT) == S_IFDIR)
    4040#define S_ISREG(m)              (((m) & S_IFMT) == S_IFREG)
    41 #define S_IFDIR                 0040000         /*Directory*/
    42 #define S_IFREG                 0100000         /*Regular file*/
     41#define S_IFDIR                 0040000         /* Directory */
     42#define S_IFREG                 0100000         /* Regular file */
    4343#define S_IFMT                  00170000
    4444
    45 /*The following block sizes are valid only on V3 filesystem*/
     45/* The following block sizes are valid only on V3 filesystem */
    4646#define MFS_MIN_BLOCKSIZE       1024
    4747#define MFS_MAX_BLOCKSIZE       4096
     
    8888#define MFS_ERROR_FS            0x0002
    8989
    90 /*MFS V1/V2 superblock data on disk*/
     90/* MFS V1/V2 superblock data on disk */
    9191struct mfs_superblock {
    92         /*Total number of inodes on the device*/
     92        /* Total number of inodes on the device */
    9393        uint16_t        s_ninodes;
    94         /*Total number of zones on the device*/
     94        /* Total number of zones on the device */
    9595        uint16_t        s_nzones;
    96         /*Number of inode bitmap blocks*/
     96        /* Number of inode bitmap blocks */
    9797        uint16_t        s_ibmap_blocks;
    98         /*Number of zone bitmap blocks*/
     98        /* Number of zone bitmap blocks */
    9999        uint16_t        s_zbmap_blocks;
    100         /*First data zone on device*/
     100        /* First data zone on device */
    101101        uint16_t        s_first_data_zone;
    102         /*Base 2 logarithm of the zone to block ratio*/
     102        /* Base 2 logarithm of the zone to block ratio */
    103103        uint16_t        s_log2_zone_size;
    104         /*Maximum file size expressed in bytes*/
     104        /* Maximum file size expressed in bytes */
    105105        uint32_t        s_max_file_size;
    106106        /*
     
    109109         */
    110110        uint16_t        s_magic;
    111         /*Flag used to detect FS errors*/
     111        /* Flag used to detect FS errors*/
    112112        uint16_t        s_state;
    113         /*Total number of zones on the device (V2 only)*/
     113        /* Total number of zones on the device (V2 only) */
    114114        uint32_t        s_nzones2;
    115115} __attribute__ ((packed));
    116116
    117117
    118 /*MFS V3 superblock data on disk*/
     118/* MFS V3 superblock data on disk */
    119119struct mfs3_superblock {
    120         /*Total number of inodes on the device*/
     120        /* Total number of inodes on the device */
    121121        uint32_t        s_ninodes;
    122122        uint16_t        s_pad0;
    123         /*Number of inode bitmap blocks*/
     123        /* Number of inode bitmap blocks */
    124124        int16_t         s_ibmap_blocks;
    125         /*Number of zone bitmap blocks*/
     125        /* Number of zone bitmap blocks */
    126126        int16_t         s_zbmap_blocks;
    127         /*First data zone on device*/
     127        /* First data zone on device */
    128128        uint16_t        s_first_data_zone;
    129         /*Base 2 logarithm of the zone to block ratio*/
     129        /* Base 2 logarithm of the zone to block ratio */
    130130        int16_t         s_log2_zone_size;
    131131        int16_t         s_pad1;
    132         /*Maximum file size expressed in bytes*/
     132        /* Maximum file size expressed in bytes */
    133133        uint32_t        s_max_file_size;
    134         /*Total number of zones on the device*/
     134        /* Total number of zones on the device */
    135135        uint32_t        s_nzones;
    136136        /*
     
    140140        int16_t         s_magic;
    141141        int16_t         s_pad2;
    142         /*Filesystem block size expressed in bytes*/
     142        /* Filesystem block size expressed in bytes */
    143143        uint16_t        s_block_size;
    144         /*Filesystem disk format version*/
     144        /* Filesystem disk format version */
    145145        int8_t          s_disk_version;
    146146} __attribute__ ((packed));
    147147
    148 /*MinixFS V1 inode structure as it is on disk*/
     148/* MinixFS V1 inode structure as it is on disk */
    149149struct mfs_inode {
    150150        uint16_t        i_mode;
     
    154154        uint8_t         i_gid;
    155155        uint8_t         i_nlinks;
    156         /*Block numbers for direct zones*/
     156        /* Block numbers for direct zones */
    157157        uint16_t        i_dzone[V1_NR_DIRECT_ZONES];
    158         /*Block numbers for indirect zones*/
     158        /* Block numbers for indirect zones */
    159159        uint16_t        i_izone[V1_NR_INDIRECT_ZONES];
    160160} __attribute__ ((packed));
    161161
    162 /*MinixFS V2 inode structure as it is on disk (also valid for V3).*/
     162/* MinixFS V2 inode structure as it is on disk (also valid for V3). */
    163163struct mfs2_inode {
    164164        uint16_t        i_mode;
     
    170170        int32_t         i_mtime;
    171171        int32_t         i_ctime;
    172         /*Block numbers for direct zones*/
     172        /* Block numbers for direct zones */
    173173        uint32_t        i_dzone[V2_NR_DIRECT_ZONES];
    174         /*Block numbers for indirect zones*/
     174        /* Block numbers for indirect zones */
    175175        uint32_t        i_izone[V2_NR_INDIRECT_ZONES];
    176176} __attribute__ ((packed));
    177177
    178 /*MinixFS V1/V2 directory entry on-disk structure*/
     178/* MinixFS V1/V2 directory entry on-disk structure */
    179179struct mfs_dentry {
    180180        uint16_t d_inum;
     
    182182};
    183183
    184 /*MinixFS V3 directory entry on-disk structure*/
     184/* MinixFS V3 directory entry on-disk structure */
    185185struct mfs3_dentry {
    186186        uint32_t d_inum;
Note: See TracChangeset for help on using the changeset viewer.