xref: /illumos-gate/usr/src/uts/common/sys/fs/pc_dir.h (revision 5b024a5b)
17c478bd9Sstevel@tonic-gate /*
27c478bd9Sstevel@tonic-gate  * CDDL HEADER START
37c478bd9Sstevel@tonic-gate  *
47c478bd9Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
5*5b024a5bSbatschul  * Common Development and Distribution License (the "License").
6*5b024a5bSbatschul  * You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate  *
87c478bd9Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate  * See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate  * and limitations under the License.
127c478bd9Sstevel@tonic-gate  *
137c478bd9Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate  *
197c478bd9Sstevel@tonic-gate  * CDDL HEADER END
207c478bd9Sstevel@tonic-gate  */
217c478bd9Sstevel@tonic-gate /*
22*5b024a5bSbatschul  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
23*5b024a5bSbatschul  * Use is subject to license terms.
247c478bd9Sstevel@tonic-gate  */
257c478bd9Sstevel@tonic-gate 
267c478bd9Sstevel@tonic-gate #ifndef	_SYS_FS_PC_DIR_H
277c478bd9Sstevel@tonic-gate #define	_SYS_FS_PC_DIR_H
287c478bd9Sstevel@tonic-gate 
297c478bd9Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
307c478bd9Sstevel@tonic-gate 
317c478bd9Sstevel@tonic-gate #include <sys/dirent.h>
327c478bd9Sstevel@tonic-gate 
337c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
347c478bd9Sstevel@tonic-gate extern "C" {
357c478bd9Sstevel@tonic-gate #endif
367c478bd9Sstevel@tonic-gate 
377c478bd9Sstevel@tonic-gate #define	PCFNAMESIZE	8
387c478bd9Sstevel@tonic-gate #define	PCFEXTSIZE	3
397c478bd9Sstevel@tonic-gate #define	PCMAXPATHLEN	MAXPATHLEN
407c478bd9Sstevel@tonic-gate #define	PCMAXNAMLEN	255
417c478bd9Sstevel@tonic-gate #define	PCLFNCHUNKSIZE	13
427c478bd9Sstevel@tonic-gate 
437c478bd9Sstevel@tonic-gate struct pctime {
447c478bd9Sstevel@tonic-gate 	ushort_t pct_time;		/* hh:mm:ss (little endian) */
457c478bd9Sstevel@tonic-gate 	ushort_t pct_date;		/* yy:mm:dd (little endian) */
467c478bd9Sstevel@tonic-gate };
477c478bd9Sstevel@tonic-gate 
487c478bd9Sstevel@tonic-gate /*
497c478bd9Sstevel@tonic-gate  * Shifts and masks for time and date fields, in host byte order.
507c478bd9Sstevel@tonic-gate  */
517c478bd9Sstevel@tonic-gate #define	SECSHIFT	0
527c478bd9Sstevel@tonic-gate #define	SECMASK		0x1F
537c478bd9Sstevel@tonic-gate #define	MINSHIFT	5
547c478bd9Sstevel@tonic-gate #define	MINMASK		0x3F
557c478bd9Sstevel@tonic-gate #define	HOURSHIFT	11
567c478bd9Sstevel@tonic-gate #define	HOURMASK	0x1F
577c478bd9Sstevel@tonic-gate 
587c478bd9Sstevel@tonic-gate #define	DAYSHIFT	0
597c478bd9Sstevel@tonic-gate #define	DAYMASK		0x1F
607c478bd9Sstevel@tonic-gate #define	MONSHIFT	5
617c478bd9Sstevel@tonic-gate #define	MONMASK		0x0F
627c478bd9Sstevel@tonic-gate #define	YEARSHIFT	9
637c478bd9Sstevel@tonic-gate #define	YEARMASK	0x7F
647c478bd9Sstevel@tonic-gate 
657c478bd9Sstevel@tonic-gate struct pcdir {
667c478bd9Sstevel@tonic-gate 	char pcd_filename[PCFNAMESIZE];	/* file name */
677c478bd9Sstevel@tonic-gate 	char pcd_ext[PCFEXTSIZE];	/* file extension */
687c478bd9Sstevel@tonic-gate 	uchar_t	pcd_attr;		/* file attributes */
697c478bd9Sstevel@tonic-gate 	uchar_t	pcd_ntattr;		/* reserved for NT attributes */
707c478bd9Sstevel@tonic-gate 	uchar_t	pcd_crtime_msec;	/* milliseconds after the minute */
717c478bd9Sstevel@tonic-gate 	struct pctime pcd_crtime;	/* creation time/date */
727c478bd9Sstevel@tonic-gate 	ushort_t pcd_ladate;		/* last-access date */
737c478bd9Sstevel@tonic-gate 	union {
747c478bd9Sstevel@tonic-gate 		uint16_t pcd_eattr;	/* OS/2 extended attribute */
757c478bd9Sstevel@tonic-gate 		pc_cluster16_t pcd_scluster_hi;
767c478bd9Sstevel@tonic-gate 	} un;
777c478bd9Sstevel@tonic-gate 	struct pctime pcd_mtime;	/* last modified time/date */
787c478bd9Sstevel@tonic-gate 	pc_cluster16_t pcd_scluster_lo;	/* starting cluster (little endian) */
797c478bd9Sstevel@tonic-gate 	uint_t	pcd_size;		/* file size (little endian) */
807c478bd9Sstevel@tonic-gate };
817c478bd9Sstevel@tonic-gate 
827c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
837c478bd9Sstevel@tonic-gate }
847c478bd9Sstevel@tonic-gate #endif
857c478bd9Sstevel@tonic-gate 
867c478bd9Sstevel@tonic-gate #include <sys/fs/pc_node.h>
877c478bd9Sstevel@tonic-gate 
887c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
897c478bd9Sstevel@tonic-gate extern "C" {
907c478bd9Sstevel@tonic-gate #endif
917c478bd9Sstevel@tonic-gate 
927c478bd9Sstevel@tonic-gate /*
937c478bd9Sstevel@tonic-gate  * Long filename support (introduced by Windows 95) is an interesting
947c478bd9Sstevel@tonic-gate  * exercise in compatibility. Basically, it is now no longer the case
957c478bd9Sstevel@tonic-gate  * that an entry in a directory (as described by the 'pcdir' structure above)
967c478bd9Sstevel@tonic-gate  * contains the entire name of a file. Now, a directory entry can consist of
977c478bd9Sstevel@tonic-gate  * a long filename component (a series of 'pcdir'-like structures) followed
987c478bd9Sstevel@tonic-gate  * by a short filename (the old form). Each long filename component is
997c478bd9Sstevel@tonic-gate  * identified by having it's Read-Only, Hidden, System, and Volume Label
1007c478bd9Sstevel@tonic-gate  * attributes set.  Each can store 13 Unicode characters (16-bits, of
1017c478bd9Sstevel@tonic-gate  * which we only look at the lower 8 for now), broken into (gak) three
1027c478bd9Sstevel@tonic-gate  * sections of the entry (since that's the way the available bits fall out).
1037c478bd9Sstevel@tonic-gate  * In addition, each long filename entry has a sequence number (starting
1047c478bd9Sstevel@tonic-gate  * from 1). The first entry has bit 7 (0x40) set in the sequence number, and
1057c478bd9Sstevel@tonic-gate  * has the maximum value in the sequence. This may seem a bit backwards, and
1067c478bd9Sstevel@tonic-gate  * it gets worse: the first entry stores the last component of
1077c478bd9Sstevel@tonic-gate  * the name. So the directory entry for a file named
1087c478bd9Sstevel@tonic-gate  * "This is a very long filename indeed" might look like this:
1097c478bd9Sstevel@tonic-gate  *
1107c478bd9Sstevel@tonic-gate  * Offset  Sequence      Component         Attributes    Cluster    Size
1117c478bd9Sstevel@tonic-gate  *    0      0x43       "me indeed"          RSHV           0         0
1127c478bd9Sstevel@tonic-gate  *   32      0x02       "y long filena"      RSHV           0         0
1137c478bd9Sstevel@tonic-gate  *   64      0x01       "This is a ver"      RSHV           0         0
1147c478bd9Sstevel@tonic-gate  *   96      ----       "THISIS~1.TXT"       <whatever>  2122       110
1157c478bd9Sstevel@tonic-gate  *
1167c478bd9Sstevel@tonic-gate  * The last entry is for the short filename, which stores actual information
1177c478bd9Sstevel@tonic-gate  * about the file (like type, permissions, cluster, and size). The short name
1187c478bd9Sstevel@tonic-gate  * is also used by non-long-filename aware applications (like Windows 3.X and
1197c478bd9Sstevel@tonic-gate  * DOS). This name is generated by Windows 95 (and now Solaris) from the
1207c478bd9Sstevel@tonic-gate  * long name, and must (of course) be unique within the directory.
1217c478bd9Sstevel@tonic-gate  * Solaris continues to this entry to actually identify the file and its
1227c478bd9Sstevel@tonic-gate  * attributes (filenames only really matter when names are used, like at
1237c478bd9Sstevel@tonic-gate  * lookup/readdir/remove/create/rename time - for general access to the file
1247c478bd9Sstevel@tonic-gate  * they aren't used).
1257c478bd9Sstevel@tonic-gate  *
1267c478bd9Sstevel@tonic-gate  * Long filenames can also be broken by applications that don't
1277c478bd9Sstevel@tonic-gate  * understand them (for example, a Solaris 2.5.1 user could rename
1287c478bd9Sstevel@tonic-gate  * "THISIS~1.TXT" to "test.exe"). This can be detected because each long
1297c478bd9Sstevel@tonic-gate  * filename component has a checksum which is based on the short filename.
1307c478bd9Sstevel@tonic-gate  * After reading the long filename entry, if the checksum doesn't match the
1317c478bd9Sstevel@tonic-gate  * short name that follows, we simply ignore it and use the short name.
1327c478bd9Sstevel@tonic-gate  *
1337c478bd9Sstevel@tonic-gate  * One subtle thing - though long file names are case-sensitive,
1347c478bd9Sstevel@tonic-gate  * searches for them are not.
1357c478bd9Sstevel@tonic-gate  *
1367c478bd9Sstevel@tonic-gate  * Another _very_ subtle thing. The number of characters in the
1377c478bd9Sstevel@tonic-gate  * last long filename chunk (the first entry, with the 0x40 bit set) is
1387c478bd9Sstevel@tonic-gate  * either all the characters (if there is no null, '\0'), or all the
1397c478bd9Sstevel@tonic-gate  * characters up to the null. _However_, if the remaining characters are
1407c478bd9Sstevel@tonic-gate  * null, Norton Disk Doctor and Microsoft ScanDisk will claim
1417c478bd9Sstevel@tonic-gate  * that the filename entry is damaged. The remaining bytes must actually
1427c478bd9Sstevel@tonic-gate  * contain 0xff (discovered with Disk Doctor).
1437c478bd9Sstevel@tonic-gate  *
1447c478bd9Sstevel@tonic-gate  * Some information about long filename support can be found in the
1457c478bd9Sstevel@tonic-gate  * book "Inside Windows 95" by Adrian King.
1467c478bd9Sstevel@tonic-gate  */
1477c478bd9Sstevel@tonic-gate 
1487c478bd9Sstevel@tonic-gate /*
1497c478bd9Sstevel@tonic-gate  * The number of bytes in each section of the name in a long filename
1507c478bd9Sstevel@tonic-gate  * entry. This is _bytes_, not characters: each character is actually
1517c478bd9Sstevel@tonic-gate  * 16 bits.
1527c478bd9Sstevel@tonic-gate  */
1537c478bd9Sstevel@tonic-gate #define	PCLF_FIRSTNAMESIZE	10
1547c478bd9Sstevel@tonic-gate #define	PCLF_SECONDNAMESIZE	12
1557c478bd9Sstevel@tonic-gate #define	PCLF_THIRDNAMESIZE	4
1567c478bd9Sstevel@tonic-gate 
1577c478bd9Sstevel@tonic-gate /*
1587c478bd9Sstevel@tonic-gate  * A long filename entry. It must match the 'pcdir' structure in size,
1597c478bd9Sstevel@tonic-gate  * and pcdl_attr must overlap pcd_attr.
1607c478bd9Sstevel@tonic-gate  */
1617c478bd9Sstevel@tonic-gate struct pcdir_lfn {
1627c478bd9Sstevel@tonic-gate 	uchar_t pcdl_ordinal;	/* lfn order. First is 01, next 02, */
1637c478bd9Sstevel@tonic-gate 				/* last has bit 7 (0x40) set */
1647c478bd9Sstevel@tonic-gate 	uchar_t pcdl_firstfilename[PCLF_FIRSTNAMESIZE];
1657c478bd9Sstevel@tonic-gate 	uchar_t pcdl_attr;
1667c478bd9Sstevel@tonic-gate 	uchar_t pcdl_type;	/* type - always contains 0 for an LFN entry */
1677c478bd9Sstevel@tonic-gate 	uchar_t pcdl_checksum;	/* checksum to validate the LFN entry - */
1687c478bd9Sstevel@tonic-gate 				/* based on the short name */
1697c478bd9Sstevel@tonic-gate 	uchar_t pcdl_secondfilename[PCLF_SECONDNAMESIZE];
1707c478bd9Sstevel@tonic-gate 	pc_cluster16_t pcd_scluster;	/* (not used, always 0) */
1717c478bd9Sstevel@tonic-gate 	uchar_t pcdl_thirdfilename[PCLF_THIRDNAMESIZE];
1727c478bd9Sstevel@tonic-gate };
1737c478bd9Sstevel@tonic-gate 
1747c478bd9Sstevel@tonic-gate #define	PCDL_IS_LAST_LFN(x) ((x->pcdl_ordinal) & 0x40)
1757c478bd9Sstevel@tonic-gate #define	PCDL_LFN_BITS (PCA_RDONLY | PCA_HIDDEN | PCA_SYSTEM | PCA_LABEL)
1767c478bd9Sstevel@tonic-gate #define	PCDL_IS_LFN(x) (enable_long_filenames && \
1777c478bd9Sstevel@tonic-gate 			    (((x)->pcd_attr & PCDL_LFN_BITS) == PCDL_LFN_BITS))
1787c478bd9Sstevel@tonic-gate 
1797c478bd9Sstevel@tonic-gate /*
1807c478bd9Sstevel@tonic-gate  * The first char of the file name has special meaning as follows:
1817c478bd9Sstevel@tonic-gate  */
1827c478bd9Sstevel@tonic-gate #define	PCD_UNUSED	((char)0x00)	/* entry has never been used */
1837c478bd9Sstevel@tonic-gate #define	PCD_ERASED	((char)0xE5)	/* entry was erased */
1847c478bd9Sstevel@tonic-gate 
1857c478bd9Sstevel@tonic-gate /*
1867c478bd9Sstevel@tonic-gate  * File attributes.
1877c478bd9Sstevel@tonic-gate  */
1887c478bd9Sstevel@tonic-gate #define	PCA_RDONLY	0x01	/* file is read only */
1897c478bd9Sstevel@tonic-gate #define	PCA_HIDDEN	0x02	/* file is hidden */
1907c478bd9Sstevel@tonic-gate #define	PCA_SYSTEM	0x04	/* system file */
1917c478bd9Sstevel@tonic-gate #define	PCA_LABEL	0x08	/* entry contains the volume label */
1927c478bd9Sstevel@tonic-gate #define	PCA_DIR		0x10	/* subdirectory */
1937c478bd9Sstevel@tonic-gate #define	PCA_ARCH	0x20	/* file has been modified since last backup */
1947c478bd9Sstevel@tonic-gate 
1957c478bd9Sstevel@tonic-gate /*
1967c478bd9Sstevel@tonic-gate  * Avoid hidden files unless the private variable is set.
1977c478bd9Sstevel@tonic-gate  * Always avoid the label.
1987c478bd9Sstevel@tonic-gate  */
1997c478bd9Sstevel@tonic-gate #define	PCA_IS_HIDDEN(fsp, attr) \
2007c478bd9Sstevel@tonic-gate 	((((attr) & PCA_LABEL) == PCA_LABEL) || \
2017c478bd9Sstevel@tonic-gate 	((((fsp)->pcfs_flags & PCFS_HIDDEN) == 0) && \
2027c478bd9Sstevel@tonic-gate 	    ((attr) & (PCA_HIDDEN | PCA_SYSTEM))))
2037c478bd9Sstevel@tonic-gate 
2047c478bd9Sstevel@tonic-gate #define	PC_NAME_IS_DOT(namep) \
2057c478bd9Sstevel@tonic-gate 	(((namep)[0] == '.') && ((namep)[1] == '\0'))
2067c478bd9Sstevel@tonic-gate #define	PC_NAME_IS_DOTDOT(namep) \
2077c478bd9Sstevel@tonic-gate 	(((namep)[0] == '.') && ((namep)[1] == '.') && ((namep)[2] == '\0'))
2087c478bd9Sstevel@tonic-gate #define	PC_SHORTNAME_IS_DOT(namep) \
2097c478bd9Sstevel@tonic-gate 	(((namep)[0] == '.') && ((namep)[1] == ' '))
2107c478bd9Sstevel@tonic-gate #define	PC_SHORTNAME_IS_DOTDOT(namep) \
2117c478bd9Sstevel@tonic-gate 	(((namep)[0] == '.') && ((namep)[1] == '.') && ((namep)[2] == ' '))
2127c478bd9Sstevel@tonic-gate /*
2137c478bd9Sstevel@tonic-gate  * slot structure is used by the directory search routine to return
2147c478bd9Sstevel@tonic-gate  * the results of the search.  If the search is successful sl_blkno and
2157c478bd9Sstevel@tonic-gate  * sl_offset reflect the disk address of the entry and sl_ep points to
2167c478bd9Sstevel@tonic-gate  * the actual entry data in buffer sl_bp. sl_flags is set to whether the
2177c478bd9Sstevel@tonic-gate  * entry is dot or dotdot. If the search is unsuccessful sl_blkno and
2187c478bd9Sstevel@tonic-gate  * sl_offset points to an empty directory slot if there are any. Otherwise
2197c478bd9Sstevel@tonic-gate  * it is set to -1.
2207c478bd9Sstevel@tonic-gate  */
221*5b024a5bSbatschul struct pcslot {
2227c478bd9Sstevel@tonic-gate 	enum {SL_NONE, SL_FOUND, SL_EXTEND} sl_status;	/* slot status */
2237c478bd9Sstevel@tonic-gate 	daddr_t		sl_blkno;	/* disk block number which has entry */
2247c478bd9Sstevel@tonic-gate 	int		sl_offset;	/* offset of entry within block */
2257c478bd9Sstevel@tonic-gate 	struct buf	*sl_bp;		/* buffer containing entry data */
2267c478bd9Sstevel@tonic-gate 	struct pcdir	*sl_ep;		/* pointer to entry data */
2277c478bd9Sstevel@tonic-gate 	int		sl_flags;	/* flags (see below) */
2287c478bd9Sstevel@tonic-gate };
2297c478bd9Sstevel@tonic-gate #define	SL_DOT		1	/* entry point to self */
2307c478bd9Sstevel@tonic-gate #define	SL_DOTDOT	2	/* entry points to parent */
2317c478bd9Sstevel@tonic-gate 
2327c478bd9Sstevel@tonic-gate /*
2337c478bd9Sstevel@tonic-gate  * A pcfs directory entry. Directory entries are actually variable
2347c478bd9Sstevel@tonic-gate  * length, but this is the maximum size.
2357c478bd9Sstevel@tonic-gate  *
2367c478bd9Sstevel@tonic-gate  * This _must_ match a dirent64 structure in format.
2377c478bd9Sstevel@tonic-gate  */
2387c478bd9Sstevel@tonic-gate struct pc_dirent {
2397c478bd9Sstevel@tonic-gate 	ino64_t		d_ino;		/* "inode number" of entry */
2407c478bd9Sstevel@tonic-gate 	off64_t		d_off;		/* offset of disk directory entry */
2417c478bd9Sstevel@tonic-gate 	unsigned short	d_reclen;	/* length of this record */
2427c478bd9Sstevel@tonic-gate 	char		d_name[PCMAXNAMLEN + 1];
2437c478bd9Sstevel@tonic-gate };
2447c478bd9Sstevel@tonic-gate 
2457c478bd9Sstevel@tonic-gate #ifdef _KERNEL
2467c478bd9Sstevel@tonic-gate 
2477c478bd9Sstevel@tonic-gate /*
2487c478bd9Sstevel@tonic-gate  * macros for converting to/from upper or lower case.
2497c478bd9Sstevel@tonic-gate  * users may give and get names in lower case, but they are stored on the
2507c478bd9Sstevel@tonic-gate  * disk in upper case to be PCDOS compatible
2517c478bd9Sstevel@tonic-gate  */
2527c478bd9Sstevel@tonic-gate #define	toupper(C)	(((C) >= 'a' && (C) <= 'z') ? (C) - 'a' + 'A' : (C))
2537c478bd9Sstevel@tonic-gate #define	tolower(C)	(((C) >= 'A' && (C) <= 'Z') ? (C) - 'A' + 'a' : (C))
2547c478bd9Sstevel@tonic-gate 
2557c478bd9Sstevel@tonic-gate extern void pc_tvtopct(timestruc_t *, struct pctime *);	/* timeval to pctime */
2567c478bd9Sstevel@tonic-gate extern void pc_pcttotv(struct pctime *, timestruc_t *);	/* pctime to timeval */
2577c478bd9Sstevel@tonic-gate extern int pc_validchar(char);			/* valid filename ch */
2587c478bd9Sstevel@tonic-gate extern int pc_valid_lfn_char(char);		/* valid long filename ch */
2597c478bd9Sstevel@tonic-gate 
2607c478bd9Sstevel@tonic-gate extern int pc_read_long_fn(struct vnode *, struct uio *,
2617c478bd9Sstevel@tonic-gate     struct pc_dirent *, struct pcdir **, offset_t *, struct buf **);
2627c478bd9Sstevel@tonic-gate extern int pc_read_short_fn(struct vnode *, struct uio *,
2637c478bd9Sstevel@tonic-gate     struct pc_dirent *, struct pcdir **, offset_t *, struct buf **);
2647c478bd9Sstevel@tonic-gate extern int pc_match_long_fn(struct pcnode *, char *, struct pcdir **,
265*5b024a5bSbatschul     struct pcslot *, offset_t *);
2667c478bd9Sstevel@tonic-gate extern int pc_match_short_fn(struct pcnode *, char *,
267*5b024a5bSbatschul     struct pcdir **, struct pcslot *, offset_t *);
2687c478bd9Sstevel@tonic-gate extern uchar_t pc_checksum_long_fn(char *, char *);
2697c478bd9Sstevel@tonic-gate extern void set_long_fn_chunk(struct pcdir_lfn *, char *, int);
2707c478bd9Sstevel@tonic-gate extern int pc_valid_long_fn(char *);
2717c478bd9Sstevel@tonic-gate extern int pc_extract_long_fn(struct pcnode *, char *,
2727c478bd9Sstevel@tonic-gate     struct pcdir **, offset_t *offset, struct buf **);
2737c478bd9Sstevel@tonic-gate extern int pc_fname_ext_to_name(char *, char *, char *, int);
2747c478bd9Sstevel@tonic-gate 
2757c478bd9Sstevel@tonic-gate extern pc_cluster32_t pc_getstartcluster(struct pcfs *, struct pcdir *);
2767c478bd9Sstevel@tonic-gate extern void pc_setstartcluster(struct pcfs *, struct pcdir *, pc_cluster32_t);
2777c478bd9Sstevel@tonic-gate 
2787c478bd9Sstevel@tonic-gate /*
2797c478bd9Sstevel@tonic-gate  * Private tunables
2807c478bd9Sstevel@tonic-gate  */
2817c478bd9Sstevel@tonic-gate 
2827c478bd9Sstevel@tonic-gate /*
2837c478bd9Sstevel@tonic-gate  * Use long filenames (Windows 95). Disabling this causes pcfs
2847c478bd9Sstevel@tonic-gate  * to not recognize long filenames at all, which may cause it to
2857c478bd9Sstevel@tonic-gate  * break associations between the short and long names. This is likely
2867c478bd9Sstevel@tonic-gate  * to leave unused long filename entries  in directories (which may make
2877c478bd9Sstevel@tonic-gate  * apparently empty directories unremovable), and would require a fsck_pcfs
2887c478bd9Sstevel@tonic-gate  * to find and fix (or a Windows utility like Norton Disk Doctor or
2897c478bd9Sstevel@tonic-gate  * Microsoft ScanDisk).
2907c478bd9Sstevel@tonic-gate  */
2917c478bd9Sstevel@tonic-gate extern int enable_long_filenames;	/* default: on */
2927c478bd9Sstevel@tonic-gate 
2937c478bd9Sstevel@tonic-gate #endif
2947c478bd9Sstevel@tonic-gate 
2957c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
2967c478bd9Sstevel@tonic-gate }
2977c478bd9Sstevel@tonic-gate #endif
2987c478bd9Sstevel@tonic-gate 
2997c478bd9Sstevel@tonic-gate #endif	/* _SYS_FS_PC_DIR_H */
300