XINU
lfibclear.c
Go to the documentation of this file.
1 /* lfibclear.c - lfibclear */
2 
3 #include <xinu.h>
4 
5 /*------------------------------------------------------------------------
6  * lfibclear -- Clear an in-core copy of an index block
7  *------------------------------------------------------------------------
8  */
9 void lfibclear(
10  struct lfiblk *ibptr, /* Address of i-block in memory */
11  int32 offset /* File offset for this i-block */
12  )
13 {
14  int32 i; /* Index for data block array */
15 
16  ibptr->ib_offset = offset; /* Assign specified file offset */
17  for (i=0 ; i<LF_IBLEN ; i++) { /* Clear each data block pointer*/
18  ibptr->ib_dba[i] = LF_DNULL;
19  }
20  ibptr->ib_next = LF_INULL; /* Set next ptr to null */
21  return;
22 }
全てのシステムヘッダファイルをインクルードする。
#define LF_IBLEN
Definition: lfilesys.h:57
#define LF_INULL
Definition: lfilesys.h:55
ibid32 ib_next
Definition: lfilesys.h:72
int int32
符号あり32ビット整数(int)
Definition: kernel.h:11
#define LF_DNULL
Definition: lfilesys.h:56
uint32 ib_offset
Definition: lfilesys.h:73
dbid32 ib_dba[LF_IBLEN]
Definition: lfilesys.h:75
void lfibclear(struct lfiblk *ibptr, int32 offset)
Definition: lfibclear.c:9