Sync with UDF p4 tree: Use POSIX integer types instead of BSD types.
This commit is contained in:
parent
4db0d7f16f
commit
c2d6947d14
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=94795
@ -47,49 +47,49 @@ enum {
|
||||
|
||||
/* Descriptor tag [3/7.2] */
|
||||
struct desc_tag {
|
||||
u_int16_t id;
|
||||
u_int16_t descriptor_ver;
|
||||
u_int8_t cksum;
|
||||
u_int8_t reserved;
|
||||
u_int16_t serial_num;
|
||||
u_int16_t desc_crc;
|
||||
u_int16_t desc_crc_len;
|
||||
u_int32_t tag_loc;
|
||||
uint16_t id;
|
||||
uint16_t descriptor_ver;
|
||||
uint8_t cksum;
|
||||
uint8_t reserved;
|
||||
uint16_t serial_num;
|
||||
uint16_t desc_crc;
|
||||
uint16_t desc_crc_len;
|
||||
uint32_t tag_loc;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
/* Recorded Address [4/7.1] */
|
||||
struct lb_addr {
|
||||
u_int32_t lb_num;
|
||||
u_int16_t part_num;
|
||||
uint32_t lb_num;
|
||||
uint16_t part_num;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
/* Extent Descriptor [3/7.1] */
|
||||
struct extent_ad {
|
||||
u_int32_t len;
|
||||
u_int32_t loc;
|
||||
uint32_t len;
|
||||
uint32_t loc;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
/* Short Allocation Descriptor [4/14.14.1] */
|
||||
struct short_ad {
|
||||
u_int32_t len;
|
||||
u_int32_t pos;
|
||||
uint32_t len;
|
||||
uint32_t pos;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
/* Long Allocation Descriptor [4/14.14.2] */
|
||||
struct long_ad {
|
||||
u_int32_t len;
|
||||
uint32_t len;
|
||||
struct lb_addr loc;
|
||||
u_int16_t ad_flags;
|
||||
u_int32_t ad_id;
|
||||
uint16_t ad_flags;
|
||||
uint32_t ad_id;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
/* Extended Allocation Descriptor [4/14.14.3] */
|
||||
struct ext_ad {
|
||||
u_int32_t ex_len;
|
||||
u_int32_t rec_len;
|
||||
u_int32_t inf_len;
|
||||
uint32_t ex_len;
|
||||
uint32_t rec_len;
|
||||
uint32_t inf_len;
|
||||
struct lb_addr ex_loc;
|
||||
u_int8_t reserved[2];
|
||||
uint8_t reserved[2];
|
||||
} __attribute__ ((packed));
|
||||
|
||||
union icb {
|
||||
@ -100,42 +100,42 @@ union icb {
|
||||
|
||||
/* Character set spec [1/7.2.1] */
|
||||
struct charspec {
|
||||
u_int8_t type;
|
||||
u_int8_t inf[63];
|
||||
uint8_t type;
|
||||
uint8_t inf[63];
|
||||
} __attribute__ ((packed));
|
||||
|
||||
/* Timestamp [1/7.3] */
|
||||
struct timestamp {
|
||||
u_int16_t type_tz;
|
||||
u_int16_t year;
|
||||
u_int8_t month;
|
||||
u_int8_t day;
|
||||
u_int8_t hour;
|
||||
u_int8_t minute;
|
||||
u_int8_t second;
|
||||
u_int8_t centisec;
|
||||
u_int8_t hund_usec;
|
||||
u_int8_t usec;
|
||||
uint16_t type_tz;
|
||||
uint16_t year;
|
||||
uint8_t month;
|
||||
uint8_t day;
|
||||
uint8_t hour;
|
||||
uint8_t minute;
|
||||
uint8_t second;
|
||||
uint8_t centisec;
|
||||
uint8_t hund_usec;
|
||||
uint8_t usec;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
/* Entity Identifier [1/7.4] */
|
||||
#define UDF_REGID_ID_SIZE 23
|
||||
struct regid {
|
||||
u_int8_t flags;
|
||||
u_int8_t id[UDF_REGID_ID_SIZE];
|
||||
u_int8_t id_suffix[8];
|
||||
uint8_t flags;
|
||||
uint8_t id[UDF_REGID_ID_SIZE];
|
||||
uint8_t id_suffix[8];
|
||||
} __attribute__ ((packed));
|
||||
|
||||
/* ICB Tag [4/14.6] */
|
||||
struct icb_tag {
|
||||
u_int32_t prev_num_dirs;
|
||||
u_int16_t strat_type;
|
||||
u_int8_t strat_param[2];
|
||||
u_int16_t max_num_entries;
|
||||
u_int8_t reserved;
|
||||
u_int8_t file_type;
|
||||
uint32_t prev_num_dirs;
|
||||
uint16_t strat_type;
|
||||
uint8_t strat_param[2];
|
||||
uint16_t max_num_entries;
|
||||
uint8_t reserved;
|
||||
uint8_t file_type;
|
||||
struct lb_addr parent_icb;
|
||||
u_int16_t flags;
|
||||
uint16_t flags;
|
||||
} __attribute__ ((packed));
|
||||
#define UDF_ICB_TAG_FLAGS_SETUID 0x40
|
||||
#define UDF_ICB_TAG_FLAGS_SETGID 0x80
|
||||
@ -151,22 +151,22 @@ struct anchor_vdp {
|
||||
/* Volume Descriptor Pointer [3/10.3] */
|
||||
struct vol_desc_ptr {
|
||||
struct desc_tag tag;
|
||||
u_int32_t vds_number;
|
||||
uint32_t vds_number;
|
||||
struct extent_ad next_vds_ex;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
/* Primary Volume Descriptor [3/10.1] */
|
||||
struct pri_vol_desc {
|
||||
struct desc_tag tag;
|
||||
u_int32_t seq_num;
|
||||
u_int32_t pdv_num;
|
||||
uint32_t seq_num;
|
||||
uint32_t pdv_num;
|
||||
char vol_id[32];
|
||||
u_int16_t vds_num;
|
||||
u_int16_t max_vol_seq;
|
||||
u_int16_t ichg_lvl;
|
||||
u_int16_t max_ichg_lvl;
|
||||
u_int32_t charset_list;
|
||||
u_int32_t max_charset_list;
|
||||
uint16_t vds_num;
|
||||
uint16_t max_vol_seq;
|
||||
uint16_t ichg_lvl;
|
||||
uint16_t max_ichg_lvl;
|
||||
uint32_t charset_list;
|
||||
uint32_t max_charset_list;
|
||||
char volset_id[128];
|
||||
struct charspec desc_charset;
|
||||
struct charspec explanatory_charset;
|
||||
@ -175,77 +175,77 @@ struct pri_vol_desc {
|
||||
struct regid app_id;
|
||||
struct timestamp time;
|
||||
struct regid imp_id;
|
||||
u_int8_t imp_use[64];
|
||||
u_int32_t prev_vds_lov;
|
||||
u_int16_t flags;
|
||||
u_int8_t reserved[22];
|
||||
uint8_t imp_use[64];
|
||||
uint32_t prev_vds_lov;
|
||||
uint16_t flags;
|
||||
uint8_t reserved[22];
|
||||
} __attribute__ ((packed));
|
||||
|
||||
/* Logical Volume Descriptor [3/10.6] */
|
||||
struct logvol_desc {
|
||||
struct desc_tag tag;
|
||||
u_int32_t seq_num;
|
||||
uint32_t seq_num;
|
||||
struct charspec desc_charset;
|
||||
char logvol_id[128];
|
||||
u_int32_t lb_size;
|
||||
uint32_t lb_size;
|
||||
struct regid domain_id;
|
||||
union {
|
||||
struct long_ad fsd_loc;
|
||||
u_int8_t logvol_content_use[16];
|
||||
uint8_t logvol_content_use[16];
|
||||
} _lvd_use;
|
||||
u_int32_t mt_l; /* Partition map length */
|
||||
u_int32_t n_pm; /* Number of partition maps */
|
||||
uint32_t mt_l; /* Partition map length */
|
||||
uint32_t n_pm; /* Number of partition maps */
|
||||
struct regid imp_id;
|
||||
u_int8_t imp_use[128];
|
||||
uint8_t imp_use[128];
|
||||
struct extent_ad integrity_seq_id;
|
||||
u_int8_t maps[1];
|
||||
uint8_t maps[1];
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#define UDF_PMAP_SIZE 64
|
||||
|
||||
/* Type 1 Partition Map [3/10.7.2] */
|
||||
struct part_map_1 {
|
||||
u_int8_t type;
|
||||
u_int8_t len;
|
||||
u_int16_t vol_seq_num;
|
||||
u_int16_t part_num;
|
||||
uint8_t type;
|
||||
uint8_t len;
|
||||
uint16_t vol_seq_num;
|
||||
uint16_t part_num;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
/* Type 2 Partition Map [3/10.7.3] */
|
||||
struct part_map_2 {
|
||||
u_int8_t type;
|
||||
u_int8_t len;
|
||||
u_int8_t part_id[62];
|
||||
uint8_t type;
|
||||
uint8_t len;
|
||||
uint8_t part_id[62];
|
||||
} __attribute__ ((packed));
|
||||
|
||||
/* Virtual Partition Map [UDF 2.01/2.2.8] */
|
||||
struct part_map_virt {
|
||||
u_int8_t type;
|
||||
u_int8_t len;
|
||||
u_int8_t reserved[2];
|
||||
uint8_t type;
|
||||
uint8_t len;
|
||||
uint8_t reserved[2];
|
||||
struct regid id;
|
||||
u_int16_t vol_seq_num;
|
||||
u_int16_t part_num;
|
||||
u_int8_t reserved1[24];
|
||||
uint16_t vol_seq_num;
|
||||
uint16_t part_num;
|
||||
uint8_t reserved1[24];
|
||||
} __attribute__ ((packed));
|
||||
|
||||
/* Sparable Partition Map [UDF 2.01/2.2.9] */
|
||||
struct part_map_spare {
|
||||
u_int8_t type;
|
||||
u_int8_t len;
|
||||
u_int8_t reserved[2];
|
||||
uint8_t type;
|
||||
uint8_t len;
|
||||
uint8_t reserved[2];
|
||||
struct regid id;
|
||||
u_int16_t vol_seq_num;
|
||||
u_int16_t part_num;
|
||||
u_int16_t packet_len;
|
||||
u_int8_t n_st; /* Number of Sparing Tables */
|
||||
u_int8_t reserved1;
|
||||
u_int32_t st_size;
|
||||
u_int32_t st_loc[1];
|
||||
uint16_t vol_seq_num;
|
||||
uint16_t part_num;
|
||||
uint16_t packet_len;
|
||||
uint8_t n_st; /* Number of Sparing Tables */
|
||||
uint8_t reserved1;
|
||||
uint32_t st_size;
|
||||
uint32_t st_loc[1];
|
||||
} __attribute__ ((packed));
|
||||
|
||||
union udf_pmap {
|
||||
u_int8_t data[UDF_PMAP_SIZE];
|
||||
uint8_t data[UDF_PMAP_SIZE];
|
||||
struct part_map_1 pm1;
|
||||
struct part_map_2 pm2;
|
||||
struct part_map_virt pmv;
|
||||
@ -254,46 +254,46 @@ union udf_pmap {
|
||||
|
||||
/* Sparing Map Entry [UDF 2.01/2.2.11] */
|
||||
struct spare_map_entry {
|
||||
u_int32_t org;
|
||||
u_int32_t map;
|
||||
uint32_t org;
|
||||
uint32_t map;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
/* Sparing Table [UDF 2.01/2.2.11] */
|
||||
struct udf_sparing_table {
|
||||
struct desc_tag tag;
|
||||
struct regid id;
|
||||
u_int16_t rt_l; /* Relocation Table len */
|
||||
u_int8_t reserved[2];
|
||||
u_int32_t seq_num;
|
||||
uint16_t rt_l; /* Relocation Table len */
|
||||
uint8_t reserved[2];
|
||||
uint32_t seq_num;
|
||||
struct spare_map_entry entries[1];
|
||||
} __attribute__ ((packed));
|
||||
|
||||
/* Partition Descriptor [3/10.5] */
|
||||
struct part_desc {
|
||||
struct desc_tag tag;
|
||||
u_int32_t seq_num;
|
||||
u_int16_t flags;
|
||||
u_int16_t part_num;
|
||||
uint32_t seq_num;
|
||||
uint16_t flags;
|
||||
uint16_t part_num;
|
||||
struct regid contents;
|
||||
u_int8_t contents_use[128];
|
||||
u_int32_t access_type;
|
||||
u_int32_t start_loc;
|
||||
u_int32_t part_len;
|
||||
uint8_t contents_use[128];
|
||||
uint32_t access_type;
|
||||
uint32_t start_loc;
|
||||
uint32_t part_len;
|
||||
struct regid imp_id;
|
||||
u_int8_t imp_use[128];
|
||||
u_int8_t reserved[156];
|
||||
uint8_t imp_use[128];
|
||||
uint8_t reserved[156];
|
||||
} __attribute__ ((packed));
|
||||
|
||||
/* File Set Descriptor [4/14.1] */
|
||||
struct fileset_desc {
|
||||
struct desc_tag tag;
|
||||
struct timestamp time;
|
||||
u_int16_t ichg_lvl;
|
||||
u_int16_t max_ichg_lvl;
|
||||
u_int32_t charset_list;
|
||||
u_int32_t max_charset_list;
|
||||
u_int32_t fileset_num;
|
||||
u_int32_t fileset_desc_num;
|
||||
uint16_t ichg_lvl;
|
||||
uint16_t max_ichg_lvl;
|
||||
uint32_t charset_list;
|
||||
uint32_t max_charset_list;
|
||||
uint32_t fileset_num;
|
||||
uint32_t fileset_desc_num;
|
||||
struct charspec logvol_id_charset;
|
||||
char logvol_id[128];
|
||||
struct charspec fileset_charset;
|
||||
@ -304,18 +304,18 @@ struct fileset_desc {
|
||||
struct regid domain_id;
|
||||
struct long_ad next_ex;
|
||||
struct long_ad streamdir_icb;
|
||||
u_int8_t reserved[32];
|
||||
uint8_t reserved[32];
|
||||
} __attribute__ ((packed));
|
||||
|
||||
/* File Identifier Descriptor [4/14.4] */
|
||||
struct fileid_desc {
|
||||
struct desc_tag tag;
|
||||
u_int16_t file_num;
|
||||
u_int8_t file_char;
|
||||
u_int8_t l_fi; /* Length of file identifier area */
|
||||
uint16_t file_num;
|
||||
uint8_t file_char;
|
||||
uint8_t l_fi; /* Length of file identifier area */
|
||||
struct long_ad icb;
|
||||
u_int16_t l_iu; /* Length of implementaion use area */
|
||||
u_int8_t data[1];
|
||||
uint16_t l_iu; /* Length of implementaion use area */
|
||||
uint8_t data[1];
|
||||
} __attribute__ ((packed));
|
||||
#define UDF_FID_SIZE 38
|
||||
|
||||
@ -323,25 +323,25 @@ struct fileid_desc {
|
||||
struct file_entry {
|
||||
struct desc_tag tag;
|
||||
struct icb_tag icbtag;
|
||||
u_int32_t uid;
|
||||
u_int32_t gid;
|
||||
u_int32_t perm;
|
||||
u_int16_t link_cnt;
|
||||
u_int8_t rec_format;
|
||||
u_int8_t rec_disp_attr;
|
||||
u_int32_t rec_len;
|
||||
u_int64_t inf_len;
|
||||
u_int64_t logblks_rec;
|
||||
uint32_t uid;
|
||||
uint32_t gid;
|
||||
uint32_t perm;
|
||||
uint16_t link_cnt;
|
||||
uint8_t rec_format;
|
||||
uint8_t rec_disp_attr;
|
||||
uint32_t rec_len;
|
||||
uint64_t inf_len;
|
||||
uint64_t logblks_rec;
|
||||
struct timestamp atime;
|
||||
struct timestamp mtime;
|
||||
struct timestamp attrtime;
|
||||
u_int32_t ckpoint;
|
||||
uint32_t ckpoint;
|
||||
struct long_ad ex_attr_icb;
|
||||
struct regid imp_id;
|
||||
u_int64_t unique_id;
|
||||
u_int32_t l_ea; /* Length of extended attribute area */
|
||||
u_int32_t l_ad; /* Length of allocation descriptors */
|
||||
u_int8_t data[1];
|
||||
uint64_t unique_id;
|
||||
uint32_t l_ea; /* Length of extended attribute area */
|
||||
uint32_t l_ad; /* Length of allocation descriptors */
|
||||
uint8_t data[1];
|
||||
} __attribute ((packed));
|
||||
#define UDF_FENTRY_SIZE 176
|
||||
#define UDF_FENTRY_PERM_USER_MASK 0x07
|
||||
|
@ -45,9 +45,9 @@ struct udf_mnt {
|
||||
int bsize;
|
||||
int bshift;
|
||||
int bmask;
|
||||
u_int32_t part_start;
|
||||
u_int32_t part_len;
|
||||
u_int64_t root_id;
|
||||
uint32_t part_start;
|
||||
uint32_t part_len;
|
||||
uint64_t root_id;
|
||||
struct vnode *root_vp;
|
||||
struct long_ad root_icb;
|
||||
TAILQ_HEAD(, udf_node) udf_tqh;
|
||||
@ -108,7 +108,7 @@ int udf_allocv(struct mount *, struct vnode **, struct thread *);
|
||||
int udf_hashlookup(struct udf_mnt *, ino_t, int, struct vnode **);
|
||||
int udf_hashins(struct udf_node *);
|
||||
int udf_hashrem(struct udf_node *);
|
||||
int udf_checktag(struct desc_tag *, u_int16_t);
|
||||
int udf_checktag(struct desc_tag *, uint16_t);
|
||||
int udf_vget(struct mount *, ino_t, int, struct vnode **);
|
||||
|
||||
extern uma_zone_t udf_zone_trans;
|
||||
|
@ -241,12 +241,12 @@ udf_mount(struct mount *mp, char *path, caddr_t data, struct nameidata *ndp, str
|
||||
* Return zero if all is good, EINVAL if not.
|
||||
*/
|
||||
int
|
||||
udf_checktag(struct desc_tag *tag, u_int16_t id)
|
||||
udf_checktag(struct desc_tag *tag, uint16_t id)
|
||||
{
|
||||
u_int8_t *itag;
|
||||
u_int8_t i, cksum = 0;
|
||||
uint8_t *itag;
|
||||
uint8_t i, cksum = 0;
|
||||
|
||||
itag = (u_int8_t *)tag;
|
||||
itag = (uint8_t *)tag;
|
||||
|
||||
if (tag->id != id)
|
||||
return (EINVAL);
|
||||
@ -270,9 +270,9 @@ udf_mountfs(struct vnode *devvp, struct mount *mp, struct thread *td, struct udf
|
||||
struct logvol_desc *lvd;
|
||||
struct fileset_desc *fsd;
|
||||
struct file_entry *root_fentry;
|
||||
u_int32_t sector, size, mvds_start, mvds_end;
|
||||
u_int32_t fsd_offset = 0;
|
||||
u_int16_t part_num = 0, fsd_part = 0;
|
||||
uint32_t sector, size, mvds_start, mvds_end;
|
||||
uint32_t fsd_offset = 0;
|
||||
uint16_t part_num = 0, fsd_part = 0;
|
||||
int error = EINVAL, needclose = 0;
|
||||
int logvol_found = 0, part_found = 0, fsd_found = 0;
|
||||
int bsize;
|
||||
|
@ -62,8 +62,8 @@ static int udf_bmap(struct vop_bmap_args *);
|
||||
static int udf_lookup(struct vop_cachedlookup_args *);
|
||||
static int udf_reclaim(struct vop_reclaim_args *);
|
||||
static void udf_dumpblock(void *, int) __unused;
|
||||
static int udf_readatoffset(struct udf_node *, int *, int, struct buf **, u_int8_t **);
|
||||
static int udf_bmap_internal(struct udf_node *, u_int32_t, daddr64_t *, u_int32_t *);
|
||||
static int udf_readatoffset(struct udf_node *, int *, int, struct buf **, uint8_t **);
|
||||
static int udf_bmap_internal(struct udf_node *, uint32_t, daddr64_t *, uint32_t *);
|
||||
|
||||
vop_t **udf_vnodeop_p;
|
||||
static struct vnodeopv_entry_desc udf_vnodeop_entries[] = {
|
||||
@ -176,8 +176,8 @@ udf_allocv(struct mount *mp, struct vnode **vpp, struct thread *td)
|
||||
static mode_t
|
||||
udf_permtomode(struct udf_node *node)
|
||||
{
|
||||
u_int32_t perm;
|
||||
u_int32_t flags;
|
||||
uint32_t perm;
|
||||
uint32_t flags;
|
||||
mode_t mode;
|
||||
|
||||
perm = node->fentry->perm;
|
||||
@ -249,7 +249,7 @@ udf_timetotimespec(struct timestamp *time, struct timespec *t)
|
||||
{
|
||||
int i, lpyear, daysinyear;
|
||||
union {
|
||||
u_int16_t u_tz_offset;
|
||||
uint16_t u_tz_offset;
|
||||
int16_t s_tz_offset;
|
||||
} tz;
|
||||
|
||||
@ -395,7 +395,7 @@ udf_read(struct vop_read_args *a)
|
||||
struct uio *uio = a->a_uio;
|
||||
struct udf_node *node = VTON(vp);
|
||||
struct buf *bp;
|
||||
u_int8_t *data;
|
||||
uint8_t *data;
|
||||
int error = 0;
|
||||
int size, n, fsize, offset;
|
||||
|
||||
@ -432,7 +432,7 @@ udf_dumpblock(void *data, int len)
|
||||
for (j = 0; j < 8; j++) {
|
||||
if (i + j == len)
|
||||
break;
|
||||
printf("0x%02x ", (u_int8_t)((u_int8_t*)(data))[i + j]);
|
||||
printf("0x%02x ", (uint8_t)((uint8_t*)(data))[i + j]);
|
||||
}
|
||||
i += j - 1;
|
||||
}
|
||||
@ -548,7 +548,7 @@ udf_readdir(struct vop_readdir_args *a)
|
||||
struct fileid_desc *fid;
|
||||
struct udf_uiodir uiodir;
|
||||
u_long *cookies = NULL;
|
||||
u_int8_t *data;
|
||||
uint8_t *data;
|
||||
int ncookies;
|
||||
int error = 0, offset, off, size, de_size, fid_size, fsize;
|
||||
int total_fid_size = 0, frag_size = 0, fid_fragment = 0;
|
||||
@ -610,11 +610,11 @@ udf_readdir(struct vop_readdir_args *a)
|
||||
if (off >= size || off + fid_size > size ||
|
||||
off + fid->l_iu + fid->l_fi + fid_size > size) {
|
||||
struct fileid_desc *fid_buf;
|
||||
u_int8_t *buf;
|
||||
uint8_t *buf;
|
||||
|
||||
/* Copy what we have of the fid into a buffer */
|
||||
frag_size = size - off;
|
||||
MALLOC(buf, u_int8_t*, max(frag_size, fid_size),
|
||||
MALLOC(buf, uint8_t*, max(frag_size, fid_size),
|
||||
M_UDFFID, M_NOWAIT | M_ZERO);
|
||||
if (buf == NULL)
|
||||
panic("No memory?");
|
||||
@ -658,7 +658,7 @@ udf_readdir(struct vop_readdir_args *a)
|
||||
break;
|
||||
}
|
||||
bcopy(fid_buf, fid, frag_size);
|
||||
bcopy(data, &((u_int8_t*)(fid))[frag_size],
|
||||
bcopy(data, &((uint8_t*)(fid))[frag_size],
|
||||
total_fid_size - frag_size);
|
||||
|
||||
fid_fragment = 1;
|
||||
@ -797,7 +797,7 @@ static int
|
||||
udf_bmap(struct vop_bmap_args *a)
|
||||
{
|
||||
struct udf_node *node;
|
||||
u_int32_t max_size;
|
||||
uint32_t max_size;
|
||||
int error;
|
||||
|
||||
node = VTON(a->a_vp);
|
||||
@ -840,7 +840,7 @@ udf_lookup(struct vop_cachedlookup_args *a)
|
||||
char *nameptr;
|
||||
long namelen;
|
||||
ino_t id = 0;
|
||||
u_int8_t *data;
|
||||
uint8_t *data;
|
||||
int offset, off, error, size;
|
||||
int numdirpasses, fid_size, fsize, icb_len;
|
||||
int total_fid_size = 0, fid_fragment = 0;
|
||||
@ -890,12 +890,12 @@ udf_lookup(struct vop_cachedlookup_args *a)
|
||||
if (off >= size || off + fid_size > size ||
|
||||
off + fid_size + fid->l_iu + fid->l_fi > size) {
|
||||
struct fileid_desc *fid_buf;
|
||||
u_int8_t *buf;
|
||||
uint8_t *buf;
|
||||
int frag_size = 0;
|
||||
|
||||
/* Copy what we have of the fid into a buffer */
|
||||
frag_size = size - off;
|
||||
MALLOC(buf, u_int8_t*, max(frag_size, fid_size),
|
||||
MALLOC(buf, uint8_t*, max(frag_size, fid_size),
|
||||
M_UDFFID, M_NOWAIT | M_ZERO);
|
||||
if (buf == NULL)
|
||||
panic("No memory?");
|
||||
@ -938,7 +938,7 @@ udf_lookup(struct vop_cachedlookup_args *a)
|
||||
return (ENOMEM);
|
||||
}
|
||||
bcopy(fid_buf, fid, frag_size);
|
||||
bcopy(data, &((u_int8_t*)(fid))[frag_size],
|
||||
bcopy(data, &((uint8_t*)(fid))[frag_size],
|
||||
total_fid_size - frag_size);
|
||||
|
||||
off = (total_fid_size - frag_size + 3) & ~0x03;
|
||||
@ -1068,12 +1068,12 @@ udf_reclaim(struct vop_reclaim_args *a)
|
||||
* with udf_read()
|
||||
*/
|
||||
static int
|
||||
udf_readatoffset(struct udf_node *node, int *size, int offset, struct buf **bp, u_int8_t **data)
|
||||
udf_readatoffset(struct udf_node *node, int *size, int offset, struct buf **bp, uint8_t **data)
|
||||
{
|
||||
struct udf_mnt *udfmp;
|
||||
struct file_entry *fentry = NULL;
|
||||
struct buf *bp1;
|
||||
u_int32_t max_size;
|
||||
uint32_t max_size;
|
||||
daddr64_t sector;
|
||||
int error;
|
||||
|
||||
@ -1108,7 +1108,7 @@ udf_readatoffset(struct udf_node *node, int *size, int offset, struct buf **bp,
|
||||
}
|
||||
|
||||
bp1 = *bp;
|
||||
*data = (u_int8_t *)&bp1->b_data[offset % udfmp->bsize];
|
||||
*data = (uint8_t *)&bp1->b_data[offset % udfmp->bsize];
|
||||
return (0);
|
||||
}
|
||||
|
||||
@ -1117,13 +1117,13 @@ udf_readatoffset(struct udf_node *node, int *size, int offset, struct buf **bp,
|
||||
* block.
|
||||
*/
|
||||
static int
|
||||
udf_bmap_internal(struct udf_node *node, u_int32_t offset, daddr64_t *sector, u_int32_t *max_size)
|
||||
udf_bmap_internal(struct udf_node *node, uint32_t offset, daddr64_t *sector, uint32_t *max_size)
|
||||
{
|
||||
struct udf_mnt *udfmp;
|
||||
struct file_entry *fentry;
|
||||
void *icb;
|
||||
struct icb_tag *tag;
|
||||
u_int32_t icblen = 0;
|
||||
uint32_t icblen = 0;
|
||||
daddr64_t lsector;
|
||||
int ad_offset, ad_num = 0;
|
||||
int i, p_offset;
|
||||
|
Loading…
Reference in New Issue
Block a user