Merge commit 'origin/205_inttypes_64bit_error'
Этот коммит содержится в:
Коммит
2e0edf8672
16
vfs/cpio.c
16
vfs/cpio.c
@ -94,10 +94,10 @@ struct defer_inode {
|
|||||||
static int cpio_position;
|
static int cpio_position;
|
||||||
|
|
||||||
static int cpio_find_head(struct vfs_class *me, struct vfs_s_super *super);
|
static int cpio_find_head(struct vfs_class *me, struct vfs_s_super *super);
|
||||||
static int cpio_read_bin_head(struct vfs_class *me, struct vfs_s_super *super);
|
|
||||||
static int cpio_read_oldc_head(struct vfs_class *me, struct vfs_s_super *super);
|
|
||||||
static int cpio_read_crc_head(struct vfs_class *me, struct vfs_s_super *super);
|
|
||||||
static int cpio_create_entry(struct vfs_class *me, struct vfs_s_super *super, struct stat *, char *name);
|
static int cpio_create_entry(struct vfs_class *me, struct vfs_s_super *super, struct stat *, char *name);
|
||||||
|
static ssize_t cpio_read_bin_head(struct vfs_class *me, struct vfs_s_super *super);
|
||||||
|
static ssize_t cpio_read_oldc_head(struct vfs_class *me, struct vfs_s_super *super);
|
||||||
|
static ssize_t cpio_read_crc_head(struct vfs_class *me, struct vfs_s_super *super);
|
||||||
static ssize_t cpio_read(void *fh, char *buffer, int count);
|
static ssize_t cpio_read(void *fh, char *buffer, int count);
|
||||||
|
|
||||||
#define CPIO_POS(super) cpio_position
|
#define CPIO_POS(super) cpio_position
|
||||||
@ -198,7 +198,7 @@ cpio_open_cpio_file (struct vfs_class *me, struct vfs_s_super *super,
|
|||||||
return fd;
|
return fd;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int cpio_read_head(struct vfs_class *me, struct vfs_s_super *super)
|
static ssize_t cpio_read_head(struct vfs_class *me, struct vfs_s_super *super)
|
||||||
{
|
{
|
||||||
switch(cpio_find_head(me, super)) {
|
switch(cpio_find_head(me, super)) {
|
||||||
case CPIO_UNKNOWN:
|
case CPIO_UNKNOWN:
|
||||||
@ -263,7 +263,7 @@ static int cpio_find_head(struct vfs_class *me, struct vfs_s_super *super)
|
|||||||
#undef SEEKBACK
|
#undef SEEKBACK
|
||||||
|
|
||||||
#define HEAD_LENGTH (26)
|
#define HEAD_LENGTH (26)
|
||||||
static int cpio_read_bin_head(struct vfs_class *me, struct vfs_s_super *super)
|
static ssize_t cpio_read_bin_head(struct vfs_class *me, struct vfs_s_super *super)
|
||||||
{
|
{
|
||||||
union {
|
union {
|
||||||
struct old_cpio_header buf;
|
struct old_cpio_header buf;
|
||||||
@ -317,7 +317,7 @@ static int cpio_read_bin_head(struct vfs_class *me, struct vfs_s_super *super)
|
|||||||
#undef HEAD_LENGTH
|
#undef HEAD_LENGTH
|
||||||
|
|
||||||
#define HEAD_LENGTH (76)
|
#define HEAD_LENGTH (76)
|
||||||
static int cpio_read_oldc_head(struct vfs_class *me, struct vfs_s_super *super)
|
static ssize_t cpio_read_oldc_head(struct vfs_class *me, struct vfs_s_super *super)
|
||||||
{
|
{
|
||||||
struct new_cpio_header hd;
|
struct new_cpio_header hd;
|
||||||
union {
|
union {
|
||||||
@ -376,7 +376,7 @@ static int cpio_read_oldc_head(struct vfs_class *me, struct vfs_s_super *super)
|
|||||||
#undef HEAD_LENGTH
|
#undef HEAD_LENGTH
|
||||||
|
|
||||||
#define HEAD_LENGTH (110)
|
#define HEAD_LENGTH (110)
|
||||||
static int cpio_read_crc_head(struct vfs_class *me, struct vfs_s_super *super)
|
static ssize_t cpio_read_crc_head(struct vfs_class *me, struct vfs_s_super *super)
|
||||||
{
|
{
|
||||||
struct new_cpio_header hd;
|
struct new_cpio_header hd;
|
||||||
union {
|
union {
|
||||||
@ -630,7 +630,7 @@ cpio_super_same (struct vfs_class *me, struct vfs_s_super *parc,
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int cpio_read(void *fh, char *buffer, int count)
|
static ssize_t cpio_read(void *fh, char *buffer, int count)
|
||||||
{
|
{
|
||||||
off_t begin = FH->ino->data_offset;
|
off_t begin = FH->ino->data_offset;
|
||||||
int fd = FH_SUPER->u.arch.fd;
|
int fd = FH_SUPER->u.arch.fd;
|
||||||
|
@ -377,7 +377,7 @@ MC_NAMEOP (mknod, (const char *path, mode_t mode, dev_t dev), (vfs, mpath, mode,
|
|||||||
|
|
||||||
|
|
||||||
#define MC_HANDLEOP(name, inarg, callarg) \
|
#define MC_HANDLEOP(name, inarg, callarg) \
|
||||||
int mc_##name inarg \
|
ssize_t mc_##name inarg \
|
||||||
{ \
|
{ \
|
||||||
struct vfs_class *vfs; \
|
struct vfs_class *vfs; \
|
||||||
int result; \
|
int result; \
|
||||||
@ -390,8 +390,8 @@ int mc_##name inarg \
|
|||||||
return result; \
|
return result; \
|
||||||
}
|
}
|
||||||
|
|
||||||
MC_HANDLEOP(read, (int handle, void *buffer, int count), (vfs_info (handle), buffer, count) )
|
MC_HANDLEOP(read, (int handle, void *buffer, int count), (vfs_info (handle), buffer, count))
|
||||||
MC_HANDLEOP (write, (int handle, const void *buf, int nbyte), (vfs_info (handle), buf, nbyte))
|
MC_HANDLEOP(write, (int handle, const void *buf, int nbyte), (vfs_info (handle), buf, nbyte))
|
||||||
|
|
||||||
|
|
||||||
#define MC_RENAMEOP(name) \
|
#define MC_RENAMEOP(name) \
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user