18 |
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
19 |
*/ |
*/ |
20 |
|
|
21 |
|
#include "rdesktop.h" |
22 |
#include "disk.h" |
#include "disk.h" |
23 |
|
|
24 |
#include <sys/types.h> |
#include <sys/types.h> |
67 |
#define STATFS_T statvfs |
#define STATFS_T statvfs |
68 |
#define F_NAMELEN(buf) ((buf).f_namemax) |
#define F_NAMELEN(buf) ((buf).f_namemax) |
69 |
|
|
70 |
|
#elif (defined(__alpha) && !defined(linux)) |
71 |
|
#include <sys/mount.h> /* osf1 statfs */ |
72 |
|
#define STATFS_FN(path, buf) (statfs(path,buf,sizeof(buf))) |
73 |
|
#define STATFS_T statfs |
74 |
|
#define F_NAMELEN(buf) (255) |
75 |
|
|
76 |
#else |
#else |
77 |
#include <sys/vfs.h> /* linux statfs */ |
#include <sys/vfs.h> /* linux statfs */ |
78 |
#include <mntent.h> |
#include <mntent.h> |
83 |
#define F_NAMELEN(buf) ((buf).f_namelen) |
#define F_NAMELEN(buf) ((buf).f_namelen) |
84 |
#endif |
#endif |
85 |
|
|
|
#include "rdesktop.h" |
|
|
|
|
86 |
extern RDPDR_DEVICE g_rdpdr_device[]; |
extern RDPDR_DEVICE g_rdpdr_device[]; |
87 |
|
|
88 |
FILEINFO g_fileinfo[MAX_OPEN_FILES]; |
FILEINFO g_fileinfo[MAX_OPEN_FILES]; |
266 |
{ |
{ |
267 |
pos2 = next_arg(optarg, '='); |
pos2 = next_arg(optarg, '='); |
268 |
|
|
269 |
strncpy(g_rdpdr_device[*id].name, optarg, sizeof(g_rdpdr_device[*id].name)); |
strncpy(g_rdpdr_device[*id].name, optarg, sizeof(g_rdpdr_device[*id].name)-1); |
270 |
if (strlen(optarg) > 8) |
if (strlen(optarg) > (sizeof(g_rdpdr_device[*id].name)-1)) |
271 |
fprintf(stderr, "share name %s truncated to %s\n", optarg, |
fprintf(stderr, "share name %s truncated to %s\n", optarg, |
272 |
g_rdpdr_device[*id].name); |
g_rdpdr_device[*id].name); |
273 |
|
|