increase system-wide filename limit to 255

. move mfs-specific struct, constants to mfs/, so
	  mfs-specific, on-disk format structs and consts are
	  fully isolated from generic structs and functions
	. removes de and readfs utils
This commit is contained in:
Ben Gras
2011-08-17 16:00:01 +00:00
parent e2bdf44720
commit f984dbba70
48 changed files with 125 additions and 5451 deletions
+2 -4
View File
@@ -53,8 +53,6 @@
*/
#endif
#include <minix/dir.h>
/* Minimum sizes required by the POSIX P1003.1 standard (Table 2-3). */
#ifdef _POSIX_SOURCE /* these are only visible for POSIX */
#define _POSIX_ARG_MAX 4096 /* exec() may have 4K worth of args */
@@ -62,7 +60,7 @@
#define _POSIX_LINK_MAX 8 /* a file may have 8 links */
#define _POSIX_MAX_CANON 255 /* size of the canonical input queue */
#define _POSIX_MAX_INPUT 255 /* you can type 255 chars ahead */
#define _POSIX_NAME_MAX DIRSIZ /* max. file name length */
#define _POSIX_NAME_MAX NAME_MAX /* max. file name length */
#define _POSIX_NGROUPS_MAX 8 /* max. number of supplemental groups */
/* a process may have this many files open */
@@ -100,7 +98,7 @@
#endif
#define MAX_CANON 255 /* size of the canonical input queue */
#define MAX_INPUT 255 /* size of the type-ahead buffer */
#define NAME_MAX DIRSIZ /* # chars in a file name */
#define NAME_MAX 255 /* system-wide filename limit (up to fs) */
#define PATH_MAX __MINIX_PATH_MAX /* # chars in a path name */
#define PIPE_BUF 32768 /* # bytes in atomic write to a pipe */
#define STREAM_MAX 20 /* must be the same as FOPEN_MAX in stdio.h */
-23
View File
@@ -15,28 +15,9 @@
#include <minix/types.h>
#endif
#include <minix/dir.h>
/* _fl_direct is a flexible directory entry. Actually it's a union of 8
* characters and the 3 fields defined below.
*/
/* Flexible directory entry: */
struct _fl_direct { /* First slot in an entry */
ino_t d_ino;
unsigned char d_extent;
char d_name[3]; /* two characters for the shortest name */
};
/* Name of length len needs _EXTENT(len) extra slots. */
#define _EXTENT(len) (((len) + 5) >> 3)
/* Version 7 directory entry: */
struct _v7_direct {
ino_t d_ino;
char d_name[DIRSIZ];
};
/* The block size must be at least 1024 bytes, because otherwise
* the superblock (at 1024 bytes) overlaps with other filesystem data.
*/
@@ -52,10 +33,6 @@ struct _v7_direct {
/* This is the block size for the fixed versions of the filesystem (V1/V2) */
#define _STATIC_BLOCK_SIZE 1024
#define _STATIC_FLEX_PER_BLOCK (_STATIC_BLOCK_SIZE/sizeof(struct _fl_direct))
#define _FLEX_PER_V7 (_EXTENT(DIRSIZ) + 1)
#define _FLEX_PER_BLOCK (_STATIC_BLOCK_SIZE/sizeof(struct _fl_direct))
/* Definitions for the directory(3) routines: */
typedef struct {
int _fd; /* Filedescriptor of open directory */
+2 -2
View File
@@ -12,6 +12,7 @@
#ifndef _MINIX_ANSI_H
#include <minix/ansi.h>
#endif
#include <minix/types.h>
#include <sys/null.h> /* For NULL */
@@ -56,8 +57,7 @@ typedef struct __iobuf {
#define FOPEN_MAX 20
#include <minix/dir.h>
#define FILENAME_MAX DIRSIZ
#define FILENAME_MAX NAME_MAX
#define TMP_MAX 999
#define L_tmpnam (sizeof("/tmp/") + FILENAME_MAX)
+1 -1
View File
@@ -2,7 +2,7 @@
INCSDIR= /usr/include.ack/sys
INCS= asynchio.h dir.h file.h \
INCS= asynchio.h file.h \
ioctl.h ipc.h jmp_buf.h kbdio.h mman.h \
mount.h mtio.h param.h ptrace.h queue.h resource.h \
select.h sem.h shm.h sigcontext.h signal.h socket.h \
-11
View File
@@ -1,11 +0,0 @@
/*
* this files resolves conflicts between the file of the host system and
* the minix specific one. This file is included directly only on Minix
* and it is an error to do so on any other system
*/
#if !defined(_MINIX) && !defined(__minix) && !defined(__ACK__)
#error "Including Minix specific file in program targeted for other system"
#else
#include <minix/dir.h>
#endif