Date: Wed, 2 Jul 2003 16:23:00 +0400 From: "Andrey Sverdlichenko" <blaze@infosec.ru> To: <freebsd-stable@freebsd.org> Subject: msdosfs bug? Message-ID: <2098E9F95A6DFA4D8FE8B6BE30B62E087C187A@nt_server.infosec.ru>
next in thread | raw e-mail | index | archive | help
Hello.
After running this program with msdosfs mounted in /mnt, I got a
file with some garbage in skipped space. Is it a bug in my local
installation/hardware or real kernel bug?
FreeBSD xen.infosec.ru 4.8-RELEASE FreeBSD 4.8-RELEASE #0: Thu Apr 17
16:53:27 MSD 2003 root@xen.infosec.ru:/usr/src/sys/compile/XEN i386
#include <fcntl.h>
#include <unistd.h>
int
main(void) {
char buf[100] = "placeholder";
off_t pos;
int handle = open("/mnt/foo", O_RDWR | O_CREAT | O_TRUNC, 0664);
if (handle == -1)
return 1;
pos = lseek(handle, 1024 * 16 - 100, SEEK_SET);
if (pos != 1024 * 16 - 100)
return 1;
if (write(handle, buf, 100) != 100)
return 1;
if (close(handle))
return 1;
return 0;
}
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2098E9F95A6DFA4D8FE8B6BE30B62E087C187A>
