summaryrefslogtreecommitdiffstats
path: root/include/linux/umsdos_fs.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1998-03-17 22:05:47 +0000
committerRalf Baechle <ralf@linux-mips.org>1998-03-17 22:05:47 +0000
commit27cfca1ec98e91261b1a5355d10a8996464b63af (patch)
tree8e895a53e372fa682b4c0a585b9377d67ed70d0e /include/linux/umsdos_fs.h
parent6a76fb7214c477ccf6582bd79c5b4ccc4f9c41b1 (diff)
Look Ma' what I found on my harddisk ...
o New faster syscalls for 2.1.x, too o Upgrade to 2.1.89. Don't try to run this. It's flaky as hell. But feel free to debug ...
Diffstat (limited to 'include/linux/umsdos_fs.h')
-rw-r--r--include/linux/umsdos_fs.h124
1 files changed, 65 insertions, 59 deletions
diff --git a/include/linux/umsdos_fs.h b/include/linux/umsdos_fs.h
index b25f0c31e..730517cef 100644
--- a/include/linux/umsdos_fs.h
+++ b/include/linux/umsdos_fs.h
@@ -4,6 +4,8 @@
#define UMSDOS_VERSION 0
#define UMSDOS_RELEASE 4
+#define UMSDOS_ROOT_INO 1
+
/* This is the file acting as a directory extension */
#define UMSDOS_EMD_FILE "--linux-.---"
#define UMSDOS_EMD_NAMELEN 12
@@ -20,32 +22,34 @@
#include <linux/ioctl.h>
#endif
+
struct umsdos_fake_info {
- char fname[13];
- int len;
+ char fname[13];
+ int len;
};
#define UMSDOS_MAXNAME 220
/* This structure is 256 bytes large, depending on the name, only part */
/* of it is written to disk */
+/* nice though it would be, I can't change this and preserve backward compatibility */
struct umsdos_dirent {
- unsigned char name_len; /* if == 0, then this entry is not used */
- unsigned char flags; /* UMSDOS_xxxx */
- unsigned short nlink; /* How many hard links point to this entry */
- uid_t uid; /* Owner user id */
- gid_t gid; /* Group id */
- time_t atime; /* Access time */
- time_t mtime; /* Last modification time */
- time_t ctime; /* Creation time */
- dev_t rdev; /* major and minor number of a device */
- /* special file */
- umode_t mode; /* Standard UNIX permissions bits + type of */
- char spare[12]; /* unused bytes for future extensions */
- /* file, see linux/stat.h */
- char name[UMSDOS_MAXNAME]; /* Not '\0' terminated */
- /* but '\0' padded, so it will allow */
- /* for adding news fields in this record */
- /* by reducing the size of name[] */
+ unsigned char name_len; /* if == 0, then this entry is not used */
+ unsigned char flags; /* UMSDOS_xxxx */
+ unsigned short nlink; /* How many hard links point to this entry */
+ uid_t uid; /* Owner user id */
+ gid_t gid; /* Group id */
+ time_t atime; /* Access time */
+ time_t mtime; /* Last modification time */
+ time_t ctime; /* Creation time */
+ dev_t rdev; /* major and minor number of a device */
+ /* special file */
+ umode_t mode; /* Standard UNIX permissions bits + type of */
+ char spare[12]; /* unused bytes for future extensions */
+ /* file, see linux/stat.h */
+ char name[UMSDOS_MAXNAME]; /* Not '\0' terminated */
+ /* but '\0' padded, so it will allow */
+ /* for adding news fields in this record */
+ /* by reducing the size of name[] */
};
#define UMSDOS_HIDDEN 1 /* Never show this entry in directory search */
#define UMSDOS_HLINK 2 /* It is a (pseudo) hard link */
@@ -58,15 +62,16 @@ struct umsdos_dirent {
#define UMSDOS_REC_SIZE 64
/* Translation between MSDOS name and UMSDOS name */
+
struct umsdos_info{
- int msdos_reject; /* Tell if the file name is invalid for MSDOS */
- /* See umsdos_parse */
- struct umsdos_fake_info fake;
- struct umsdos_dirent entry;
- off_t f_pos; /* offset of the entry in the EMD file */
- /* or offset where the entry may be store */
- /* if it is a new entry */
- int recsize; /* Record size needed to store entry */
+ int msdos_reject; /* Tell if the file name is invalid for MSDOS */
+ /* See umsdos_parse */
+ struct umsdos_fake_info fake;
+ struct umsdos_dirent entry;
+ off_t f_pos; /* offset of the entry in the EMD file */
+ /* or offset where the entry may be store */
+ /* if it is a new entry */
+ int recsize; /* Record size needed to store entry */
};
/* Definitions for ioctl (number randomly chosen) */
@@ -88,38 +93,39 @@ struct umsdos_info{
#define UMSDOS_RENAME_DOS _IO(0x04,220) /* rename a file/directory in the DOS */
/* directory only */
struct umsdos_ioctl{
- struct dirent dos_dirent;
- struct umsdos_dirent umsdos_dirent;
- /* The following structure is used to exchange some data */
- /* with utilities (umsdos_progs/util/umsdosio.c). The first */
- /* releases were using struct stat from "sys/stat.h". This was */
- /* causing some problem for cross compilation of the kernel */
- /* Since I am not really using the structure stat, but only some field */
- /* of it, I have decided to replicate the structure here */
- /* for compatibility with the binaries out there */
- struct {
- dev_t st_dev;
- unsigned short __pad1;
- ino_t st_ino;
- umode_t st_mode;
- nlink_t st_nlink;
- uid_t st_uid;
- gid_t st_gid;
- dev_t st_rdev;
- unsigned short __pad2;
- off_t st_size;
- unsigned long st_blksize;
- unsigned long st_blocks;
- time_t st_atime;
- unsigned long __unused1;
- time_t st_mtime;
- unsigned long __unused2;
- time_t st_ctime;
- unsigned long __unused3;
- unsigned long __unused4;
- unsigned long __unused5;
- }stat;
- char version,release;
+ struct dirent dos_dirent;
+ struct umsdos_dirent umsdos_dirent;
+ /* The following structure is used to exchange some data */
+ /* with utilities (umsdos_progs/util/umsdosio.c). The first */
+ /* releases were using struct stat from "sys/stat.h". This was */
+ /* causing some problem for cross compilation of the kernel */
+ /* Since I am not really using the structure stat, but only some field */
+ /* of it, I have decided to replicate the structure here */
+ /* for compatibility with the binaries out there */
+ /* FIXME PTW 1998, this has probably changed */
+ struct {
+ dev_t st_dev;
+ unsigned short __pad1;
+ ino_t st_ino;
+ umode_t st_mode;
+ nlink_t st_nlink;
+ uid_t st_uid;
+ gid_t st_gid;
+ dev_t st_rdev;
+ unsigned short __pad2;
+ off_t st_size;
+ unsigned long st_blksize;
+ unsigned long st_blocks;
+ time_t st_atime;
+ unsigned long __unused1;
+ time_t st_mtime;
+ unsigned long __unused2;
+ time_t st_ctime;
+ unsigned long __unused3;
+ unsigned long __unused4;
+ unsigned long __unused5;
+ }stat;
+ char version,release;
};
/* Different macros to access struct umsdos_dirent */