/[rdesktop]/sourceforge.net/trunk/rdesktop/disk.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /sourceforge.net/trunk/rdesktop/disk.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 875 by stargo, Sat Apr 2 17:49:56 2005 UTC revision 978 by stargo, Mon Aug 15 11:44:35 2005 UTC
# Line 27  Line 27 
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 */
# Line 120  struct dummy_statfs_t Line 121  struct dummy_statfs_t
121          int f_namemax;          int f_namemax;
122  };  };
123    
124  int dummy_statfs(struct dummy_statfs_t *buf)  static int
125    dummy_statfs(struct dummy_statfs_t *buf)
126  {  {
127          buf->f_blocks=262144;          buf->f_blocks = 262144;
128          buf->f_bfree=131072;          buf->f_bfree = 131072;
129          buf->f_bsize=512;          buf->f_bsize = 512;
130          buf->f_namelen=255;          buf->f_namelen = 255;
131          buf->f_namemax=255;          buf->f_namemax = 255;
132    
133          return 0;          return 0;
134  }  }
# Line 142  BOOL g_notify_stamp = False; Line 144  BOOL g_notify_stamp = False;
144    
145  typedef struct  typedef struct
146  {  {
147          char name[256];          char name[PATH_MAX];
148          char label[256];          char label[PATH_MAX];
149          unsigned long serial;          unsigned long serial;
150          char type[256];          char type[PATH_MAX];
151  } FsInfoType;  } FsInfoType;
152    
153  static NTSTATUS NotifyInfo(NTHANDLE handle, uint32 info_class, NOTIFY * p);  static NTSTATUS NotifyInfo(NTHANDLE handle, uint32 info_class, NOTIFY * p);
# Line 342  disk_create(uint32 device_id, uint32 acc Line 344  disk_create(uint32 device_id, uint32 acc
344          NTHANDLE handle;          NTHANDLE handle;
345          DIR *dirp;          DIR *dirp;
346          int flags, mode;          int flags, mode;
347          char path[256];          char path[PATH_MAX];
348          struct stat filestat;          struct stat filestat;
349    
350          handle = 0;          handle = 0;
# Line 489  disk_create(uint32 device_id, uint32 acc Line 491  disk_create(uint32 device_id, uint32 acc
491          g_fileinfo[handle].device_id = device_id;          g_fileinfo[handle].device_id = device_id;
492          g_fileinfo[handle].flags_and_attributes = flags_and_attributes;          g_fileinfo[handle].flags_and_attributes = flags_and_attributes;
493          g_fileinfo[handle].accessmask = accessmask;          g_fileinfo[handle].accessmask = accessmask;
494          strncpy(g_fileinfo[handle].path, path, 255);          strncpy(g_fileinfo[handle].path, path, PATH_MAX-1);
495          g_fileinfo[handle].delete_on_close = False;          g_fileinfo[handle].delete_on_close = False;
496          g_notify_stamp = True;          g_notify_stamp = True;
497    
# Line 696  NTSTATUS Line 698  NTSTATUS
698  disk_set_information(NTHANDLE handle, uint32 info_class, STREAM in, STREAM out)  disk_set_information(NTHANDLE handle, uint32 info_class, STREAM in, STREAM out)
699  {  {
700          uint32 length, file_attributes, ft_high, ft_low, delete_on_close;          uint32 length, file_attributes, ft_high, ft_low, delete_on_close;
701          char newname[256], fullpath[256];          char newname[PATH_MAX], fullpath[PATH_MAX];
702          struct fileinfo *pfinfo;          struct fileinfo *pfinfo;
703          int mode;          int mode;
704          struct stat filestat;          struct stat filestat;
# Line 1110  NTSTATUS Line 1112  NTSTATUS
1112  disk_query_directory(NTHANDLE handle, uint32 info_class, char *pattern, STREAM out)  disk_query_directory(NTHANDLE handle, uint32 info_class, char *pattern, STREAM out)
1113  {  {
1114          uint32 file_attributes, ft_low, ft_high;          uint32 file_attributes, ft_low, ft_high;
1115          char *dirname, fullpath[256];          char *dirname, fullpath[PATH_MAX];
1116          DIR *pdir;          DIR *pdir;
1117          struct dirent *pdirent;          struct dirent *pdirent;
1118          struct stat fstat;          struct stat fstat;
# Line 1128  disk_query_directory(NTHANDLE handle, ui Line 1130  disk_query_directory(NTHANDLE handle, ui
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, '/'), PATH_MAX-1);
1134                                  rewinddir(pdir);                                  rewinddir(pdir);
1135                          }                          }
1136    

Legend:
Removed from v.875  
changed lines
  Added in v.978

  ViewVC Help
Powered by ViewVC 1.1.26