Aligning dev_t to 64bits.

Change-Id: I630f72f8530dd4aaf05c35ca23683ae12c9f8328
This commit is contained in:
Lionel Sambuc 2013-11-15 19:01:25 +01:00
parent a00e322bea
commit 37598dccf1
40 changed files with 76 additions and 77 deletions

View file

@ -353,7 +353,7 @@
#define VFS_MKNOD_NAME m1_p1 /* const char * */
#define VFS_MKNOD_LEN m1_i1 /* size_t */
#define VFS_MKNOD_MODE m1_i2 /* mode_t */
#define VFS_MKNOD_DEV m1_i3 /* dev_t */
#define VFS_MKNOD_DEV m1_ull1 /* dev_t */
/* Field names for the open(2), chdir(2), chmod(2), chroot(2), rmdir(2), and
* unlink(2) calls.

View file

@ -17,9 +17,10 @@
#define M3_LONG_STRING 44 /* current m3_ca1 size (may be increased) */
typedef struct {
uint64_t m1ull1;
int m1i1, m1i2, m1i3;
char *m1p1, *m1p2, *m1p3, *m1p4;
uint8_t padding[28];
uint8_t padding[20];
} mess_1;
_ASSERT_MSG_SIZE(mess_1);
@ -28,7 +29,7 @@ typedef struct {
long m2l1, m2l2;
char *m2p1;
sigset_t sigset;
short m2s1;
short m2s1;
uint8_t padding[14];
} mess_2;
_ASSERT_MSG_SIZE(mess_2);
@ -89,9 +90,10 @@ typedef struct {
_ASSERT_MSG_SIZE(mess_8);
typedef struct {
uint64_t m9ull1;
long m9l1, m9l2, m9l3, m9l4, m9l5;
short m9s1, m9s2, m9s3, m9s4;
uint8_t padding[28];
uint8_t padding[20];
} mess_9;
_ASSERT_MSG_SIZE(mess_9);
@ -111,15 +113,15 @@ typedef struct {
_ASSERT_MSG_SIZE(mess_11);
typedef struct {
dev_t dev; /* 64bits long. */
void *block;
u32_t dev_offset_pages;
u32_t ino_offset_pages;
u32_t ino;
u32_t *flags_ptr;
u32_t dev;
u8_t pages;
u8_t flags;
uint8_t padding[30];
uint8_t padding[26];
} mess_vmmcp;
_ASSERT_MSG_SIZE(mess_vmmcp);
@ -134,13 +136,13 @@ _ASSERT_MSG_SIZE(mess_notify);
typedef struct {
endpoint_t who;
u32_t offset;
u32_t dev;
dev_t dev;
u32_t ino;
u32_t vaddr;
u32_t len;
u16_t fd;
u16_t clearend_and_flags; /* low 12 bits are clearend, rest flags */
uint8_t padding[28];
uint8_t padding[24];
} mess_vm_vfs_mmap;
_ASSERT_MSG_SIZE(mess_vm_vfs_mmap);
@ -186,6 +188,7 @@ typedef int _ASSERT_message[/* CONSTCOND */sizeof(message) == 64 ?1 : -1];
#define m1_p2 m_u.m_m1.m1p2
#define m1_p3 m_u.m_m1.m1p3
#define m1_p4 m_u.m_m1.m1p4
#define m1_ull1 m_u.m_m1.m1ull1
#define m2_i1 m_u.m_m2.m2i1
#define m2_i2 m_u.m_m2.m2i2
@ -251,6 +254,7 @@ typedef int _ASSERT_message[/* CONSTCOND */sizeof(message) == 64 ?1 : -1];
#define m9_s2 m_u.m_m9.m9s2
#define m9_s3 m_u.m_m9.m9s3
#define m9_s4 m_u.m_m9.m9s4
#define m9_ull1 m_u.m_m9.m9ull1
#define m10_i1 m_u.m_m10.m10i1
#define m10_i2 m_u.m_m10.m10i2

View file

@ -118,7 +118,7 @@ struct rprocpub {
unsigned sys_flags; /* sys flags */
endpoint_t endpoint; /* process endpoint number */
dev_t dev_nr; /* major device number or NO_DEV */
devmajor_t dev_nr; /* major device number or NO_DEV */
char label[RS_MAX_LABEL_LEN]; /* label of this service */
char proc_name[RS_MAX_LABEL_LEN]; /* process name of this service */

View file

@ -8,8 +8,7 @@
#define REQ_ACTIME m9_l2
#define REQ_ACNSEC m9_l4
#define REQ_COUNT m9_l2
#define REQ_DEV m9_l5
#define REQ_DEV2 m9_l1
#define REQ_DEV m9_ull1
#define REQ_DIR_INO m9_l3
#define REQ_FLAGS m9_s3
#define REQ_GID m9_s1
@ -41,7 +40,7 @@
#define REQ_UID m9_s4
/* VFS/FS reply fields */
#define RES_DEV m9_l4
#define RES_DEV m9_ull1
#define RES_GID m9_s1
#define RES_INODE_NR m9_l1
#define RES_FILE_SIZE_HI m9_l2

View file

@ -24,7 +24,7 @@ int vm_watch_exit(endpoint_t ep);
int vm_forgetblock(u64_t id);
void vm_forgetblocks(void);
int minix_vfs_mmap(endpoint_t who, u32_t offset, u32_t len,
u32_t dev, u32_t ino, u16_t fd, u32_t vaddr, u16_t clearend, u16_t
dev_t dev, u32_t ino, u16_t fd, u32_t vaddr, u16_t clearend, u16_t
flags);
/* minix vfs mmap flags */
@ -65,13 +65,13 @@ int vm_info_region(endpoint_t who, struct vm_region_info *vri, int
count, vir_bytes *next);
int vm_procctl(endpoint_t ep, int param);
int vm_set_cacheblock(void *block, u32_t dev, u64_t dev_offset,
int vm_set_cacheblock(void *block, dev_t dev, u64_t dev_offset,
u64_t ino, u64_t ino_offset, u32_t *flags, int blocksize);
void *vm_map_cacheblock(u32_t dev, u64_t dev_offset,
void *vm_map_cacheblock(dev_t dev, u64_t dev_offset,
u64_t ino, u64_t ino_offset, u32_t *flags, int blocksize);
int vm_clear_cache(u32_t dev);
int vm_clear_cache(dev_t dev);
/* flags for vm cache functions */
#define VMMC_FLAGS_LOCKED 0x01 /* someone is updating the flags; don't read/write */

View file

@ -53,7 +53,7 @@ void *minix_mmap_for(endpoint_t forwhom,
}
int minix_vfs_mmap(endpoint_t who, u32_t offset, u32_t len,
u32_t dev, u32_t ino, u16_t fd, u32_t vaddr, u16_t clearend,
dev_t dev, u32_t ino, u16_t fd, u32_t vaddr, u16_t clearend,
u16_t flags)
{
message m;

View file

@ -479,7 +479,7 @@ int block_type; /* INODE_BLOCK, DIRECTORY_BLOCK, or whatever */
printf("libminixfs: ENOSYS, disabling VM calls\n");
vmcache = 0;
} else {
panic("libminixfs: setblock of %p dev 0x%x off "
panic("libminixfs: setblock of %p dev 0x%llx off "
"0x%llx failed\n", bp->data, dev, dev_off);
}
}
@ -940,7 +940,7 @@ int lmfs_rdwt_err(void)
int lmfs_do_bpeek(message *m)
{
block_t startblock, b, limitblock;
dev_t dev = m->REQ_DEV2;
dev_t dev = m->REQ_DEV;
u64_t extra, pos = make64(m->REQ_SEEK_POS_LO, m->REQ_SEEK_POS_HI);
size_t len = m->REQ_NBYTES;
struct buf *bp;

View file

@ -41,7 +41,7 @@ int fs_flush()
* to disk.
*/
#if 0
dev_t dev = (dev_t) fs_m_in.REQ_DEV;
dev_t dev = fs_m_in.REQ_DEV;
if(dev == fs_dev) return(EBUSY);

View file

@ -161,7 +161,7 @@ int fs_mknod()
va.va_mode = (mode_t) fs_m_in.REQ_MODE;
va.va_uid = caller_uid;
va.va_gid = caller_gid;
va.va_rdev = (dev_t) fs_m_in.REQ_DEV;
va.va_rdev = fs_m_in.REQ_DEV;
va.va_atime = va.va_mtime = va.va_ctime = cur_time;
if (buildpath) {

View file

@ -23,7 +23,7 @@ int do_readsuper()
int r;
dprintf(("%s: readsuper (dev %x, flags %x)\n",
sffs_name, (dev_t) m_in.REQ_DEV, m_in.REQ_FLAGS));
sffs_name, m_in.REQ_DEV, m_in.REQ_FLAGS));
if (m_in.REQ_FLAGS & REQ_ISROOT) {
printf("%s: attempt to mount as root device\n", sffs_name);

View file

@ -9,7 +9,7 @@
#include <minix/sysutil.h>
#include <machine/vmparam.h>
int vm_cachecall(message *m, int call, void *addr, u32_t dev, u64_t dev_offset,
int vm_cachecall(message *m, int call, void *addr, dev_t dev, u64_t dev_offset,
u64_t ino, u64_t ino_offset, u32_t *flags, int blocksize)
{
if(blocksize % PAGE_SIZE)
@ -40,7 +40,7 @@ int vm_cachecall(message *m, int call, void *addr, u32_t dev, u64_t dev_offset,
return _taskcall(VM_PROC_NR, call, m);
}
void *vm_map_cacheblock(u32_t dev, u64_t dev_offset,
void *vm_map_cacheblock(dev_t dev, u64_t dev_offset,
u64_t ino, u64_t ino_offset, u32_t *flags, int blocksize)
{
message m;
@ -52,7 +52,7 @@ void *vm_map_cacheblock(u32_t dev, u64_t dev_offset,
return m.m_u.m_vmmcp_reply.addr;
}
int vm_set_cacheblock(void *block, u32_t dev, u64_t dev_offset,
int vm_set_cacheblock(void *block, dev_t dev, u64_t dev_offset,
u64_t ino, u64_t ino_offset, u32_t *flags, int blocksize)
{
message m;
@ -62,7 +62,7 @@ int vm_set_cacheblock(void *block, u32_t dev, u64_t dev_offset,
}
int
vm_clear_cache(u32_t dev)
vm_clear_cache(dev_t dev)
{
message m;

View file

@ -41,7 +41,7 @@ int fs_putnode(void)
rip = find_inode(fs_dev, (pino_t) fs_m_in.REQ_INODE_NR);
if (!rip) {
printf("%s:%d put_inode: inode #%u dev: %d not found\n", __FILE__,
printf("%s:%d put_inode: inode #%u dev: %llx not found\n", __FILE__,
__LINE__, (pino_t) fs_m_in.REQ_INODE_NR, fs_dev);
panic("fs_putnode failed");
}

View file

@ -49,7 +49,7 @@ int fs_flush()
/* Flush the blocks of a device from the cache after writing any dirty blocks
* to disk.
*/
dev_t dev = (dev_t) fs_m_in.REQ_DEV;
dev_t dev = fs_m_in.REQ_DEV;
if(dev == fs_dev) return(EBUSY);
@ -71,7 +71,7 @@ int fs_new_driver(void)
char label[sizeof(fs_dev_label)];
int r;
dev = (dev_t) fs_m_in.REQ_DEV;
dev = fs_m_in.REQ_DEV;
label_gid = (cp_grant_id_t) fs_m_in.REQ_GRANT;
label_len = (size_t) fs_m_in.REQ_PATH_LEN;

View file

@ -164,9 +164,9 @@ int fs_breadwrite(void)
(unsigned long) fs_m_in.REQ_SEEK_POS_HI);
nrbytes = (size_t) fs_m_in.REQ_NBYTES;
block_size = get_block_size( (dev_t) fs_m_in.REQ_DEV2);
block_size = get_block_size(fs_m_in.REQ_DEV);
rip.i_block[0] = (block_t) fs_m_in.REQ_DEV2;
rip.i_block[0] = (block_t) fs_m_in.REQ_DEV;
rip.i_mode = I_BLOCK_SPECIAL;
rip.i_size = 0;

View file

@ -43,7 +43,7 @@ static int stat_inode(
statbuf.st_nlink = rip->i_links_count;
statbuf.st_uid = rip->i_uid;
statbuf.st_gid = rip->i_gid;
statbuf.st_rdev = (s ? rip->i_block[0] : NO_DEV);
statbuf.st_rdev = (s ? (dev_t)rip->i_block[0] : NO_DEV);
statbuf.st_size = rip->i_size;
statbuf.st_atime = rip->i_atime;
statbuf.st_mtime = rip->i_mtime;

View file

@ -26,7 +26,7 @@ int fs_new_driver(void)
char label[sizeof(fs_dev_label)];
int r;
dev = (dev_t) fs_m_in.REQ_DEV;
dev = fs_m_in.REQ_DEV;
label_gid = (cp_grant_id_t) fs_m_in.REQ_GRANT;
label_len = (size_t) fs_m_in.REQ_PATH_LEN;

View file

@ -56,11 +56,11 @@ static void check_mknod(const char *device, mode_t mode, int minor)
{
dev_t dev;
dev= (ip_dev & 0xFF00) | minor;
dev= makedev(major(ip_dev), minor);
unlink(device);
if (mknod(device, S_IFCHR | mode, dev) < 0) fatal(device);
printf("mknod %s c %d %d\n", device, (ip_dev >> 8), minor);
printf("mknod %s c %d %d\n", device, major(ip_dev), minor);
}
static int cfg_fd;

View file

@ -45,7 +45,7 @@ int fs_putnode(void)
rip = find_inode(fs_dev, (pino_t) fs_m_in.REQ_INODE_NR);
if(!rip) {
printf("%s:%d put_inode: inode #%u dev: %d not found\n", __FILE__,
printf("%s:%d put_inode: inode #%u dev: %llx not found\n", __FILE__,
__LINE__, (pino_t) fs_m_in.REQ_INODE_NR, fs_dev);
panic("fs_putnode failed");
}

View file

@ -38,7 +38,7 @@ int fs_flush()
/* Flush the blocks of a device from the cache after writing any dirty blocks
* to disk.
*/
dev_t dev = (dev_t) fs_m_in.REQ_DEV;
dev_t dev = fs_m_in.REQ_DEV;
if(dev == fs_dev) return(EBUSY);
lmfs_flushall();
@ -60,7 +60,7 @@ int fs_new_driver(void)
char label[sizeof(fs_dev_label)];
int r;
dev = (dev_t) fs_m_in.REQ_DEV;
dev = fs_m_in.REQ_DEV;
label_gid = (cp_grant_id_t) fs_m_in.REQ_GRANT;
label_len = (size_t) fs_m_in.REQ_PATH_LEN;

View file

@ -24,7 +24,7 @@ int fs_readsuper()
int r;
int readonly, isroot;
fs_dev = (dev_t) fs_m_in.REQ_DEV;
fs_dev = fs_m_in.REQ_DEV;
label_gid = (cp_grant_id_t) fs_m_in.REQ_GRANT;
label_len = (size_t) fs_m_in.REQ_PATH_LEN;
readonly = (fs_m_in.REQ_FLAGS & REQ_RDONLY) ? 1 : 0;
@ -76,7 +76,7 @@ int fs_readsuper()
panic("couldn't bdev_open after found unclean FS");
return(EINVAL);
}
printf("MFS: WARNING: FS 0x%x unclean, mounting readonly\n", fs_dev);
printf("MFS: WARNING: FS 0x%llx unclean, mounting readonly\n", fs_dev);
}
lmfs_set_blocksize(superblock.s_block_size, major(fs_dev));

View file

@ -160,7 +160,7 @@ int fs_breadwrite(void)
r = OK;
target_dev = (dev_t) fs_m_in.REQ_DEV2;
target_dev = fs_m_in.REQ_DEV;
/* Get the values from the request message */
rw_flag = (fs_m_in.m_type == REQ_BREAD ? READING : WRITING);

View file

@ -70,7 +70,7 @@ static int stat_inode(
statbuf.st_nlink = (nlink_t) rip->i_nlinks;
statbuf.st_uid = rip->i_uid;
statbuf.st_gid = rip->i_gid;
statbuf.st_rdev = (s ? (dev_t) rip->i_zone[0] : NO_DEV);
statbuf.st_rdev = (s ? (dev_t)rip->i_zone[0] : NO_DEV);
statbuf.st_size = rip->i_size;
statbuf.st_atime = rip->i_atime;
statbuf.st_mtime = rip->i_mtime;

View file

@ -38,8 +38,8 @@ int fs_putnode(message *fs_m_in, message *fs_m_out)
rip = find_inode( (pino_t) fs_m_in->REQ_INODE_NR);
if(!rip) {
printf("%s:%d put_inode: inode #%ld dev: %d not found\n", __FILE__,
__LINE__, fs_m_in->REQ_INODE_NR, (dev_t) fs_m_in->REQ_DEV);
printf("%s:%d put_inode: inode #%ld dev: %llx not found\n", __FILE__,
__LINE__, fs_m_in->REQ_INODE_NR, fs_m_in->REQ_DEV);
panic("fs_putnode failed");
}

View file

@ -20,7 +20,7 @@ int fs_newnode(message *fs_m_in, message *fs_m_out)
uid = (uid_t) fs_m_in->REQ_UID;
gid = (gid_t) fs_m_in->REQ_GID;
bits = (pmode_t) fs_m_in->REQ_MODE;
dev = (dev_t) fs_m_in->REQ_DEV;
dev = fs_m_in->REQ_DEV;
/* Try to allocate the inode */
if( (rip = alloc_inode(dev, bits, uid, gid) ) == NULL) return(err_code);

View file

@ -37,7 +37,7 @@ static int stat_inode(
statbuf.st_nlink = rip->i_nlinks;
statbuf.st_uid = rip->i_uid;
statbuf.st_gid = (short int) rip->i_gid;
statbuf.st_rdev = (dev_t) (s ? rip->i_rdev : NO_DEV);
statbuf.st_rdev = (s ? rip->i_rdev : NO_DEV);
statbuf.st_size = rip->i_size;
if (!s) statbuf.st_mode &= ~I_REGULAR;/* wipe out I_REGULAR bit for pipes */
statbuf.st_atime = rip->i_atime;

View file

@ -505,7 +505,7 @@ int do_ioctl(void)
}
if (r == OK) {
dev = (dev_t) vp->v_sdev;
dev = vp->v_sdev;
if (S_ISBLK(vp->v_mode)) {
f->filp_ioctl_fp = fp;

View file

@ -58,10 +58,8 @@ void unlock_dmap(struct dmap *dp)
/*===========================================================================*
* map_driver *
*===========================================================================*/
static int map_driver(label, major, proc_nr_e)
const char label[LABEL_MAX]; /* name of the driver */
int major; /* major number of the device */
endpoint_t proc_nr_e; /* process number of the driver */
static int map_driver(const char label[LABEL_MAX], devmajor_t major,
endpoint_t proc_nr_e)
{
/* Add a new device driver mapping in the dmap table. If the proc_nr is set to
* NONE, we're supposed to unmap it.

View file

@ -361,7 +361,7 @@ struct filp *f;
if (f->filp_count - 1 == 0 && f->filp_mode != FILP_CLOSED) {
/* Check to see if the file is special. */
if (S_ISCHR(vp->v_mode) || S_ISBLK(vp->v_mode)) {
dev = (dev_t) vp->v_sdev;
dev = vp->v_sdev;
if (S_ISBLK(vp->v_mode)) {
lock_bsf();
if (vp->v_bfs_e == ROOT_FS_E) {
@ -402,7 +402,7 @@ struct filp *f;
f->filp_mode = FILP_CLOSED;
f->filp_count = 0;
} else if (f->filp_count < 0) {
panic("VFS: invalid filp count: %d ino %d/%llu", f->filp_count,
panic("VFS: invalid filp count: %d ino %llx/%llu", f->filp_count,
vp->v_dev, vp->v_inode_nr);
} else {
unlock_vnode(f->filp_vno);

View file

@ -311,7 +311,7 @@ int dupvm(struct fproc *rfp, int pfd, int *vmfd, struct filp **newfilp)
assert(f->filp_vno->v_vmnt);
if (!S_ISREG(f->filp_vno->v_mode) && !S_ISBLK(f->filp_vno->v_mode)) {
printf("VFS: mmap regular/blockdev only; dev 0x%x ino %llu has mode 0%o\n",
printf("VFS: mmap regular/blockdev only; dev 0x%llx ino %llu has mode 0%o\n",
f->filp_vno->v_dev, f->filp_vno->v_inode_nr, f->filp_vno->v_mode);
unlock_filp(f);
return EINVAL;
@ -648,7 +648,7 @@ static void free_proc(int flags)
if (rfilp->filp_mode == FILP_CLOSED) continue;
vp = rfilp->filp_vno;
if (!S_ISCHR(vp->v_mode)) continue;
if ((dev_t) vp->v_sdev != dev) continue;
if (vp->v_sdev != dev) continue;
lock_filp(rfilp, VNODE_READ);
(void) cdev_close(dev); /* Ignore any errors. */

View file

@ -178,7 +178,7 @@ char mount_label[LABEL_MAX] )
/* Get driver process' endpoint */
dp = &dmap[major(dev)];
if (dp->dmap_driver == NONE) {
printf("VFS: no driver for dev %d\n", dev);
printf("VFS: no driver for dev %llx\n", dev);
return(EINVAL);
}
@ -466,7 +466,7 @@ int unmount(
/* Find vmnt that is to be unmounted */
for (vmp_i = &vmnt[0]; vmp_i < &vmnt[NR_MNTS]; ++vmp_i) {
if (vmp_i->m_dev == dev) {
if(vmp) panic("device mounted more than once: %d", dev);
if(vmp) panic("device mounted more than once: %llx", dev);
vmp = vmp_i;
}
}
@ -565,7 +565,7 @@ void unmount_all(int force)
/* Verify we succesfully unmounted all file systems */
for (vmp = &vmnt[0]; vmp < &vmnt[NR_MNTS]; vmp++) {
if (vmp->m_dev != NO_DEV) {
panic("vmp still mounted: %s %d %d\n", vmp->m_label,
panic("vmp still mounted: %s %d %llx\n", vmp->m_label,
vmp->m_fs_e, vmp->m_dev);
}
}

View file

@ -159,7 +159,7 @@ int common_open(char path[PATH_MAX], int oflags, mode_t omode)
break;
case S_IFCHR:
/* Invoke the driver for special processing. */
dev = (dev_t) vp->v_sdev;
dev = vp->v_sdev;
/* TTY needs to know about the O_NOCTTY flag. */
r = cdev_open(dev, bits | (oflags & O_NOCTTY));
vp = filp->filp_vno; /* Might be updated by
@ -170,7 +170,7 @@ int common_open(char path[PATH_MAX], int oflags, mode_t omode)
lock_bsf();
/* Invoke the driver for special processing. */
dev = (dev_t) vp->v_sdev;
dev = vp->v_sdev;
r = bdev_open(dev, bits);
if (r != OK) {
unlock_bsf();

View file

@ -551,7 +551,7 @@ void unpause(void)
panic("process %d blocked on empty fd %d",
fp->fp_endpoint, fild);
}
dev = (dev_t) f->filp_vno->v_sdev; /* device hung on */
dev = f->filp_vno->v_sdev; /* device hung on */
status = cdev_cancel(dev);

View file

@ -167,12 +167,12 @@ int read_write(struct fproc *rfp, int rw_flag, struct filp *f,
if (vp->v_sdev == NO_DEV)
panic("VFS: read_write tries to access char dev NO_DEV");
dev = (dev_t) vp->v_sdev;
dev = vp->v_sdev;
r = cdev_io(op, dev, for_e, buf, position, size, f->filp_flags);
if (r >= 0) {
/* This should no longer happen: all calls are asynchronous. */
printf("VFS: I/O to device %x succeeded immediately!?\n", dev);
printf("VFS: I/O to device %llx succeeded immediately!?\n", dev);
cum_io = r;
position += r;
r = OK;

View file

@ -50,7 +50,7 @@ int req_breadwrite(
/* Fill in request message */
m.m_type = rw_flag == READING ? REQ_BREAD : REQ_BWRITE;
m.REQ_DEV2 = dev;
m.REQ_DEV = dev;
m.REQ_GRANT = grant_id;
m.REQ_SEEK_POS_LO = ex64lo(pos);
m.REQ_SEEK_POS_HI = ex64hi(pos);
@ -79,7 +79,7 @@ int req_bpeek(endpoint_t fs_e, dev_t dev, off_t pos, unsigned int num_of_bytes)
/* Fill in request message */
m.m_type = REQ_BPEEK;
m.REQ_DEV2 = dev;
m.REQ_DEV = dev;
m.REQ_SEEK_POS_LO = ex64lo(pos);
m.REQ_SEEK_POS_HI = ex64hi(pos);
m.REQ_NBYTES = num_of_bytes;

View file

@ -805,7 +805,7 @@ int status;
/* This should never happen. The driver may be misbehaving.
* For now we assume that the reply we want will arrive later..
*/
printf("VFS (%s:%d): expected reply from dev %d not %d\n",
printf("VFS (%s:%d): expected reply from dev %llx not %llx\n",
__FILE__, __LINE__, vp->v_sdev, dev);
return;
}

View file

@ -276,9 +276,9 @@ static int fill_statvfs(struct vmnt *vmp, endpoint_t endpt, vir_bytes buf_addr,
if (vmp->m_flags & VMNT_READONLY)
buf.f_flag |= ST_RDONLY;
buf.f_fsid = vmp->m_dev;
buf.f_fsidx.__fsid_val[0] = 0;
buf.f_fsidx.__fsid_val[1] = vmp->m_dev;
buf.f_fsid = (unsigned long)vmp->m_dev;
buf.f_fsidx.__fsid_val[0] = (long)vmp->m_dev; /* This is what is done on NetBSD */
buf.f_fsidx.__fsid_val[1] = 0; /* Here they convert the FS type name into a number. */
strlcpy(buf.f_fstypename, vmp->m_fstype, sizeof(buf.f_fstypename));
strlcpy(buf.f_mntonname, vmp->m_mount_path, sizeof(buf.f_mntonname));

View file

@ -49,7 +49,7 @@ void check_vmnt_locks()
for (vmp = &vmnt[0]; vmp < &vmnt[NR_MNTS]; vmp++)
if (is_vmnt_locked(vmp)) {
count++;
printf("vmnt %p is %s, fs_e=%d dev=%d\n", vmp, (tll_islocked(&vmp->m_lock) ? "locked":"pending locked"), vmp->m_fs_e, vmp->m_dev);
printf("vmnt %p is %s, fs_e=%d dev=%llx\n", vmp, (tll_islocked(&vmp->m_lock) ? "locked":"pending locked"), vmp->m_fs_e, vmp->m_dev);
}
if (count) panic("%d locked vmnts\n", count);

View file

@ -183,9 +183,7 @@ typedef __daddr_t daddr_t; /* disk address */
typedef int64_t daddr_t; /* disk address */
#endif
#if defined(__minix) /* LSC: Wait until bigger message to enlarge the data type. */
typedef uint32_t dev_t; /* device number */
#endif /* defined(__minix) */
typedef uint64_t dev_t; /* device number */
typedef uint32_t fixpt_t; /* fixed point number */
#ifndef gid_t

View file

@ -29,7 +29,7 @@ typedef struct {
} result_t;
static char driver_label[32] = ""; /* driver DS label */
static dev_t driver_minor = -1; /* driver's partition minor to use */
static devminor_t driver_minor = -1; /* driver's partition minor to use */
static endpoint_t driver_endpt; /* driver endpoint */
static int may_write = FALSE; /* may we write to the device? */

View file

@ -252,19 +252,19 @@ u32_t sqrt_approx(u32_t v)
return (u32_t) sqrt(v);
}
int vm_set_cacheblock(void *block, u32_t dev, u64_t dev_offset,
int vm_set_cacheblock(void *block, dev_t dev, u64_t dev_offset,
u64_t ino, u64_t ino_offset, u32_t *flags, int blocksize)
{
return ENOSYS;
}
void *vm_map_cacheblock(u32_t dev, u64_t dev_offset,
void *vm_map_cacheblock(dev_t dev, u64_t dev_offset,
u64_t ino, u64_t ino_offset, u32_t *flags, int blocksize)
{
return MAP_FAILED;
}
int vm_clear_cache(u32_t dev)
int vm_clear_cache(dev_t dev)
{
return 0;
}