Lines 19-25
Link Here
|
19 |
#include <fcntl.h> |
19 |
#include <fcntl.h> |
20 |
|
20 |
|
21 |
#ifndef Solaris // we'll need to define Solaris |
21 |
#ifndef Solaris // we'll need to define Solaris |
22 |
#include <fstab.h> // there's no fstab.h on Solaris... |
22 |
#include <mntent.h> // not sure if mntent.h is on Solaris... |
23 |
#else |
23 |
#else |
24 |
#include <sys/vfstab.h> //...but vfstab.h |
24 |
#include <sys/vfstab.h> //...but vfstab.h |
25 |
#endif |
25 |
#endif |
Lines 82-98
Link Here
|
82 |
|
82 |
|
83 |
// We start by looking the mounttab: |
83 |
// We start by looking the mounttab: |
84 |
|
84 |
|
85 |
#ifdef Solaris |
|
|
86 |
FILE *f_mnttab = fopen("/etc/mnttab", "r"); |
85 |
FILE *f_mnttab = fopen("/etc/mnttab", "r"); |
|
|
86 |
#ifdef Solaris |
87 |
vfstab *mount_file; |
87 |
vfstab *mount_file; |
88 |
getvfsent(f_mnttab, mount_file); |
88 |
getvfsent(f_mnttab, mount_file); |
89 |
#else |
89 |
#else |
90 |
fstab *mount_file = getfsent(); |
90 |
mntent *mount_file = getmntent(f_mnttab); |
91 |
#endif |
91 |
#endif |
92 |
while(mount_file != NULL) |
92 |
while(mount_file != NULL) |
93 |
{ |
93 |
{ |
94 |
#ifndef Solaris |
94 |
#ifndef Solaris |
95 |
if(strncmp(mount_file->fs_vfstype,"iso9660",7)==0) |
95 |
if(strncmp(mount_file->mnt_type,"iso9660",7)==0) |
96 |
#else |
96 |
#else |
97 |
if(strncmp(mount_file->vfs_fstype,"iso9660",7)==0) // ugly code... suggestions ? |
97 |
if(strncmp(mount_file->vfs_fstype,"iso9660",7)==0) // ugly code... suggestions ? |
98 |
#endif |
98 |
#endif |
Lines 100-106
Link Here
|
100 |
try |
100 |
try |
101 |
{ |
101 |
{ |
102 |
#ifndef Solaris |
102 |
#ifndef Solaris |
103 |
CL_CDAudio::cd_drives.push_back(new CL_CDDrive_Linux(mount_file->fs_spec)); |
103 |
CL_CDAudio::cd_drives.push_back(new CL_CDDrive_Linux(mount_file->mnt_fsname)); |
104 |
#else |
104 |
#else |
105 |
CL_CDAudio::cd_drives.push_back(new CL_CDDrive_Linux(mount_file->vfs_special)); |
105 |
CL_CDAudio::cd_drives.push_back(new CL_CDDrive_Linux(mount_file->vfs_special)); |
106 |
#endif |
106 |
#endif |
Lines 112-125
Link Here
|
112 |
} |
112 |
} |
113 |
} |
113 |
} |
114 |
#ifndef Solaris |
114 |
#ifndef Solaris |
115 |
mount_file = getfsent(); |
115 |
mount_file = getmntent(f_mnttab); |
116 |
#else |
116 |
#else |
117 |
getvfsent(f_mnttab, mount_file); |
117 |
getvfsent(f_mnttab, mount_file); |
118 |
#endif |
118 |
#endif |
119 |
// cout << mount_file->fs_vfstype << endl; |
119 |
// cout << mount_file->fs_vfstype << endl; |
120 |
} |
120 |
} |
121 |
#ifndef Solaris |
121 |
#ifndef Solaris |
122 |
endfsent(); |
122 |
endmntent(f_mnttab); |
123 |
#else |
123 |
#else |
124 |
fclose(f_mnttab); |
124 |
fclose(f_mnttab); |
125 |
#endif |
125 |
#endif |