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-04 23:15:16 +00:00
parent e2bdf44720
commit f984dbba70
48 changed files with 125 additions and 5451 deletions

View File

@@ -1515,7 +1515,7 @@ static void ls(char *dir)
{
ino_t ino;
struct stat st;
char name[NAME_MAX+1];
char name[MFS_DIRSIZ+1];
if (fsok == -1) fsok= r_super(&block_size) != 0;
if (!fsok) return;

View File

@@ -1003,7 +1003,7 @@ ino_t latest_version(char *version, struct stat *stp)
* the way up. (One can't use r_stat while reading a directory.)
*/
{
char name[NAME_MAX + 1];
char name[MFS_DIRSIZ + 1];
ino_t ino, newest;
time_t mtime;
@@ -1032,7 +1032,7 @@ char *select_image(char *image)
ino_t image_ino;
struct stat st;
image= strcpy(malloc((strlen(image) + 1 + NAME_MAX + 1)
image= strcpy(malloc((strlen(image) + 1 + MFS_DIRSIZ + 1)
* sizeof(char)), image);
fsok= r_super(&block_size) != 0;
@@ -1059,7 +1059,7 @@ char *select_image(char *image)
if (!S_ISREG(st.st_mode)) {
char *version= image + strlen(image);
char dots[NAME_MAX + 1];
char dots[MFS_DIRSIZ + 1];
if (!S_ISDIR(st.st_mode)) {
printf("%s: %s\n", image, unix_err(ENOTDIR));