1*7c478bd9Sstevel@tonic-gate /* 2*7c478bd9Sstevel@tonic-gate * CDDL HEADER START 3*7c478bd9Sstevel@tonic-gate * 4*7c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*7c478bd9Sstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only 6*7c478bd9Sstevel@tonic-gate * (the "License"). You may not use this file except in compliance 7*7c478bd9Sstevel@tonic-gate * with the License. 8*7c478bd9Sstevel@tonic-gate * 9*7c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10*7c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 11*7c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 12*7c478bd9Sstevel@tonic-gate * and limitations under the License. 13*7c478bd9Sstevel@tonic-gate * 14*7c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 15*7c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16*7c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 17*7c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 18*7c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 19*7c478bd9Sstevel@tonic-gate * 20*7c478bd9Sstevel@tonic-gate * CDDL HEADER END 21*7c478bd9Sstevel@tonic-gate */ 22*7c478bd9Sstevel@tonic-gate /* 23*7c478bd9Sstevel@tonic-gate * Copyright (c) 1989, 1992, 1997-1998, 2000 by Sun Microsystems, Inc. 24*7c478bd9Sstevel@tonic-gate * All rights reserved. 25*7c478bd9Sstevel@tonic-gate */ 26*7c478bd9Sstevel@tonic-gate 27*7c478bd9Sstevel@tonic-gate #ifndef _SYS_FS_PC_DIR_H 28*7c478bd9Sstevel@tonic-gate #define _SYS_FS_PC_DIR_H 29*7c478bd9Sstevel@tonic-gate 30*7c478bd9Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 31*7c478bd9Sstevel@tonic-gate 32*7c478bd9Sstevel@tonic-gate #include <sys/dirent.h> 33*7c478bd9Sstevel@tonic-gate 34*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus 35*7c478bd9Sstevel@tonic-gate extern "C" { 36*7c478bd9Sstevel@tonic-gate #endif 37*7c478bd9Sstevel@tonic-gate 38*7c478bd9Sstevel@tonic-gate #define PCFNAMESIZE 8 39*7c478bd9Sstevel@tonic-gate #define PCFEXTSIZE 3 40*7c478bd9Sstevel@tonic-gate #define PCMAXPATHLEN MAXPATHLEN 41*7c478bd9Sstevel@tonic-gate #define PCMAXNAMLEN 255 42*7c478bd9Sstevel@tonic-gate #define PCLFNCHUNKSIZE 13 43*7c478bd9Sstevel@tonic-gate 44*7c478bd9Sstevel@tonic-gate struct pctime { 45*7c478bd9Sstevel@tonic-gate ushort_t pct_time; /* hh:mm:ss (little endian) */ 46*7c478bd9Sstevel@tonic-gate ushort_t pct_date; /* yy:mm:dd (little endian) */ 47*7c478bd9Sstevel@tonic-gate }; 48*7c478bd9Sstevel@tonic-gate 49*7c478bd9Sstevel@tonic-gate /* 50*7c478bd9Sstevel@tonic-gate * Shifts and masks for time and date fields, in host byte order. 51*7c478bd9Sstevel@tonic-gate */ 52*7c478bd9Sstevel@tonic-gate #define SECSHIFT 0 53*7c478bd9Sstevel@tonic-gate #define SECMASK 0x1F 54*7c478bd9Sstevel@tonic-gate #define MINSHIFT 5 55*7c478bd9Sstevel@tonic-gate #define MINMASK 0x3F 56*7c478bd9Sstevel@tonic-gate #define HOURSHIFT 11 57*7c478bd9Sstevel@tonic-gate #define HOURMASK 0x1F 58*7c478bd9Sstevel@tonic-gate 59*7c478bd9Sstevel@tonic-gate #define DAYSHIFT 0 60*7c478bd9Sstevel@tonic-gate #define DAYMASK 0x1F 61*7c478bd9Sstevel@tonic-gate #define MONSHIFT 5 62*7c478bd9Sstevel@tonic-gate #define MONMASK 0x0F 63*7c478bd9Sstevel@tonic-gate #define YEARSHIFT 9 64*7c478bd9Sstevel@tonic-gate #define YEARMASK 0x7F 65*7c478bd9Sstevel@tonic-gate 66*7c478bd9Sstevel@tonic-gate struct pcdir { 67*7c478bd9Sstevel@tonic-gate char pcd_filename[PCFNAMESIZE]; /* file name */ 68*7c478bd9Sstevel@tonic-gate char pcd_ext[PCFEXTSIZE]; /* file extension */ 69*7c478bd9Sstevel@tonic-gate uchar_t pcd_attr; /* file attributes */ 70*7c478bd9Sstevel@tonic-gate uchar_t pcd_ntattr; /* reserved for NT attributes */ 71*7c478bd9Sstevel@tonic-gate uchar_t pcd_crtime_msec; /* milliseconds after the minute */ 72*7c478bd9Sstevel@tonic-gate struct pctime pcd_crtime; /* creation time/date */ 73*7c478bd9Sstevel@tonic-gate ushort_t pcd_ladate; /* last-access date */ 74*7c478bd9Sstevel@tonic-gate union { 75*7c478bd9Sstevel@tonic-gate uint16_t pcd_eattr; /* OS/2 extended attribute */ 76*7c478bd9Sstevel@tonic-gate pc_cluster16_t pcd_scluster_hi; 77*7c478bd9Sstevel@tonic-gate } un; 78*7c478bd9Sstevel@tonic-gate struct pctime pcd_mtime; /* last modified time/date */ 79*7c478bd9Sstevel@tonic-gate pc_cluster16_t pcd_scluster_lo; /* starting cluster (little endian) */ 80*7c478bd9Sstevel@tonic-gate uint_t pcd_size; /* file size (little endian) */ 81*7c478bd9Sstevel@tonic-gate }; 82*7c478bd9Sstevel@tonic-gate 83*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus 84*7c478bd9Sstevel@tonic-gate } 85*7c478bd9Sstevel@tonic-gate #endif 86*7c478bd9Sstevel@tonic-gate 87*7c478bd9Sstevel@tonic-gate #include <sys/fs/pc_node.h> 88*7c478bd9Sstevel@tonic-gate 89*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus 90*7c478bd9Sstevel@tonic-gate extern "C" { 91*7c478bd9Sstevel@tonic-gate #endif 92*7c478bd9Sstevel@tonic-gate 93*7c478bd9Sstevel@tonic-gate /* 94*7c478bd9Sstevel@tonic-gate * Long filename support (introduced by Windows 95) is an interesting 95*7c478bd9Sstevel@tonic-gate * exercise in compatibility. Basically, it is now no longer the case 96*7c478bd9Sstevel@tonic-gate * that an entry in a directory (as described by the 'pcdir' structure above) 97*7c478bd9Sstevel@tonic-gate * contains the entire name of a file. Now, a directory entry can consist of 98*7c478bd9Sstevel@tonic-gate * a long filename component (a series of 'pcdir'-like structures) followed 99*7c478bd9Sstevel@tonic-gate * by a short filename (the old form). Each long filename component is 100*7c478bd9Sstevel@tonic-gate * identified by having it's Read-Only, Hidden, System, and Volume Label 101*7c478bd9Sstevel@tonic-gate * attributes set. Each can store 13 Unicode characters (16-bits, of 102*7c478bd9Sstevel@tonic-gate * which we only look at the lower 8 for now), broken into (gak) three 103*7c478bd9Sstevel@tonic-gate * sections of the entry (since that's the way the available bits fall out). 104*7c478bd9Sstevel@tonic-gate * In addition, each long filename entry has a sequence number (starting 105*7c478bd9Sstevel@tonic-gate * from 1). The first entry has bit 7 (0x40) set in the sequence number, and 106*7c478bd9Sstevel@tonic-gate * has the maximum value in the sequence. This may seem a bit backwards, and 107*7c478bd9Sstevel@tonic-gate * it gets worse: the first entry stores the last component of 108*7c478bd9Sstevel@tonic-gate * the name. So the directory entry for a file named 109*7c478bd9Sstevel@tonic-gate * "This is a very long filename indeed" might look like this: 110*7c478bd9Sstevel@tonic-gate * 111*7c478bd9Sstevel@tonic-gate * Offset Sequence Component Attributes Cluster Size 112*7c478bd9Sstevel@tonic-gate * 0 0x43 "me indeed" RSHV 0 0 113*7c478bd9Sstevel@tonic-gate * 32 0x02 "y long filena" RSHV 0 0 114*7c478bd9Sstevel@tonic-gate * 64 0x01 "This is a ver" RSHV 0 0 115*7c478bd9Sstevel@tonic-gate * 96 ---- "THISIS~1.TXT" <whatever> 2122 110 116*7c478bd9Sstevel@tonic-gate * 117*7c478bd9Sstevel@tonic-gate * The last entry is for the short filename, which stores actual information 118*7c478bd9Sstevel@tonic-gate * about the file (like type, permissions, cluster, and size). The short name 119*7c478bd9Sstevel@tonic-gate * is also used by non-long-filename aware applications (like Windows 3.X and 120*7c478bd9Sstevel@tonic-gate * DOS). This name is generated by Windows 95 (and now Solaris) from the 121*7c478bd9Sstevel@tonic-gate * long name, and must (of course) be unique within the directory. 122*7c478bd9Sstevel@tonic-gate * Solaris continues to this entry to actually identify the file and its 123*7c478bd9Sstevel@tonic-gate * attributes (filenames only really matter when names are used, like at 124*7c478bd9Sstevel@tonic-gate * lookup/readdir/remove/create/rename time - for general access to the file 125*7c478bd9Sstevel@tonic-gate * they aren't used). 126*7c478bd9Sstevel@tonic-gate * 127*7c478bd9Sstevel@tonic-gate * Long filenames can also be broken by applications that don't 128*7c478bd9Sstevel@tonic-gate * understand them (for example, a Solaris 2.5.1 user could rename 129*7c478bd9Sstevel@tonic-gate * "THISIS~1.TXT" to "test.exe"). This can be detected because each long 130*7c478bd9Sstevel@tonic-gate * filename component has a checksum which is based on the short filename. 131*7c478bd9Sstevel@tonic-gate * After reading the long filename entry, if the checksum doesn't match the 132*7c478bd9Sstevel@tonic-gate * short name that follows, we simply ignore it and use the short name. 133*7c478bd9Sstevel@tonic-gate * 134*7c478bd9Sstevel@tonic-gate * One subtle thing - though long file names are case-sensitive, 135*7c478bd9Sstevel@tonic-gate * searches for them are not. 136*7c478bd9Sstevel@tonic-gate * 137*7c478bd9Sstevel@tonic-gate * Another _very_ subtle thing. The number of characters in the 138*7c478bd9Sstevel@tonic-gate * last long filename chunk (the first entry, with the 0x40 bit set) is 139*7c478bd9Sstevel@tonic-gate * either all the characters (if there is no null, '\0'), or all the 140*7c478bd9Sstevel@tonic-gate * characters up to the null. _However_, if the remaining characters are 141*7c478bd9Sstevel@tonic-gate * null, Norton Disk Doctor and Microsoft ScanDisk will claim 142*7c478bd9Sstevel@tonic-gate * that the filename entry is damaged. The remaining bytes must actually 143*7c478bd9Sstevel@tonic-gate * contain 0xff (discovered with Disk Doctor). 144*7c478bd9Sstevel@tonic-gate * 145*7c478bd9Sstevel@tonic-gate * Some information about long filename support can be found in the 146*7c478bd9Sstevel@tonic-gate * book "Inside Windows 95" by Adrian King. 147*7c478bd9Sstevel@tonic-gate */ 148*7c478bd9Sstevel@tonic-gate 149*7c478bd9Sstevel@tonic-gate /* 150*7c478bd9Sstevel@tonic-gate * The number of bytes in each section of the name in a long filename 151*7c478bd9Sstevel@tonic-gate * entry. This is _bytes_, not characters: each character is actually 152*7c478bd9Sstevel@tonic-gate * 16 bits. 153*7c478bd9Sstevel@tonic-gate */ 154*7c478bd9Sstevel@tonic-gate #define PCLF_FIRSTNAMESIZE 10 155*7c478bd9Sstevel@tonic-gate #define PCLF_SECONDNAMESIZE 12 156*7c478bd9Sstevel@tonic-gate #define PCLF_THIRDNAMESIZE 4 157*7c478bd9Sstevel@tonic-gate 158*7c478bd9Sstevel@tonic-gate /* 159*7c478bd9Sstevel@tonic-gate * A long filename entry. It must match the 'pcdir' structure in size, 160*7c478bd9Sstevel@tonic-gate * and pcdl_attr must overlap pcd_attr. 161*7c478bd9Sstevel@tonic-gate */ 162*7c478bd9Sstevel@tonic-gate struct pcdir_lfn { 163*7c478bd9Sstevel@tonic-gate uchar_t pcdl_ordinal; /* lfn order. First is 01, next 02, */ 164*7c478bd9Sstevel@tonic-gate /* last has bit 7 (0x40) set */ 165*7c478bd9Sstevel@tonic-gate uchar_t pcdl_firstfilename[PCLF_FIRSTNAMESIZE]; 166*7c478bd9Sstevel@tonic-gate uchar_t pcdl_attr; 167*7c478bd9Sstevel@tonic-gate uchar_t pcdl_type; /* type - always contains 0 for an LFN entry */ 168*7c478bd9Sstevel@tonic-gate uchar_t pcdl_checksum; /* checksum to validate the LFN entry - */ 169*7c478bd9Sstevel@tonic-gate /* based on the short name */ 170*7c478bd9Sstevel@tonic-gate uchar_t pcdl_secondfilename[PCLF_SECONDNAMESIZE]; 171*7c478bd9Sstevel@tonic-gate pc_cluster16_t pcd_scluster; /* (not used, always 0) */ 172*7c478bd9Sstevel@tonic-gate uchar_t pcdl_thirdfilename[PCLF_THIRDNAMESIZE]; 173*7c478bd9Sstevel@tonic-gate }; 174*7c478bd9Sstevel@tonic-gate 175*7c478bd9Sstevel@tonic-gate #define PCDL_IS_LAST_LFN(x) ((x->pcdl_ordinal) & 0x40) 176*7c478bd9Sstevel@tonic-gate #define PCDL_LFN_BITS (PCA_RDONLY | PCA_HIDDEN | PCA_SYSTEM | PCA_LABEL) 177*7c478bd9Sstevel@tonic-gate #define PCDL_IS_LFN(x) (enable_long_filenames && \ 178*7c478bd9Sstevel@tonic-gate (((x)->pcd_attr & PCDL_LFN_BITS) == PCDL_LFN_BITS)) 179*7c478bd9Sstevel@tonic-gate 180*7c478bd9Sstevel@tonic-gate /* 181*7c478bd9Sstevel@tonic-gate * The first char of the file name has special meaning as follows: 182*7c478bd9Sstevel@tonic-gate */ 183*7c478bd9Sstevel@tonic-gate #define PCD_UNUSED ((char)0x00) /* entry has never been used */ 184*7c478bd9Sstevel@tonic-gate #define PCD_ERASED ((char)0xE5) /* entry was erased */ 185*7c478bd9Sstevel@tonic-gate 186*7c478bd9Sstevel@tonic-gate /* 187*7c478bd9Sstevel@tonic-gate * File attributes. 188*7c478bd9Sstevel@tonic-gate */ 189*7c478bd9Sstevel@tonic-gate #define PCA_RDONLY 0x01 /* file is read only */ 190*7c478bd9Sstevel@tonic-gate #define PCA_HIDDEN 0x02 /* file is hidden */ 191*7c478bd9Sstevel@tonic-gate #define PCA_SYSTEM 0x04 /* system file */ 192*7c478bd9Sstevel@tonic-gate #define PCA_LABEL 0x08 /* entry contains the volume label */ 193*7c478bd9Sstevel@tonic-gate #define PCA_DIR 0x10 /* subdirectory */ 194*7c478bd9Sstevel@tonic-gate #define PCA_ARCH 0x20 /* file has been modified since last backup */ 195*7c478bd9Sstevel@tonic-gate 196*7c478bd9Sstevel@tonic-gate /* 197*7c478bd9Sstevel@tonic-gate * Avoid hidden files unless the private variable is set. 198*7c478bd9Sstevel@tonic-gate * Always avoid the label. 199*7c478bd9Sstevel@tonic-gate */ 200*7c478bd9Sstevel@tonic-gate #define PCA_IS_HIDDEN(fsp, attr) \ 201*7c478bd9Sstevel@tonic-gate ((((attr) & PCA_LABEL) == PCA_LABEL) || \ 202*7c478bd9Sstevel@tonic-gate ((((fsp)->pcfs_flags & PCFS_HIDDEN) == 0) && \ 203*7c478bd9Sstevel@tonic-gate ((attr) & (PCA_HIDDEN | PCA_SYSTEM)))) 204*7c478bd9Sstevel@tonic-gate 205*7c478bd9Sstevel@tonic-gate #define PC_NAME_IS_DOT(namep) \ 206*7c478bd9Sstevel@tonic-gate (((namep)[0] == '.') && ((namep)[1] == '\0')) 207*7c478bd9Sstevel@tonic-gate #define PC_NAME_IS_DOTDOT(namep) \ 208*7c478bd9Sstevel@tonic-gate (((namep)[0] == '.') && ((namep)[1] == '.') && ((namep)[2] == '\0')) 209*7c478bd9Sstevel@tonic-gate #define PC_SHORTNAME_IS_DOT(namep) \ 210*7c478bd9Sstevel@tonic-gate (((namep)[0] == '.') && ((namep)[1] == ' ')) 211*7c478bd9Sstevel@tonic-gate #define PC_SHORTNAME_IS_DOTDOT(namep) \ 212*7c478bd9Sstevel@tonic-gate (((namep)[0] == '.') && ((namep)[1] == '.') && ((namep)[2] == ' ')) 213*7c478bd9Sstevel@tonic-gate /* 214*7c478bd9Sstevel@tonic-gate * slot structure is used by the directory search routine to return 215*7c478bd9Sstevel@tonic-gate * the results of the search. If the search is successful sl_blkno and 216*7c478bd9Sstevel@tonic-gate * sl_offset reflect the disk address of the entry and sl_ep points to 217*7c478bd9Sstevel@tonic-gate * the actual entry data in buffer sl_bp. sl_flags is set to whether the 218*7c478bd9Sstevel@tonic-gate * entry is dot or dotdot. If the search is unsuccessful sl_blkno and 219*7c478bd9Sstevel@tonic-gate * sl_offset points to an empty directory slot if there are any. Otherwise 220*7c478bd9Sstevel@tonic-gate * it is set to -1. 221*7c478bd9Sstevel@tonic-gate */ 222*7c478bd9Sstevel@tonic-gate struct slot { 223*7c478bd9Sstevel@tonic-gate enum {SL_NONE, SL_FOUND, SL_EXTEND} sl_status; /* slot status */ 224*7c478bd9Sstevel@tonic-gate daddr_t sl_blkno; /* disk block number which has entry */ 225*7c478bd9Sstevel@tonic-gate int sl_offset; /* offset of entry within block */ 226*7c478bd9Sstevel@tonic-gate struct buf *sl_bp; /* buffer containing entry data */ 227*7c478bd9Sstevel@tonic-gate struct pcdir *sl_ep; /* pointer to entry data */ 228*7c478bd9Sstevel@tonic-gate int sl_flags; /* flags (see below) */ 229*7c478bd9Sstevel@tonic-gate }; 230*7c478bd9Sstevel@tonic-gate #define SL_DOT 1 /* entry point to self */ 231*7c478bd9Sstevel@tonic-gate #define SL_DOTDOT 2 /* entry points to parent */ 232*7c478bd9Sstevel@tonic-gate 233*7c478bd9Sstevel@tonic-gate /* 234*7c478bd9Sstevel@tonic-gate * A pcfs directory entry. Directory entries are actually variable 235*7c478bd9Sstevel@tonic-gate * length, but this is the maximum size. 236*7c478bd9Sstevel@tonic-gate * 237*7c478bd9Sstevel@tonic-gate * This _must_ match a dirent64 structure in format. 238*7c478bd9Sstevel@tonic-gate */ 239*7c478bd9Sstevel@tonic-gate struct pc_dirent { 240*7c478bd9Sstevel@tonic-gate ino64_t d_ino; /* "inode number" of entry */ 241*7c478bd9Sstevel@tonic-gate off64_t d_off; /* offset of disk directory entry */ 242*7c478bd9Sstevel@tonic-gate unsigned short d_reclen; /* length of this record */ 243*7c478bd9Sstevel@tonic-gate char d_name[PCMAXNAMLEN + 1]; 244*7c478bd9Sstevel@tonic-gate }; 245*7c478bd9Sstevel@tonic-gate 246*7c478bd9Sstevel@tonic-gate #ifdef _KERNEL 247*7c478bd9Sstevel@tonic-gate 248*7c478bd9Sstevel@tonic-gate /* 249*7c478bd9Sstevel@tonic-gate * macros for converting to/from upper or lower case. 250*7c478bd9Sstevel@tonic-gate * users may give and get names in lower case, but they are stored on the 251*7c478bd9Sstevel@tonic-gate * disk in upper case to be PCDOS compatible 252*7c478bd9Sstevel@tonic-gate */ 253*7c478bd9Sstevel@tonic-gate #define toupper(C) (((C) >= 'a' && (C) <= 'z') ? (C) - 'a' + 'A' : (C)) 254*7c478bd9Sstevel@tonic-gate #define tolower(C) (((C) >= 'A' && (C) <= 'Z') ? (C) - 'A' + 'a' : (C)) 255*7c478bd9Sstevel@tonic-gate 256*7c478bd9Sstevel@tonic-gate extern void pc_tvtopct(timestruc_t *, struct pctime *); /* timeval to pctime */ 257*7c478bd9Sstevel@tonic-gate extern void pc_pcttotv(struct pctime *, timestruc_t *); /* pctime to timeval */ 258*7c478bd9Sstevel@tonic-gate extern int pc_validchar(char); /* valid filename ch */ 259*7c478bd9Sstevel@tonic-gate extern int pc_valid_lfn_char(char); /* valid long filename ch */ 260*7c478bd9Sstevel@tonic-gate 261*7c478bd9Sstevel@tonic-gate extern int pc_read_long_fn(struct vnode *, struct uio *, 262*7c478bd9Sstevel@tonic-gate struct pc_dirent *, struct pcdir **, offset_t *, struct buf **); 263*7c478bd9Sstevel@tonic-gate extern int pc_read_short_fn(struct vnode *, struct uio *, 264*7c478bd9Sstevel@tonic-gate struct pc_dirent *, struct pcdir **, offset_t *, struct buf **); 265*7c478bd9Sstevel@tonic-gate extern int pc_match_long_fn(struct pcnode *, char *, struct pcdir **, 266*7c478bd9Sstevel@tonic-gate struct slot *, offset_t *); 267*7c478bd9Sstevel@tonic-gate extern int pc_match_short_fn(struct pcnode *, char *, 268*7c478bd9Sstevel@tonic-gate struct pcdir **, struct slot *, offset_t *); 269*7c478bd9Sstevel@tonic-gate extern uchar_t pc_checksum_long_fn(char *, char *); 270*7c478bd9Sstevel@tonic-gate extern void set_long_fn_chunk(struct pcdir_lfn *, char *, int); 271*7c478bd9Sstevel@tonic-gate extern int pc_valid_long_fn(char *); 272*7c478bd9Sstevel@tonic-gate extern int pc_extract_long_fn(struct pcnode *, char *, 273*7c478bd9Sstevel@tonic-gate struct pcdir **, offset_t *offset, struct buf **); 274*7c478bd9Sstevel@tonic-gate extern int pc_fname_ext_to_name(char *, char *, char *, int); 275*7c478bd9Sstevel@tonic-gate 276*7c478bd9Sstevel@tonic-gate extern pc_cluster32_t pc_getstartcluster(struct pcfs *, struct pcdir *); 277*7c478bd9Sstevel@tonic-gate extern void pc_setstartcluster(struct pcfs *, struct pcdir *, pc_cluster32_t); 278*7c478bd9Sstevel@tonic-gate 279*7c478bd9Sstevel@tonic-gate /* 280*7c478bd9Sstevel@tonic-gate * Private tunables 281*7c478bd9Sstevel@tonic-gate */ 282*7c478bd9Sstevel@tonic-gate 283*7c478bd9Sstevel@tonic-gate /* 284*7c478bd9Sstevel@tonic-gate * Use long filenames (Windows 95). Disabling this causes pcfs 285*7c478bd9Sstevel@tonic-gate * to not recognize long filenames at all, which may cause it to 286*7c478bd9Sstevel@tonic-gate * break associations between the short and long names. This is likely 287*7c478bd9Sstevel@tonic-gate * to leave unused long filename entries in directories (which may make 288*7c478bd9Sstevel@tonic-gate * apparently empty directories unremovable), and would require a fsck_pcfs 289*7c478bd9Sstevel@tonic-gate * to find and fix (or a Windows utility like Norton Disk Doctor or 290*7c478bd9Sstevel@tonic-gate * Microsoft ScanDisk). 291*7c478bd9Sstevel@tonic-gate */ 292*7c478bd9Sstevel@tonic-gate extern int enable_long_filenames; /* default: on */ 293*7c478bd9Sstevel@tonic-gate 294*7c478bd9Sstevel@tonic-gate #endif 295*7c478bd9Sstevel@tonic-gate 296*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus 297*7c478bd9Sstevel@tonic-gate } 298*7c478bd9Sstevel@tonic-gate #endif 299*7c478bd9Sstevel@tonic-gate 300*7c478bd9Sstevel@tonic-gate #endif /* _SYS_FS_PC_DIR_H */ 301