File:  [Early Linux] / linux / fs / file_table.c
Revision 1.1.1.3 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 18:12:08 2018 UTC (8 years, 3 months ago) by root
Branches: linus, MAIN
CVS tags: linux098, linux097, HEAD
linux 0.97

/*
 *  linux/fs/file_table.c
 *
 *  Copyright (C) 1991, 1992  Linus Torvalds
 */

#include <linux/fs.h>
#include <linux/string.h>

struct file file_table[NR_FILE];

struct file * get_empty_filp(void)
{
	int i;
	struct file * f = file_table+0;

	for (i = 0; i++ < NR_FILE; f++)
		if (!f->f_count) {
			memset(f,0,sizeof(*f));
			f->f_count = 1;
			return f;
		}
	return NULL;
}

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.