44 |
|
|
45 |
#if (defined(SOLARIS) || defined (__hpux) || defined(__BEOS__)) |
#if (defined(SOLARIS) || defined (__hpux) || defined(__BEOS__)) |
46 |
#include <sys/statvfs.h> /* solaris statvfs */ |
#include <sys/statvfs.h> /* solaris statvfs */ |
47 |
#include <sys/mntent.h> |
/* TODO: Fix mntent-handling for solaris/hpux |
48 |
/* TODO: Fix mntent-handling for solaris */ |
* #include <sys/mntent.h> */ |
49 |
#undef HAVE_MNTENT_H |
#undef HAVE_MNTENT_H |
50 |
#define MNTENT_PATH "/etc/mnttab" |
#define MNTENT_PATH "/etc/mnttab" |
51 |
#define STATFS_FN(path, buf) (statvfs(path,buf)) |
#define STATFS_FN(path, buf) (statvfs(path,buf)) |
653 |
if (stat_fs.f_bsize * stat_fs.f_bfree < length) |
if (stat_fs.f_bsize * stat_fs.f_bfree < length) |
654 |
return STATUS_DISK_FULL; |
return STATUS_DISK_FULL; |
655 |
|
|
656 |
|
/* FIXME: Growing file with ftruncate doesn't |
657 |
|
work with Linux FAT fs */ |
658 |
if (ftruncate(handle, length) != 0) |
if (ftruncate(handle, length) != 0) |
659 |
{ |
{ |
660 |
perror("ftruncate"); |
perror("ftruncate"); |
820 |
|
|
821 |
switch (info_class) |
switch (info_class) |
822 |
{ |
{ |
823 |
case 3: //FIXME: Why 3? |
case FileBothDirectoryInformation: |
824 |
|
|
825 |
// If a search pattern is received, remember this pattern, and restart search |
// If a search pattern is received, remember this pattern, and restart search |
826 |
if (pattern[0] != 0) |
if (pattern[0] != 0) |
840 |
// Get information for directory entry |
// Get information for directory entry |
841 |
sprintf(fullpath, "%s/%s", dirname, pdirent->d_name); |
sprintf(fullpath, "%s/%s", dirname, pdirent->d_name); |
842 |
|
|
843 |
/* JIF |
/* JIF |
844 |
printf("Stat: %s\n", fullpath); */ |
printf("Stat: %s\n", fullpath); */ |
845 |
if (stat(fullpath, &fstat)) |
if (stat(fullpath, &fstat)) |
846 |
{ |
{ |
890 |
break; |
break; |
891 |
|
|
892 |
default: |
default: |
893 |
|
/* FIXME: Support FileDirectoryInformation, |
894 |
|
FileFullDirectoryInformation, and |
895 |
|
FileNamesInformation */ |
896 |
|
|
897 |
unimpl("IRP Query Directory sub: 0x%x\n", info_class); |
unimpl("IRP Query Directory sub: 0x%x\n", info_class); |
898 |
return STATUS_INVALID_PARAMETER; |
return STATUS_INVALID_PARAMETER; |