37 lines
1.2 KiB
Plaintext
37 lines
1.2 KiB
Plaintext
$OpenBSD: patch-source_linux_MInstanceInfo_cc,v 1.3 2007/10/23 13:45:22 wilfried Exp $
|
|
--- source/linux/MInstanceInfo.cc.orig Fri Apr 27 19:48:04 2007
|
|
+++ source/linux/MInstanceInfo.cc Tue Oct 23 12:11:27 2007
|
|
@@ -889,6 +889,8 @@ static bool do_get_info(MInstanceInfo::FilesystemInfo
|
|
|
|
#if defined(hpux) || defined(__hpux)
|
|
# define FSTAB_FILE "/etc/mnttab"
|
|
+#elif defined(__OpenBSD__)
|
|
+# define FSTAB_FILE "/etc/fstab"
|
|
#else
|
|
# define FSTAB_FILE "/etc/mtab"
|
|
#endif
|
|
@@ -908,14 +910,6 @@ static bool do_get_info(MInstanceInfo::FilesystemInfo
|
|
info.free= (long long)fs.f_bsize * fs.f_bavail;
|
|
|
|
info.type= "unknown";
|
|
- for (unsigned int i= 0; i < sizeof(fstypes)/sizeof(FSType); i++)
|
|
- {
|
|
- if (fstypes[i].id == fs.f_type)
|
|
- {
|
|
- info.type= fstypes[i].name;
|
|
- break;
|
|
- }
|
|
- }
|
|
return true;
|
|
}
|
|
|
|
@@ -1124,7 +1118,7 @@ Glib::ustring MInstanceInfo::fetch_logs_from_mark()
|
|
char *buffer= (char*)g_malloc(diff+1);
|
|
int fd= open(path.c_str(), O_RDONLY);
|
|
|
|
- lseek64(fd, _log_file_pos, SEEK_SET);
|
|
+ lseek(fd, _log_file_pos, SEEK_SET);
|
|
if ((len= read(fd, buffer, diff)) < 0)
|
|
{
|
|
close(fd);
|