summaryrefslogtreecommitdiff
path: root/mkminix-0.1
diff options
context:
space:
mode:
Diffstat (limited to 'mkminix-0.1')
-rw-r--r--mkminix-0.1/README47
-rw-r--r--mkminix-0.1/linux/minix_fs.h135
-rw-r--r--mkminix-0.1/mkmin-dj.h43
-rw-r--r--mkminix-0.1/mkminix.diff46
4 files changed, 0 insertions, 271 deletions
diff --git a/mkminix-0.1/README b/mkminix-0.1/README
deleted file mode 100644
index d93c38e9..00000000
--- a/mkminix-0.1/README
+++ /dev/null
@@ -1,47 +0,0 @@
-Mkminix-0.1 by W. Black
-
-Description
------------
-This directory contains a hacked version of mkfs.minix from util-linux 2.8.
-The hack in question was primarily a bit of #ifndef-ing to make it compile
-successfully under DJGPP. Due to DOS's brain-damaged 8.3 filename limitation,
-the executable has been renamed from mkfs.minix to mkminix.exe.
-[Executable deleted in the util-linux distribution.]
-
-Distribution
-------------
-This distribution should have come with both sources and executable. If
-you're missing either, feel free to visit my site at
-http://www.geocities.com/SiliconValley/Network/5508 to get a fresh one if
-you need it.
-
-This program and its source program in util-linux are protected by the GNU
-General Public License. See the file COPYING for details.
-
-Why
----
-Exactly why would anyone want to create a Minix filesystem under DOS? The
-answer, as far as I am concerned, is in the interest of creating initial
-ramdisks for Linux. By being able to configure an initrd from DOS (or Win
-'95, etc.), you can make the transition to Linux that much easier (think
-Win '95 autoplay Linux distributions, for example).
-
-Phase II of this project would logically be to be able to populate this initrd
-with files. That is my goal for mkminix-0.2.
-
-Installation
-------------
-At this point, everything is pretty much already installed. Just run MKMINIX
-from the DOS prompt. The source will compile under DJGPP if and only if you
-have a copy of linux/minix_fs.h. I included the one from Linux kernel 2.0.30,
-but these files have a way of changing in annoying ways, so it's probably best
-to use one that matches whatever version of Linux you are going to be running
-concurrently. This is if you have to be ABSOLUTELY sure that everything
-matches... BTW, compile line is as follows for DJGPP:
-
- gcc -o mkminix.exe mkminix.c
-
-Desperate Plea for Attention
-----------------------------
-If you find this program useful (or silly, or a complete waste of time), please
-drop me a line at wjblack@yahoo.com. Thanks!
diff --git a/mkminix-0.1/linux/minix_fs.h b/mkminix-0.1/linux/minix_fs.h
deleted file mode 100644
index 3bc020fc..00000000
--- a/mkminix-0.1/linux/minix_fs.h
+++ /dev/null
@@ -1,135 +0,0 @@
-#ifndef _LINUX_MINIX_FS_H
-#define _LINUX_MINIX_FS_H
-
-/*
- * The minix filesystem constants/structures
- */
-
-/*
- * Thanks to Kees J Bot for sending me the definitions of the new
- * minix filesystem (aka V2) with bigger inodes and 32-bit block
- * pointers.
- */
-
-#define MINIX_ROOT_INO 1
-
-/* Not the same as the bogus LINK_MAX in <linux/limits.h>. Oh well. */
-#define MINIX_LINK_MAX 250
-
-#define MINIX_I_MAP_SLOTS 8
-#define MINIX_Z_MAP_SLOTS 64
-#define MINIX_SUPER_MAGIC 0x137F /* original minix fs */
-#define MINIX_SUPER_MAGIC2 0x138F /* minix fs, 30 char names */
-#define MINIX2_SUPER_MAGIC 0x2468 /* minix V2 fs */
-#define MINIX2_SUPER_MAGIC2 0x2478 /* minix V2 fs, 30 char names */
-#define MINIX_VALID_FS 0x0001 /* Clean fs. */
-#define MINIX_ERROR_FS 0x0002 /* fs has errors. */
-
-#define MINIX_INODES_PER_BLOCK ((BLOCK_SIZE)/(sizeof (struct minix_inode)))
-#define MINIX2_INODES_PER_BLOCK ((BLOCK_SIZE)/(sizeof (struct minix2_inode)))
-
-#define MINIX_V1 0x0001 /* original minix fs */
-#define MINIX_V2 0x0002 /* minix V2 fs */
-
-#define INODE_VERSION(inode) inode->i_sb->u.minix_sb.s_version
-
-/*
- * This is the original minix inode layout on disk.
- * Note the 8-bit gid and atime and ctime.
- */
-struct minix_inode {
- __u16 i_mode;
- __u16 i_uid;
- __u32 i_size;
- __u32 i_time;
- __u8 i_gid;
- __u8 i_nlinks;
- __u16 i_zone[9];
-};
-
-/*
- * The new minix inode has all the time entries, as well as
- * long block numbers and a third indirect block (7+1+1+1
- * instead of 7+1+1). Also, some previously 8-bit values are
- * now 16-bit. The inode is now 64 bytes instead of 32.
- */
-struct minix2_inode {
- __u16 i_mode;
- __u16 i_nlinks;
- __u16 i_uid;
- __u16 i_gid;
- __u32 i_size;
- __u32 i_atime;
- __u32 i_mtime;
- __u32 i_ctime;
- __u32 i_zone[10];
-};
-
-/*
- * minix super-block data on disk
- */
-struct minix_super_block {
- __u16 s_ninodes;
- __u16 s_nzones;
- __u16 s_imap_blocks;
- __u16 s_zmap_blocks;
- __u16 s_firstdatazone;
- __u16 s_log_zone_size;
- __u32 s_max_size;
- __u16 s_magic;
- __u16 s_state;
- __u32 s_zones;
-};
-
-struct minix_dir_entry {
- __u16 inode;
- char name[0];
-};
-
-#ifdef __KERNEL__
-
-extern int minix_lookup(struct inode * dir,const char * name, int len,
- struct inode ** result);
-extern int minix_create(struct inode * dir,const char * name, int len, int mode,
- struct inode ** result);
-extern int minix_mkdir(struct inode * dir, const char * name, int len, int mode);
-extern int minix_rmdir(struct inode * dir, const char * name, int len);
-extern int minix_unlink(struct inode * dir, const char * name, int len);
-extern int minix_symlink(struct inode * inode, const char * name, int len,
- const char * symname);
-extern int minix_link(struct inode * oldinode, struct inode * dir, const char * name, int len);
-extern int minix_mknod(struct inode * dir, const char * name, int len, int mode, int rdev);
-extern int minix_rename(struct inode * old_dir, const char * old_name, int old_len,
- struct inode * new_dir, const char * new_name, int new_len, int must_be_dir);
-extern struct inode * minix_new_inode(const struct inode * dir);
-extern void minix_free_inode(struct inode * inode);
-extern unsigned long minix_count_free_inodes(struct super_block *sb);
-extern int minix_new_block(struct super_block * sb);
-extern void minix_free_block(struct super_block * sb, int block);
-extern unsigned long minix_count_free_blocks(struct super_block *sb);
-
-extern int minix_bmap(struct inode *,int);
-
-extern struct buffer_head * minix_getblk(struct inode *, int, int);
-extern struct buffer_head * minix_bread(struct inode *, int, int);
-
-extern void minix_truncate(struct inode *);
-extern void minix_put_super(struct super_block *);
-extern struct super_block *minix_read_super(struct super_block *,void *,int);
-extern int init_minix_fs(void);
-extern void minix_write_super(struct super_block *);
-extern int minix_remount (struct super_block * sb, int * flags, char * data);
-extern void minix_read_inode(struct inode *);
-extern void minix_write_inode(struct inode *);
-extern void minix_put_inode(struct inode *);
-extern void minix_statfs(struct super_block *, struct statfs *, int);
-extern int minix_sync_inode(struct inode *);
-extern int minix_sync_file(struct inode *, struct file *);
-
-extern struct inode_operations minix_file_inode_operations;
-extern struct inode_operations minix_dir_inode_operations;
-extern struct inode_operations minix_symlink_inode_operations;
-
-#endif /* __KERNEL__ */
-
-#endif
diff --git a/mkminix-0.1/mkmin-dj.h b/mkminix-0.1/mkmin-dj.h
deleted file mode 100644
index 1ed7b216..00000000
--- a/mkminix-0.1/mkmin-dj.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* Stolen from linux/fs.h */
-#define BLOCK_SIZE 1024
-
-/* Ugh */
-typedef unsigned char __u8;
-typedef unsigned short __u16;
-typedef unsigned int __u32;
-
-/* Stolen from linux/stat.h, since DJGPP's stat.h produces different values */
-#define S_IFMT 00170000
-#define S_IFSOCK 0140000
-#define S_IFLNK 0120000
-#define S_IFREG 0100000
-#define S_IFBLK 0060000
-#define S_IFDIR 0040000
-#define S_IFCHR 0020000
-#define S_IFIFO 0010000
-#define S_ISUID 0004000
-#define S_ISGID 0002000
-#define S_ISVTX 0001000
-
-#define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
-#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
-#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
-#define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
-#define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
-#define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
-#define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
-
-#define S_IRWXU 00700
-#define S_IRUSR 00400
-#define S_IWUSR 00200
-#define S_IXUSR 00100
-
-#define S_IRWXG 00070
-#define S_IRGRP 00040
-#define S_IWGRP 00020
-#define S_IXGRP 00010
-
-#define S_IRWXO 00007
-#define S_IROTH 00004
-#define S_IWOTH 00002
-#define S_IXOTH 00001
diff --git a/mkminix-0.1/mkminix.diff b/mkminix-0.1/mkminix.diff
deleted file mode 100644
index 45d6c819..00000000
--- a/mkminix-0.1/mkminix.diff
+++ /dev/null
@@ -1,46 +0,0 @@
-48a49,51
-> * 09.29.98 - Modified to compile under DJGPP (minus mount-checking, etc.).
-> * (wjblack@yahoo.com)
-> *
-69a73,78
->
-> /* DJGPP's IOCTL interface should probably not be trusted here. It's not
-> needed, anyway. Nor does DJGPP have any clue about mounted filesystems.
-> Oh, did I mention that the directory status, etc, doesn't match that of
-> the Minix FS? */
-> #ifndef __DJGPP__
-74a84,91
-> #endif
->
-> /* For those defs that DJGPP doesn't have (or has wrong) */
-> #ifdef __DJGPP__
-> #include "mkmin-dj.h"
-> #endif
->
-> /* DJGPP requires that you stick a linux/minix_fs.h somewhere appropriate */
-172a190
-> #ifndef __DJGPP__
-173a192,194
-> #else
-> #define usage() fatal_error("Usage: %s [-c | -l filename] [-nXX] [-iXX] imagefile [blocks]\n",16)
-> #endif
-175a197
-> #ifndef __DJGPP__
-196a219
-> #endif /* __DJGPP__ */
-238a262
-> #ifndef __DJGPP__
-242a267
-> #endif
-613a639
-> #ifndef __DJGPP__
-614a641
-> #endif
-694a722
-> #ifndef __DJGPP__
-695a724
-> #endif
-707a737
-> #ifndef __DJGPP__
-713a744
-> #endif