18 |
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
19 |
*/ |
*/ |
20 |
|
|
|
#include "rdesktop.h" |
|
21 |
#include "disk.h" |
#include "disk.h" |
22 |
|
|
23 |
#include <sys/types.h> |
#include <sys/types.h> |
27 |
#include <dirent.h> /* opendir, closedir, readdir */ |
#include <dirent.h> /* opendir, closedir, readdir */ |
28 |
#include <fnmatch.h> |
#include <fnmatch.h> |
29 |
#include <errno.h> /* errno */ |
#include <errno.h> /* errno */ |
30 |
|
#include <stdio.h> |
31 |
|
|
32 |
#include <utime.h> |
#include <utime.h> |
33 |
#include <time.h> /* ctime */ |
#include <time.h> /* ctime */ |
38 |
#define DIRFD(a) ((a)->DIR_FD_MEMBER_NAME) |
#define DIRFD(a) ((a)->DIR_FD_MEMBER_NAME) |
39 |
#endif |
#endif |
40 |
|
|
41 |
/* TODO: let autoconf figure out everything below... */ |
/* TODO: Fix mntent-handling for solaris |
42 |
#if (defined(sun) && (defined(__svr4__) || defined(__SVR4))) |
* #include <sys/mntent.h> */ |
43 |
#define SOLARIS |
#if (defined(HAVE_MNTENT_H) && defined(HAVE_SETMNTENT)) |
44 |
|
#include <mntent.h> |
45 |
|
#define MNTENT_PATH "/etc/mtab" |
46 |
|
#define USE_SETMNTENT |
47 |
#endif |
#endif |
48 |
|
|
49 |
#if (defined(SOLARIS) || defined (__hpux) || defined(__BEOS__)) |
#ifdef HAVE_SYS_VFS_H |
50 |
#include <sys/statvfs.h> /* solaris statvfs */ |
#include <sys/vfs.h> |
51 |
/* TODO: Fix mntent-handling for solaris/hpux |
#endif |
52 |
* #include <sys/mntent.h> */ |
|
53 |
#undef HAVE_MNTENT_H |
#ifdef HAVE_SYS_STATVFS_H |
54 |
#define MNTENT_PATH "/etc/mnttab" |
#include <sys/statvfs.h> |
55 |
#define STATFS_FN(path, buf) (statvfs(path,buf)) |
#endif |
|
#define STATFS_T statvfs |
|
|
#define F_NAMELEN(buf) ((buf).f_namemax) |
|
56 |
|
|
57 |
#elif (defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__APPLE__)) |
#ifdef HAVE_SYS_STATFS_H |
58 |
|
#include <sys/statfs.h> |
59 |
|
#endif |
60 |
|
|
61 |
|
#ifdef HAVE_SYS_PARAM_H |
62 |
#include <sys/param.h> |
#include <sys/param.h> |
63 |
|
#endif |
64 |
|
|
65 |
|
#ifdef HAVE_SYS_MOUNT_H |
66 |
#include <sys/mount.h> |
#include <sys/mount.h> |
67 |
#define STATFS_FN(path, buf) (statfs(path,buf)) |
#endif |
68 |
|
|
69 |
|
#include "rdesktop.h" |
70 |
|
|
71 |
|
#ifdef STAT_STATFS3_OSF1 |
72 |
|
#define STATFS_FN(path, buf) (statfs(path,buf,sizeof(buf))) |
73 |
#define STATFS_T statfs |
#define STATFS_T statfs |
74 |
#define F_NAMELEN(buf) (NAME_MAX) |
#define USE_STATFS |
75 |
|
#endif |
76 |
|
|
77 |
#elif (defined(__SGI_IRIX__)) |
#ifdef STAT_STATVFS |
|
#include <sys/types.h> |
|
|
#include <sys/statvfs.h> |
|
78 |
#define STATFS_FN(path, buf) (statvfs(path,buf)) |
#define STATFS_FN(path, buf) (statvfs(path,buf)) |
79 |
#define STATFS_T statvfs |
#define STATFS_T statvfs |
80 |
#define F_NAMELEN(buf) ((buf).f_namemax) |
#define USE_STATVFS |
81 |
|
#endif |
82 |
|
|
83 |
#elif (defined(__alpha) && !defined(linux)) |
#ifdef STAT_STATVFS64 |
84 |
#include <sys/mount.h> /* osf1 statfs */ |
#define STATFS_FN(path, buf) (statvfs64(path,buf)) |
85 |
#define STATFS_FN(path, buf) (statfs(path,buf,sizeof(buf))) |
#define STATFS_T statvfs64 |
86 |
#define STATFS_T statfs |
#define USE_STATVFS |
87 |
#define F_NAMELEN(buf) (255) |
#endif |
88 |
|
|
89 |
#else |
#if (defined(STAT_STATFS2_FS_DATA) || defined(STAT_STATFS2_BSIZE) || defined(STAT_STATFS2_FSIZE)) |
|
#include <sys/vfs.h> /* linux statfs */ |
|
|
#include <mntent.h> |
|
|
#define HAVE_MNTENT_H |
|
|
#define MNTENT_PATH "/etc/mtab" |
|
90 |
#define STATFS_FN(path, buf) (statfs(path,buf)) |
#define STATFS_FN(path, buf) (statfs(path,buf)) |
91 |
#define STATFS_T statfs |
#define STATFS_T statfs |
92 |
|
#define USE_STATFS |
93 |
|
#endif |
94 |
|
|
95 |
|
#ifdef STAT_STATFS4 |
96 |
|
#define STATFS_FN(path, buf) (statfs(path,buf,sizeof(buf),0)) |
97 |
|
#define STATFS_T statfs |
98 |
|
#define USE_STATFS |
99 |
|
#endif |
100 |
|
|
101 |
|
#if ((defined(USE_STATFS) && defined(HAVE_STRUCT_STATFS_F_NAMEMAX)) || (defined(USE_STATVFS) && defined(HAVE_STRUCT_STATVFS_F_NAMEMAX))) |
102 |
|
#define F_NAMELEN(buf) ((buf).f_namemax) |
103 |
|
#endif |
104 |
|
|
105 |
|
#if ((defined(USE_STATFS) && defined(HAVE_STRUCT_STATFS_F_NAMELEN)) || (defined(USE_STATVFS) && defined(HAVE_STRUCT_STATVFS_F_NAMELEN))) |
106 |
#define F_NAMELEN(buf) ((buf).f_namelen) |
#define F_NAMELEN(buf) ((buf).f_namelen) |
107 |
#endif |
#endif |
108 |
|
|
109 |
|
#ifndef F_NAMELEN |
110 |
|
#define F_NAMELEN(buf) (255) |
111 |
|
#endif |
112 |
|
|
113 |
|
/* Dummy statfs fallback */ |
114 |
|
#ifndef STATFS_T |
115 |
|
struct dummy_statfs_t |
116 |
|
{ |
117 |
|
long f_bfree; |
118 |
|
long f_bsize; |
119 |
|
long f_blocks; |
120 |
|
int f_namelen; |
121 |
|
int f_namemax; |
122 |
|
}; |
123 |
|
|
124 |
|
static int |
125 |
|
dummy_statfs(struct dummy_statfs_t *buf) |
126 |
|
{ |
127 |
|
buf->f_blocks = 262144; |
128 |
|
buf->f_bfree = 131072; |
129 |
|
buf->f_bsize = 512; |
130 |
|
buf->f_namelen = 255; |
131 |
|
buf->f_namemax = 255; |
132 |
|
|
133 |
|
return 0; |
134 |
|
} |
135 |
|
|
136 |
|
#define STATFS_T dummy_statfs_t |
137 |
|
#define STATFS_FN(path,buf) (dummy_statfs(buf)) |
138 |
|
#endif |
139 |
|
|
140 |
extern RDPDR_DEVICE g_rdpdr_device[]; |
extern RDPDR_DEVICE g_rdpdr_device[]; |
141 |
|
|
142 |
FILEINFO g_fileinfo[MAX_OPEN_FILES]; |
FILEINFO g_fileinfo[MAX_OPEN_FILES]; |
314 |
char *pos2; |
char *pos2; |
315 |
int count = 0; |
int count = 0; |
316 |
|
|
317 |
// skip the first colon |
/* skip the first colon */ |
318 |
optarg++; |
optarg++; |
319 |
while ((pos = next_arg(optarg, ',')) && *id < RDPDR_MAX_DEVICES) |
while ((pos = next_arg(optarg, ',')) && *id < RDPDR_MAX_DEVICES) |
320 |
{ |
{ |
360 |
{ |
{ |
361 |
case CREATE_ALWAYS: |
case CREATE_ALWAYS: |
362 |
|
|
363 |
// Delete existing file/link. |
/* Delete existing file/link. */ |
364 |
unlink(path); |
unlink(path); |
365 |
flags |= O_CREAT; |
flags |= O_CREAT; |
366 |
break; |
break; |
367 |
|
|
368 |
case CREATE_NEW: |
case CREATE_NEW: |
369 |
|
|
370 |
// If the file already exists, then fail. |
/* If the file already exists, then fail. */ |
371 |
flags |= O_CREAT | O_EXCL; |
flags |= O_CREAT | O_EXCL; |
372 |
break; |
break; |
373 |
|
|
374 |
case OPEN_ALWAYS: |
case OPEN_ALWAYS: |
375 |
|
|
376 |
// Create if not already exists. |
/* Create if not already exists. */ |
377 |
flags |= O_CREAT; |
flags |= O_CREAT; |
378 |
break; |
break; |
379 |
|
|
380 |
case OPEN_EXISTING: |
case OPEN_EXISTING: |
381 |
|
|
382 |
// Default behaviour |
/* Default behaviour */ |
383 |
break; |
break; |
384 |
|
|
385 |
case TRUNCATE_EXISTING: |
case TRUNCATE_EXISTING: |
386 |
|
|
387 |
// If the file does not exist, then fail. |
/* If the file does not exist, then fail. */ |
388 |
flags |= O_TRUNC; |
flags |= O_TRUNC; |
389 |
break; |
break; |
390 |
} |
} |
391 |
|
|
392 |
//printf("Open: \"%s\" flags: %X, accessmask: %X sharemode: %X create disp: %X\n", path, flags_and_attributes, accessmask, sharemode, create_disposition); |
/*printf("Open: \"%s\" flags: %X, accessmask: %X sharemode: %X create disp: %X\n", path, flags_and_attributes, accessmask, sharemode, create_disposition); */ |
393 |
|
|
394 |
// Get information about file and set that flag ourselfs |
/* Get information about file and set that flag ourselfs */ |
395 |
if ((stat(path, &filestat) == 0) && (S_ISDIR(filestat.st_mode))) |
if ((stat(path, &filestat) == 0) && (S_ISDIR(filestat.st_mode))) |
396 |
{ |
{ |
397 |
if (flags_and_attributes & FILE_NON_DIRECTORY_FILE) |
if (flags_and_attributes & FILE_NON_DIRECTORY_FILE) |
622 |
|
|
623 |
path = g_fileinfo[handle].path; |
path = g_fileinfo[handle].path; |
624 |
|
|
625 |
// Get information about file |
/* Get information about file */ |
626 |
if (fstat(handle, &filestat) != 0) |
if (fstat(handle, &filestat) != 0) |
627 |
{ |
{ |
628 |
perror("stat"); |
perror("stat"); |
630 |
return STATUS_ACCESS_DENIED; |
return STATUS_ACCESS_DENIED; |
631 |
} |
} |
632 |
|
|
633 |
// Set file attributes |
/* Set file attributes */ |
634 |
file_attributes = 0; |
file_attributes = 0; |
635 |
if (S_ISDIR(filestat.st_mode)) |
if (S_ISDIR(filestat.st_mode)) |
636 |
file_attributes |= FILE_ATTRIBUTE_DIRECTORY; |
file_attributes |= FILE_ATTRIBUTE_DIRECTORY; |
645 |
if (!(filestat.st_mode & S_IWUSR)) |
if (!(filestat.st_mode & S_IWUSR)) |
646 |
file_attributes |= FILE_ATTRIBUTE_READONLY; |
file_attributes |= FILE_ATTRIBUTE_READONLY; |
647 |
|
|
648 |
// Return requested data |
/* Return requested data */ |
649 |
switch (info_class) |
switch (info_class) |
650 |
{ |
{ |
651 |
case FileBasicInformation: |
case FileBasicInformation: |
652 |
seconds_since_1970_to_filetime(get_create_time(&filestat), &ft_high, |
seconds_since_1970_to_filetime(get_create_time(&filestat), &ft_high, |
653 |
&ft_low); |
&ft_low); |
654 |
out_uint32_le(out, ft_low); //create_access_time |
out_uint32_le(out, ft_low); /* create_access_time */ |
655 |
out_uint32_le(out, ft_high); |
out_uint32_le(out, ft_high); |
656 |
|
|
657 |
seconds_since_1970_to_filetime(filestat.st_atime, &ft_high, &ft_low); |
seconds_since_1970_to_filetime(filestat.st_atime, &ft_high, &ft_low); |
658 |
out_uint32_le(out, ft_low); //last_access_time |
out_uint32_le(out, ft_low); /* last_access_time */ |
659 |
out_uint32_le(out, ft_high); |
out_uint32_le(out, ft_high); |
660 |
|
|
661 |
seconds_since_1970_to_filetime(filestat.st_mtime, &ft_high, &ft_low); |
seconds_since_1970_to_filetime(filestat.st_mtime, &ft_high, &ft_low); |
662 |
out_uint32_le(out, ft_low); //last_write_time |
out_uint32_le(out, ft_low); /* last_write_time */ |
663 |
out_uint32_le(out, ft_high); |
out_uint32_le(out, ft_high); |
664 |
|
|
665 |
seconds_since_1970_to_filetime(filestat.st_ctime, &ft_high, &ft_low); |
seconds_since_1970_to_filetime(filestat.st_ctime, &ft_high, &ft_low); |
666 |
out_uint32_le(out, ft_low); //last_change_time |
out_uint32_le(out, ft_low); /* last_change_time */ |
667 |
out_uint32_le(out, ft_high); |
out_uint32_le(out, ft_high); |
668 |
|
|
669 |
out_uint32_le(out, file_attributes); |
out_uint32_le(out, file_attributes); |
671 |
|
|
672 |
case FileStandardInformation: |
case FileStandardInformation: |
673 |
|
|
674 |
out_uint32_le(out, filestat.st_size); //Allocation size |
out_uint32_le(out, filestat.st_size); /* Allocation size */ |
675 |
out_uint32_le(out, 0); |
out_uint32_le(out, 0); |
676 |
out_uint32_le(out, filestat.st_size); //End of file |
out_uint32_le(out, filestat.st_size); /* End of file */ |
677 |
out_uint32_le(out, 0); |
out_uint32_le(out, 0); |
678 |
out_uint32_le(out, filestat.st_nlink); //Number of links |
out_uint32_le(out, filestat.st_nlink); /* Number of links */ |
679 |
out_uint8(out, 0); //Delete pending |
out_uint8(out, 0); /* Delete pending */ |
680 |
out_uint8(out, S_ISDIR(filestat.st_mode) ? 1 : 0); //Directory |
out_uint8(out, S_ISDIR(filestat.st_mode) ? 1 : 0); /* Directory */ |
681 |
break; |
break; |
682 |
|
|
683 |
case FileObjectIdInformation: |
case FileObjectIdInformation: |
717 |
in_uint8s(in, 4); /* Handle of root dir? */ |
in_uint8s(in, 4); /* Handle of root dir? */ |
718 |
in_uint8s(in, 24); /* unknown */ |
in_uint8s(in, 24); /* unknown */ |
719 |
|
|
720 |
// CreationTime |
/* CreationTime */ |
721 |
in_uint32_le(in, ft_low); |
in_uint32_le(in, ft_low); |
722 |
in_uint32_le(in, ft_high); |
in_uint32_le(in, ft_high); |
723 |
|
|
724 |
// AccessTime |
/* AccessTime */ |
725 |
in_uint32_le(in, ft_low); |
in_uint32_le(in, ft_low); |
726 |
in_uint32_le(in, ft_high); |
in_uint32_le(in, ft_high); |
727 |
if (ft_low || ft_high) |
if (ft_low || ft_high) |
728 |
access_time = convert_1970_to_filetime(ft_high, ft_low); |
access_time = convert_1970_to_filetime(ft_high, ft_low); |
729 |
|
|
730 |
// WriteTime |
/* WriteTime */ |
731 |
in_uint32_le(in, ft_low); |
in_uint32_le(in, ft_low); |
732 |
in_uint32_le(in, ft_high); |
in_uint32_le(in, ft_high); |
733 |
if (ft_low || ft_high) |
if (ft_low || ft_high) |
734 |
write_time = convert_1970_to_filetime(ft_high, ft_low); |
write_time = convert_1970_to_filetime(ft_high, ft_low); |
735 |
|
|
736 |
// ChangeTime |
/* ChangeTime */ |
737 |
in_uint32_le(in, ft_low); |
in_uint32_le(in, ft_low); |
738 |
in_uint32_le(in, ft_high); |
in_uint32_le(in, ft_high); |
739 |
if (ft_low || ft_high) |
if (ft_low || ft_high) |
772 |
} |
} |
773 |
|
|
774 |
if (!file_attributes) |
if (!file_attributes) |
775 |
break; // not valid |
break; /* not valid */ |
776 |
|
|
777 |
mode = filestat.st_mode; |
mode = filestat.st_mode; |
778 |
|
|
889 |
|
|
890 |
if (memcmp(&pfinfo->notify, ¬ify, sizeof(NOTIFY))) |
if (memcmp(&pfinfo->notify, ¬ify, sizeof(NOTIFY))) |
891 |
{ |
{ |
892 |
//printf("disk_check_notify found changed event\n"); |
/*printf("disk_check_notify found changed event\n"); */ |
893 |
memcpy(&pfinfo->notify, ¬ify, sizeof(NOTIFY)); |
memcpy(&pfinfo->notify, ¬ify, sizeof(NOTIFY)); |
894 |
status = STATUS_NOTIFY_ENUM_DIR; |
status = STATUS_NOTIFY_ENUM_DIR; |
895 |
} |
} |
979 |
FsVolumeInfo(char *fpath) |
FsVolumeInfo(char *fpath) |
980 |
{ |
{ |
981 |
|
|
|
FILE *fdfs; |
|
982 |
static FsInfoType info; |
static FsInfoType info; |
983 |
#ifdef HAVE_MNTENT_H |
#ifdef USE_SETMNTENT |
984 |
|
FILE *fdfs; |
985 |
struct mntent *e; |
struct mntent *e; |
986 |
#endif |
#endif |
987 |
|
|
990 |
strcpy(info.label, "RDESKTOP"); |
strcpy(info.label, "RDESKTOP"); |
991 |
strcpy(info.type, "RDPFS"); |
strcpy(info.type, "RDPFS"); |
992 |
|
|
993 |
#ifdef HAVE_MNTENT_H |
#ifdef USE_SETMNTENT |
994 |
fdfs = setmntent(MNTENT_PATH, "r"); |
fdfs = setmntent(MNTENT_PATH, "r"); |
995 |
if (!fdfs) |
if (!fdfs) |
996 |
return &info; |
return &info; |
1024 |
read(fd, buf, sizeof(buf)); |
read(fd, buf, sizeof(buf)); |
1025 |
strncpy(info.label, buf + 41, 32); |
strncpy(info.label, buf + 41, 32); |
1026 |
info.label[32] = '\0'; |
info.label[32] = '\0'; |
1027 |
//info.Serial = (buf[128]<<24)+(buf[127]<<16)+(buf[126]<<8)+buf[125]; |
/* info.Serial = (buf[128]<<24)+(buf[127]<<16)+(buf[126]<<8)+buf[125]; */ |
1028 |
} |
} |
1029 |
close(fd); |
close(fd); |
1030 |
} |
} |
1127 |
{ |
{ |
1128 |
case FileBothDirectoryInformation: |
case FileBothDirectoryInformation: |
1129 |
|
|
1130 |
// If a search pattern is received, remember this pattern, and restart search |
/* If a search pattern is received, remember this pattern, and restart search */ |
1131 |
if (pattern[0] != 0) |
if (pattern[0] != 0) |
1132 |
{ |
{ |
1133 |
strncpy(pfinfo->pattern, 1 + strrchr(pattern, '/'), 64); |
strncpy(pfinfo->pattern, 1 + strrchr(pattern, '/'), 64); |
1134 |
rewinddir(pdir); |
rewinddir(pdir); |
1135 |
} |
} |
1136 |
|
|
1137 |
// find next dirent matching pattern |
/* find next dirent matching pattern */ |
1138 |
pdirent = readdir(pdir); |
pdirent = readdir(pdir); |
1139 |
while (pdirent && fnmatch(pfinfo->pattern, pdirent->d_name, 0) != 0) |
while (pdirent && fnmatch(pfinfo->pattern, pdirent->d_name, 0) != 0) |
1140 |
pdirent = readdir(pdir); |
pdirent = readdir(pdir); |
1142 |
if (pdirent == NULL) |
if (pdirent == NULL) |
1143 |
return STATUS_NO_MORE_FILES; |
return STATUS_NO_MORE_FILES; |
1144 |
|
|
1145 |
// Get information for directory entry |
/* Get information for directory entry */ |
1146 |
sprintf(fullpath, "%s/%s", dirname, pdirent->d_name); |
sprintf(fullpath, "%s/%s", dirname, pdirent->d_name); |
1147 |
|
|
1148 |
if (stat(fullpath, &fstat)) |
if (stat(fullpath, &fstat)) |
1173 |
if (!(fstat.st_mode & S_IWUSR)) |
if (!(fstat.st_mode & S_IWUSR)) |
1174 |
file_attributes |= FILE_ATTRIBUTE_READONLY; |
file_attributes |= FILE_ATTRIBUTE_READONLY; |
1175 |
|
|
1176 |
// Return requested information |
/* Return requested information */ |
1177 |
out_uint8s(out, 8); //unknown zero |
out_uint8s(out, 8); /* unknown zero */ |
1178 |
|
|
1179 |
seconds_since_1970_to_filetime(get_create_time(&fstat), &ft_high, &ft_low); |
seconds_since_1970_to_filetime(get_create_time(&fstat), &ft_high, &ft_low); |
1180 |
out_uint32_le(out, ft_low); // create time |
out_uint32_le(out, ft_low); /* create time */ |
1181 |
out_uint32_le(out, ft_high); |
out_uint32_le(out, ft_high); |
1182 |
|
|
1183 |
seconds_since_1970_to_filetime(fstat.st_atime, &ft_high, &ft_low); |
seconds_since_1970_to_filetime(fstat.st_atime, &ft_high, &ft_low); |
1184 |
out_uint32_le(out, ft_low); //last_access_time |
out_uint32_le(out, ft_low); /* last_access_time */ |
1185 |
out_uint32_le(out, ft_high); |
out_uint32_le(out, ft_high); |
1186 |
|
|
1187 |
seconds_since_1970_to_filetime(fstat.st_mtime, &ft_high, &ft_low); |
seconds_since_1970_to_filetime(fstat.st_mtime, &ft_high, &ft_low); |
1188 |
out_uint32_le(out, ft_low); //last_write_time |
out_uint32_le(out, ft_low); /* last_write_time */ |
1189 |
out_uint32_le(out, ft_high); |
out_uint32_le(out, ft_high); |
1190 |
|
|
1191 |
seconds_since_1970_to_filetime(fstat.st_ctime, &ft_high, &ft_low); |
seconds_since_1970_to_filetime(fstat.st_ctime, &ft_high, &ft_low); |
1192 |
out_uint32_le(out, ft_low); //change_write_time |
out_uint32_le(out, ft_low); /* change_write_time */ |
1193 |
out_uint32_le(out, ft_high); |
out_uint32_le(out, ft_high); |
1194 |
|
|
1195 |
out_uint32_le(out, fstat.st_size); //filesize low |
out_uint32_le(out, fstat.st_size); /* filesize low */ |
1196 |
out_uint32_le(out, 0); //filesize high |
out_uint32_le(out, 0); /* filesize high */ |
1197 |
out_uint32_le(out, fstat.st_size); //filesize low |
out_uint32_le(out, fstat.st_size); /* filesize low */ |
1198 |
out_uint32_le(out, 0); //filesize high |
out_uint32_le(out, 0); /* filesize high */ |
1199 |
out_uint32_le(out, file_attributes); |
out_uint32_le(out, file_attributes); |
1200 |
out_uint8(out, 2 * strlen(pdirent->d_name) + 2); //unicode length |
out_uint8(out, 2 * strlen(pdirent->d_name) + 2); /* unicode length */ |
1201 |
out_uint8s(out, 7); //pad? |
out_uint8s(out, 7); /* pad? */ |
1202 |
out_uint8(out, 0); //8.3 file length |
out_uint8(out, 0); /* 8.3 file length */ |
1203 |
out_uint8s(out, 2 * 12); //8.3 unicode length |
out_uint8s(out, 2 * 12); /* 8.3 unicode length */ |
1204 |
rdp_out_unistr(out, pdirent->d_name, 2 * strlen(pdirent->d_name)); |
rdp_out_unistr(out, pdirent->d_name, 2 * strlen(pdirent->d_name)); |
1205 |
break; |
break; |
1206 |
|
|
1232 |
|
|
1233 |
switch (request) |
switch (request) |
1234 |
{ |
{ |
1235 |
case 25: // ? |
case 25: /* ? */ |
1236 |
case 42: // ? |
case 42: /* ? */ |
1237 |
default: |
default: |
1238 |
unimpl("DISK IOCTL %d\n", request); |
unimpl("DISK IOCTL %d\n", request); |
1239 |
return STATUS_INVALID_PARAMETER; |
return STATUS_INVALID_PARAMETER; |