|
|
1.1.1.2 root 1: /*
2: * linux/fs/file_table.c
3: *
1.1.1.3 ! root 4: * Copyright (C) 1991, 1992 Linus Torvalds
1.1.1.2 root 5: */
6:
1.1 root 7: #include <linux/fs.h>
1.1.1.3 ! root 8: #include <linux/string.h>
1.1 root 9:
10: struct file file_table[NR_FILE];
1.1.1.3 ! root 11:
! 12: struct file * get_empty_filp(void)
! 13: {
! 14: int i;
! 15: struct file * f = file_table+0;
! 16:
! 17: for (i = 0; i++ < NR_FILE; f++)
! 18: if (!f->f_count) {
! 19: memset(f,0,sizeof(*f));
! 20: f->f_count = 1;
! 21: return f;
! 22: }
! 23: return NULL;
! 24: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.