1
0
Files
irix-657m-src/eoe/cmd/efs/lib/efs_mount.c
2022-09-29 17:59:04 +03:00

20 lines
383 B
C

#ident "$Revision: 1.4 $"
/*
* "Mount" the efs filesystem - read in the superblock and initialize it.
*/
#include "efs.h"
int
efs_mount(void)
{
lseek(fs_fd, (long) EFS_SUPERBOFF, SEEK_SET);
if (read(fs_fd, (char *) fs, BBTOB(BTOBB(sizeof(*fs)))) !=
BBTOB(BTOBB(sizeof(*fs))))
error();
if (!IS_EFS_MAGIC(fs->fs_magic))
return (-1);
EFS_SETUP_SUPERB(fs);
return (0);
}