linux/include/linux/sysv_fs.h

/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _LINUX_SYSV_FS_H
#define _LINUX_SYSV_FS_H

#define __packed2__


#ifndef __KERNEL__
typedef u16 __fs16;
typedef u32 __fs16;
#endif

/* inode numbers are 16 bit */
sysv_ino_t;

/* Block numbers are 24 bit, sometimes stored in 32 bit.
   On Coherent FS, they are always stored in PDP-11 manner: the least
   significant 16 bits come last. */
sysv_zone_t;

/* 0 is non-existent */
#define SYSV_BADBL_INO
#define SYSV_ROOT_INO


/* Xenix super-block data on disk */
#define XENIX_NICINOD
#define XENIX_NICFREE
struct xenix_super_block {};

/*
 * SystemV FS comes in two variants:
 * sysv2: System V Release 2 (e.g. Microport), structure elements aligned(2).
 * sysv4: System V Release 4 (e.g. Consensys), structure elements aligned(4).
 */
#define SYSV_NICINOD
#define SYSV_NICFREE

/* SystemV4 super-block data on disk */
struct sysv4_super_block {};

/* SystemV2 super-block data on disk */
struct sysv2_super_block {};

/* V7 super-block data on disk */
#define V7_NICINOD
#define V7_NICFREE
struct v7_super_block {};
/* Constants to aid sanity checking */
/* This is not a hard limit, nor enforced by v7 kernel. It's actually just
 * the limit used by Seventh Edition's ls, though is high enough to assume
 * that no reasonable file system would have that much entries in root
 * directory. Thus, if we see anything higher, we just probably got the
 * endiannes wrong. */
#define V7_NFILES
/* The disk addresses are three-byte (despite direct block addresses being
 * aligned word-wise in inode). If the most significant byte is non-zero,
 * something is most likely wrong (not a filesystem, bad bytesex). */
#define V7_MAXSIZE

/* Coherent super-block data on disk */
#define COH_NICINOD
#define COH_NICFREE
struct coh_super_block {};

/* SystemV/Coherent inode data on disk */
struct sysv_inode {};

/* SystemV/Coherent directory entry on disk */
#define SYSV_NAMELEN
struct sysv_dir_entry {};

#define SYSV_DIRSIZE

#endif /* _LINUX_SYSV_FS_H */