[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[FDclone-users:00693] Re: 2.09c + 00691 のパッチ結果報告:起動可能、 FAT32 HDD での DOSDRIVE 機能せず



 しらいです。

In Message-Id <070403004230.M0107924@mix.syd.odn.ne.jp>
        <hma@syd.odn.ne.jp>さんwrites:
> 濱崎です。

> [FDclone-users:00691]のパッチを当てて 2.09c をビルドしたものを試しました。

 因みに OS 環境は何でしょうか?そもそも素の 2.09c では動い
ていたんですね?
 出来れば他の Linux でも、特に Fedora Core 6 の環境で試して
欲しいところです。結構メジャーな distribution だと思うんです
が、どこかに転がってはいませんか?


> 3. 2GB 以上の FAT32 HDD への DOSDRIVE アクセスは機能しませんでした。
> 今、手元に試した環境がないので正確なメッセージか思い出せません。

 困りましたねー。じゃあ最近の Linux では 2GB 超の lseek(2)
はどう扱えと言うんでしょうか。だとすると、syscall(2) を使っ
てこんな感じではどうでしょう?

# そもそも使えない用法を llseek(2) の man page に載せてる
#時点でおかしい。man page が信用出来なきゃ一体何を参照した
#ら良いのやら。

---- Cut Here ----
diff -u ../old/FD-2.09c/dosdisk.c ./dosdisk.c
--- ../old/FD-2.09c/dosdisk.c	Wed Jan 17 00:00:00 2007
+++ ./dosdisk.c	Tue Apr  3 02:30:54 2007
@@ -87,13 +87,7 @@
 #ifdef	LINUX
 #include <mntent.h>
 #include <sys/mount.h>
-# ifdef	USELLSEEK
-# define	__KERNEL__	/* For _syscall5() on Linux kernel >=2.6.18 */
-# endif
 #include <linux/unistd.h>
-# ifdef	USELLSEEK
-# undef	__KERNEL__
-# endif
 # ifndef	BLKFLSBUF
 # include <linux/fs.h>
 # endif
@@ -102,6 +96,11 @@
 # endif
 #endif	/* LINUX */
 
+#if	defined (USELLSEEK) && !defined (_syscall5)
+#include <sys/syscall.h>
+#define	_llseek(f,h,l,r,w)	syscall(SYS__llseek, f, h, l, r, w)
+#endif
+
 #ifdef	NOERRNO
 extern int errno;
 #endif
@@ -1082,12 +1081,15 @@
 #endif	/* !FD */
 
 #ifdef	USELLSEEK
+# ifdef	_syscall5
+# undef	_llseek
 static _syscall5(int, _llseek,
 	u_int, fd,
 	u_long, ofs_h,
 	u_long, ofs_l,
 	l_off_t *, result,
 	u_int, whence);
+# endif
 
 static l_off_t NEAR Xllseek(fd, offset, whence)
 int fd;
---- Cut Here ----

                                               しらい たかし