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

25 lines
542 B
C

#ident "$Revision: 1.3 $"
/*
* Update the superblock to the efs disk. Recompute the checksum and
* update the time stamp.
*/
#include "efs.h"
void
efs_update(void)
{
time((time_t *)&fs->fs_time);
efs_checksum();
lseek(fs_fd, (long) EFS_SUPERBOFF, SEEK_SET);
if (write(fs_fd, (char *) fs, BBTOB(BTOBB(sizeof(*fs)))) !=
BBTOB(BTOBB(sizeof(*fs))))
error();
if (bitmap) {
lseek(fs_fd, (long) EFS_BITMAPBOFF, SEEK_SET);
if (write(fs_fd, bitmap, BBTOB(BTOBB(fs->fs_bmsize))) !=
BBTOB(BTOBB(fs->fs_bmsize)))
error();
}
}