mfs: remove legacy stat code
This commit is contained in:
parent
c8c9565a03
commit
075f839810
@ -8,25 +8,6 @@
|
|||||||
#include "super.h"
|
#include "super.h"
|
||||||
#include <minix/vfsif.h>
|
#include <minix/vfsif.h>
|
||||||
|
|
||||||
PRIVATE int copy_new_to_old_stat(endpoint_t who_e,
|
|
||||||
cp_grant_id_t gid, struct stat *st)
|
|
||||||
{
|
|
||||||
struct minix_prev_stat prevst;
|
|
||||||
|
|
||||||
memset(&prevst, 0, sizeof(prevst));
|
|
||||||
|
|
||||||
prevst.st_dev = st->st_dev;
|
|
||||||
prevst.st_ino = st->st_ino;
|
|
||||||
prevst.st_mode = st->st_mode;
|
|
||||||
prevst.st_uid = (short) st->st_uid;
|
|
||||||
prevst.st_gid = (short) st->st_gid;
|
|
||||||
prevst.st_size = st->st_size;
|
|
||||||
prevst.st_rdev = st->st_rdev;
|
|
||||||
|
|
||||||
return sys_safecopyto(who_e, gid, (vir_bytes) 0, (vir_bytes) &prevst,
|
|
||||||
(size_t) sizeof(prevst), D);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*===========================================================================*
|
/*===========================================================================*
|
||||||
* stat_inode *
|
* stat_inode *
|
||||||
*===========================================================================*/
|
*===========================================================================*/
|
||||||
@ -76,13 +57,6 @@ PRIVATE int stat_inode(
|
|||||||
r = sys_safecopyto(who_e, gid, (vir_bytes) 0, (vir_bytes) &statbuf,
|
r = sys_safecopyto(who_e, gid, (vir_bytes) 0, (vir_bytes) &statbuf,
|
||||||
(size_t) sizeof(statbuf), D);
|
(size_t) sizeof(statbuf), D);
|
||||||
|
|
||||||
/* Fallback for older VFS (old stat) */
|
|
||||||
if(r != OK) {
|
|
||||||
r = copy_new_to_old_stat(who_e, gid, &statbuf);
|
|
||||||
if(r == OK) printf("MFS: old vfs stat fallback ok\n");
|
|
||||||
else printf("MFS: old vfs stat fallback failed\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
return(r);
|
return(r);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user