linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Peter J. Braam" <braam@clusterfilesystem.com>
To: <dafs-discussions@yahoogroups.com>,
	<linux-fsdevel@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: DAFS SDK
Date: Thu, 28 Jun 2001 11:38:45 -0600 (MDT)	[thread overview]
Message-ID: <Pine.LNX.4.33.0106281129010.17056-200000@lustre.clusterfilesystem.com> (raw)

[-- Attachment #1: Type: TEXT/PLAIN, Size: 915 bytes --]

Hi,

I have made available RPM packages of the DAFS sdk v 0.8.  You can find
them at:

ftp://ftp.clusterfs.com/pub/lustre/RPMS

I made a few patches, some to compile cleanly and others to provide a
header file structure that is usable in both user and kernel mode.

I have attached the patch - could it perhaps go into the main DAFS SDK
tree?  Would you like to include the spec file as well?

The DAFS stub generator is amazingly well designed and one can use that
with just the dafs-sdk in user and kernel mode.

To build the dafs library, which provides networking support too, one
needs a VIA library. I have also built some Linux 2.4.5 kernel RPMS with
the M-VIA libraries included.  You find these in the same place. (These
kernels also include also have pcmcia, ext3 0.0.8, InterMezzo, and -ac17
kernel patches.)

Please read the disclaimers and enjoy!

- Peter J. Braam -

http://www.clusterfilesystems.com

[-- Attachment #2: dafs-sdk-0.8.patch --]
[-- Type: TEXT/PLAIN, Size: 4741 bytes --]

diff -uNr sdk/dafsgen/rpc_main.c sdk-new/dafsgen/rpc_main.c
--- sdk/dafsgen/rpc_main.c	Mon Jun 11 14:41:25 2001
+++ sdk-new/dafsgen/rpc_main.c	Thu Jun 28 10:29:38 2001
@@ -424,6 +424,7 @@
 	add_warning();
 
 	f_print(fout, "#ifndef DAFS_KERNEL\n");	
+	f_print(fout, "#include <string.h>\n");
 	f_print(fout, "#include <stddef.h>\n");
 	f_print(fout, "#include <stdlib.h>\n");
 	f_print(fout, "#else /* DAFS_KERNEL */\n");
diff -uNr sdk/dts/dts_sup.c sdk-new/dts/dts_sup.c
--- sdk/dts/dts_sup.c	Mon Jun 11 14:07:35 2001
+++ sdk-new/dts/dts_sup.c	Thu Jun 28 10:29:38 2001
@@ -4,6 +4,7 @@
 #include <pthread.h>
 #include <stdio.h>
 #include <string.h>
+#include <stdlib.h>
 #include <unistd.h>
 
 void *f_read(void *temp)
@@ -63,7 +64,7 @@
 
 printf("\nEnter the name of fifo for i/p to main dts>");
 gets(i_line);
-if(*i_line != NULL){
+if(*i_line != 0){
 if(mkfifo(i_line, S_IRWXU | S_IRWXG | S_IRWXO) != 0){
 	printf("\nError in creating fifo");
 	exit(0);
@@ -72,7 +73,7 @@
 }
 printf("\nEnter the name of fifo for receiving o/p from main dts>");
 gets(o_line);
-if(*o_line != NULL){
+if(*o_line != 0){
 if(mkfifo(o_line, S_IRWXU | S_IRWXO | S_IRWXG) != 0){
         printf("\nError in creating fifo");
         exit(0);
diff -uNr sdk/lib/dafslib.c sdk-new/lib/dafslib.c
--- sdk/lib/dafslib.c	Mon Jun 11 14:07:39 2001
+++ sdk-new/lib/dafslib.c	Thu Jun 28 10:29:38 2001
@@ -30,6 +30,7 @@
 /* dafslib.c - internal library utility routines, mostly the pool
    allocator and locking abstractions */
 
+#include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
 
diff -uNr sdk/lib/vi.c sdk-new/lib/vi.c
--- sdk/lib/vi.c	Mon Jun 11 14:07:39 2001
+++ sdk-new/lib/vi.c	Thu Jun 28 10:29:38 2001
@@ -29,6 +29,9 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#ifdef __linux__
+#include <string.h>
+#endif
 #ifdef WIN32
 #define strdup(filename) _strdup(filename)
 #define usleep(duration) Sleep(duration)
diff -uNr sdk/makefile.config sdk-new/makefile.config
--- sdk/makefile.config	Mon Jun 11 14:07:00 2001
+++ sdk-new/makefile.config	Thu Jun 28 10:29:38 2001
@@ -9,7 +9,7 @@
 
 # edit as needed
 
-PLATFORM=	suncc
+PLATFORM=	linux
 
 VIPL_INCLUDE= ${SDK_BASE}/../../vipl
 VIPL_LIB= -L${SDK_BASE}/../../vipl -Wl,-R/opt/Troika/lib
diff -uNr sdk/mk/makefile.linux sdk-new/mk/makefile.linux
--- sdk/mk/makefile.linux	Mon Jun 11 14:07:40 2001
+++ sdk-new/mk/makefile.linux	Thu Jun 28 10:29:38 2001
@@ -1,7 +1,7 @@
 CC=		gcc
 LINK=		gcc
 AR=		ar
-CFLAGS=		-Wall -Werror -Wpointer-arith -g -DVIPL095
+CFLAGS=		-Wall -Werror -Wpointer-arith -g -D_REENTRANT
 LINKFLAGS=	-g -o $@ 
 LDFLAGS=	-L$(SDK_BASE)/lib -lpthread
 ARFLAGS=	-ruv $@
diff -uNr sdk/platform/linux/dafs_kernel_platform.h sdk-new/platform/linux/dafs_kernel_platform.h
--- sdk/platform/linux/dafs_kernel_platform.h	Wed Dec 31 17:00:00 1969
+++ sdk-new/platform/linux/dafs_kernel_platform.h	Thu Jun 28 10:48:17 2001
@@ -0,0 +1,14 @@
+/* dafs_kernel_platform.h - SOLARIS */
+#ifndef _DAFS_KERNEL_PLATFORM_H
+#define _DAFS_KERNEL_PLATFORM_H
+
+#include <linux/malloc.h>
+#include <linux/kernel.h>
+
+#ifndef NULL
+#define NULL ((void *) 0)
+#endif /* NULL */
+
+#define malloc(len) kmalloc(len, GFP_KERNEL)
+
+#endif /* _DAFS_KERNEL_PLATFORM_H */
diff -uNr sdk/platform/linux/dafs_kernel_platform.h~ sdk-new/platform/linux/dafs_kernel_platform.h~
--- sdk/platform/linux/dafs_kernel_platform.h~	Wed Dec 31 17:00:00 1969
+++ sdk-new/platform/linux/dafs_kernel_platform.h~	Thu Jun 28 10:45:41 2001
@@ -0,0 +1,22 @@
+/* dafs_kernel_platform.h - SOLARIS */
+#ifndef _DAFS_KERNEL_PLATFORM_H
+#define _DAFS_KERNEL_PLATFORM_H
+
+#ifndef NULL
+#define NULL ((void *) 0)
+#endif /* NULL */
+
+/*
+**	SDK functions called from the kernel should allocate space
+**	first, rather than passing in NULL pointers and waiting for
+**	the SDK to do it for them.  Since the SDK does not check for
+**	allocation failure, we panic here.  It's ugly, but
+**	until the SDK either checks for malloc errors or rejects
+**	requests that require allocation, this is what we're doing.
+**	RSB 1/3/01
+*/
+#define malloc(size) NULL
+#define memset(s, NA, size) bzero(s, size)
+#define memcpy(s1, s2, size) bcopy(s2, s1, size)
+
+#endif /* _DAFS_KERNEL_PLATFORM_H */
diff -uNr sdk/platform/linux/dafs_platform.h sdk-new/platform/linux/dafs_platform.h
--- sdk/platform/linux/dafs_platform.h	Mon Jun 11 14:07:40 2001
+++ sdk-new/platform/linux/dafs_platform.h	Thu Jun 28 10:30:49 2001
@@ -1,6 +1,10 @@
 /* dafs_platform.h - LINUX */
 
+#ifndef __KERNEL__
 #include <inttypes.h>
+#else
+#include <linux/types.h>
+#endif
 
 typedef int8_t dafs_int8;
 typedef int16_t dafs_int16;

                 reply	other threads:[~2001-06-28 17:38 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.33.0106281129010.17056-200000@lustre.clusterfilesystem.com \
    --to=braam@clusterfilesystem.com \
    --cc=dafs-discussions@yahoogroups.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).