Changeset View
Changeset View
Standalone View
Standalone View
sys/fs/msdosfs/msdosfsmount.h
Show First 20 Lines • Show All 45 Lines • ▼ Show 20 Lines | |||||
* any damages caused by this software. | * any damages caused by this software. | ||||
* | * | ||||
* October 1992 | * October 1992 | ||||
*/ | */ | ||||
#ifndef _MSDOSFS_MSDOSFSMOUNT_H_ | #ifndef _MSDOSFS_MSDOSFSMOUNT_H_ | ||||
#define _MSDOSFS_MSDOSFSMOUNT_H_ | #define _MSDOSFS_MSDOSFSMOUNT_H_ | ||||
#ifdef _KERNEL | #if defined(_KERNEL) || defined(MAKEFS) | ||||
#include <sys/types.h> | #include <sys/types.h> | ||||
#include <sys/lock.h> | #include <sys/lock.h> | ||||
#include <sys/lockmgr.h> | #include <sys/lockmgr.h> | ||||
#include <sys/tree.h> | #include <sys/tree.h> | ||||
#ifdef MALLOC_DECLARE | #ifdef MALLOC_DECLARE | ||||
MALLOC_DECLARE(M_MSDOSFSMNT); | MALLOC_DECLARE(M_MSDOSFSMNT); | ||||
▲ Show 20 Lines • Show All 145 Lines • ▼ Show 20 Lines | |||||
* Calculate block number for directory entry at cluster dirclu, offset | * Calculate block number for directory entry at cluster dirclu, offset | ||||
* dirofs | * dirofs | ||||
*/ | */ | ||||
#define detobn(pmp, dirclu, dirofs) \ | #define detobn(pmp, dirclu, dirofs) \ | ||||
((dirclu) == MSDOSFSROOT \ | ((dirclu) == MSDOSFSROOT \ | ||||
? roottobn((pmp), (dirofs)) \ | ? roottobn((pmp), (dirofs)) \ | ||||
: cntobn((pmp), (dirclu))) | : cntobn((pmp), (dirclu))) | ||||
#ifdef _KERNEL | |||||
#define MSDOSFS_LOCK_MP(pmp) \ | #define MSDOSFS_LOCK_MP(pmp) \ | ||||
emaste: should this be #ifdef KERNEL? | |||||
Not Done Inline ActionsYes, you're right. I'll update that. smahadevan_freebsdfoundation.org: Yes, you're right. I'll update that. | |||||
Not Done Inline ActionsActually, there seems to be another usr.sbin tool (amd) that depends on struct msdosfs_args, which is why I think I made this change to #ifndef MAKEFS. Before this patch, this struct was being exposed to all consumers of this header. I will need to revert it for building that tool. smahadevan_freebsdfoundation.org: Actually, there seems to be another usr.sbin tool (`amd`) that depends on `struct msdosfs_args`… | |||||
lockmgr(&(pmp)->pm_fatlock, LK_EXCLUSIVE, NULL) | lockmgr(&(pmp)->pm_fatlock, LK_EXCLUSIVE, NULL) | ||||
#define MSDOSFS_UNLOCK_MP(pmp) \ | #define MSDOSFS_UNLOCK_MP(pmp) \ | ||||
lockmgr(&(pmp)->pm_fatlock, LK_RELEASE, NULL) | lockmgr(&(pmp)->pm_fatlock, LK_RELEASE, NULL) | ||||
#define MSDOSFS_ASSERT_MP_LOCKED(pmp) \ | #define MSDOSFS_ASSERT_MP_LOCKED(pmp) \ | ||||
lockmgr_assert(&(pmp)->pm_fatlock, KA_XLOCKED) | lockmgr_assert(&(pmp)->pm_fatlock, KA_XLOCKED) | ||||
#endif /* _KERNEL */ | #endif | ||||
#endif /* _KERNEL || MAKEFS */ | |||||
#ifndef MAKEFS | |||||
/* | /* | ||||
* Arguments to mount MSDOS filesystems. | * Arguments to mount MSDOS filesystems. | ||||
*/ | */ | ||||
struct msdosfs_args { | struct msdosfs_args { | ||||
char *fspec; /* blocks special holding the fs to mount */ | char *fspec; /* blocks special holding the fs to mount */ | ||||
struct oexport_args export; /* network export information */ | struct oexport_args export; /* network export information */ | ||||
uid_t uid; /* uid that owns msdosfs files */ | uid_t uid; /* uid that owns msdosfs files */ | ||||
gid_t gid; /* gid that owns msdosfs files */ | gid_t gid; /* gid that owns msdosfs files */ | ||||
mode_t mask; /* file mask to be applied for msdosfs perms */ | mode_t mask; /* file mask to be applied for msdosfs perms */ | ||||
int flags; /* see below */ | int flags; /* see below */ | ||||
int unused1; /* unused, was version number */ | int unused1; /* unused, was version number */ | ||||
uint16_t unused2[128]; /* no longer used, was Local->Unicode table */ | uint16_t unused2[128]; /* no longer used, was Local->Unicode table */ | ||||
char *cs_win; /* Windows(Unicode) Charset */ | char *cs_win; /* Windows(Unicode) Charset */ | ||||
char *cs_dos; /* DOS Charset */ | char *cs_dos; /* DOS Charset */ | ||||
char *cs_local; /* Local Charset */ | char *cs_local; /* Local Charset */ | ||||
mode_t dirmask; /* dir mask to be applied for msdosfs perms */ | mode_t dirmask; /* dir mask to be applied for msdosfs perms */ | ||||
}; | }; | ||||
#endif /* !MAKEFS */ | |||||
Not Done Inline Actions/* _KERNEL */ emaste: `/* _KERNEL */` | |||||
/* | /* | ||||
* Msdosfs mount options: | * Msdosfs mount options: | ||||
*/ | */ | ||||
#define MSDOSFSMNT_SHORTNAME 1 /* Force old DOS short names only */ | #define MSDOSFSMNT_SHORTNAME 1 /* Force old DOS short names only */ | ||||
#define MSDOSFSMNT_LONGNAME 2 /* Force Win'95 long names */ | #define MSDOSFSMNT_LONGNAME 2 /* Force Win'95 long names */ | ||||
#define MSDOSFSMNT_NOWIN95 4 /* Completely ignore Win95 entries */ | #define MSDOSFSMNT_NOWIN95 4 /* Completely ignore Win95 entries */ | ||||
#define MSDOSFSMNT_KICONV 0x10 /* Use libiconv to convert chars */ | #define MSDOSFSMNT_KICONV 0x10 /* Use libiconv to convert chars */ | ||||
Show All 10 Lines |
should this be #ifdef KERNEL?