Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 42505 Details for
Bug 62502
net-fs/davfs2-0.2.2 does not compile because of kernel headers
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to make davfs build against 2.6
davfs2-2.6.8-patch.diff (text/plain), 20.37 KB, created by
Brad Laue (RETIRED)
on 2004-10-24 10:52:30 UTC
(
hide
)
Description:
Patch to make davfs build against 2.6
Filename:
MIME Type:
Creator:
Brad Laue (RETIRED)
Created:
2004-10-24 10:52:30 UTC
Size:
20.37 KB
patch
obsolete
>diff -ur davfs2-0.2.2.orig/config.h.in davfs2-0.2.2/config.h.in >--- davfs2-0.2.2.orig/config.h.in 2003-12-07 20:39:48.000000000 -0800 >+++ davfs2-0.2.2/config.h.in 2004-08-15 22:59:56.000000000 -0700 >@@ -178,6 +178,9 @@ > /* Define to be minor number of neon version */ > #undef NEON_VERSION_MINOR > >+/* Define to 1 if CODA uses new structure types. */ >+#undef NEW_CODA_STRUCTURES >+ > /* Define to enable debugging */ > #undef NE_DEBUGGING > >@@ -226,9 +229,21 @@ > /* The size of a `ssize_t', as computed by sizeof. */ > #undef SIZEOF_SSIZE_T > >+/* The size of a `struct CodaFid', as computed by sizeof. */ >+#undef SIZEOF_STRUCT_CODAFID >+ > /* The size of a `time_t', as computed by sizeof. */ > #undef SIZEOF_TIME_T > >+/* The size of a `u_int32_t', as computed by sizeof. */ >+#undef SIZEOF_U_INT32_T >+ >+/* The size of a `ViceFid', as computed by sizeof. */ >+#undef SIZEOF_VICEFID >+ >+/* The size of a `void *', as computed by sizeof. */ >+#undef SIZEOF_VOID_P >+ > /* Define to 1 if you have the ANSI C header files. */ > #undef STDC_HEADERS > >diff -ur davfs2-0.2.2.orig/configure.in davfs2-0.2.2/configure.in >--- davfs2-0.2.2.orig/configure.in 2003-12-07 20:39:48.000000000 -0800 >+++ davfs2-0.2.2/configure.in 2004-08-16 00:29:22.000000000 -0700 >@@ -35,14 +35,15 @@ > if test "$DEBUG" = "no"; then > DAV_DEBUG= > else >- DAV_DEBUG=-DDEBUG >+ DAV_DEBUG="-DDEBUG -g" > fi > ]) > > > AC_DEFUN([DAV_CHECK_KERNEL],[ >-AC_ARG_WITH(kernel, >- [ --with-kernel-src Set kernel source directory],, >+AC_ARG_WITH(kernel-src, >+ [ --with-kernel-src Set kernel source directory], >+ [KERNEL="$withval"], > [KERNEL="no"]) > > if test "$KERNEL" = "no"; then >@@ -51,8 +52,57 @@ > dnl > KERNEL_SRC=/usr/src/linux > else >- KERNEL_SRC=$KERNEL >+ KERNEL_SRC="$KERNEL" > fi >+CFLAGS="-I$KERNEL_SRC/include $CFLAGS" >+]) >+ >+dnl Check for ViceFid in linux/coda.h >+AC_DEFUN([DAV_CHECK_CODA_VICEFID], [ >+ AC_CHECK_TYPE([ViceFid], [ >+ AC_CHECK_SIZEOF([ViceFid], [], [ >+#include <sys/types.h> /* for misc typedefs */ >+#include <sys/time.h> /* for struct timespec */ >+/* avoid inclusion of kernel time.h, since it conflicts with the userland time.h */ >+#define _LINUX_TIME_H >+/* needed to be able to compile with kernel headers */ >+# define __user >+#include <linux/coda.h> >+ ]) >+ ], [ >+ AC_CHECK_TYPE([struct CodaFid], [ >+ AC_DEFINE([NEW_CODA_STRUCTURES], [1], [Define to 1 if CODA uses new structure types.]) >+ AC_CHECK_SIZEOF([struct CodaFid], [], [ >+#include <sys/types.h> /* for misc typedefs */ >+#include <sys/time.h> /* for struct timespec */ >+/* avoid inclusion of kernel time.h, since it conflicts with the userland time.h */ >+#define _LINUX_TIME_H >+/* needed to be able to compile with kernel headers */ >+# define __user >+#include <linux/coda.h> >+ ]) >+ ], [], [ >+#include <sys/types.h> /* for misc typedefs */ >+#include <sys/time.h> /* for struct timespec */ >+/* avoid inclusion of kernel time.h, since it conflicts with the userland time.h */ >+#define _LINUX_TIME_H >+/* needed to be able to compile with kernel headers */ >+# define __user >+#include <linux/coda.h> >+ ]) >+ ], [ >+#include <sys/types.h> /* for misc typedefs */ >+#include <sys/time.h> /* for struct timespec */ >+/* avoid inclusion of kernel time.h, since it conflicts with the userland time.h */ >+#define _LINUX_TIME_H >+/* needed to be able to compile with kernel headers */ >+# define __user >+#include <linux/coda.h> >+ ]) >+ AC_CHECK_SIZEOF([u_int32_t], [], [ >+#include <sys/types.h> >+ ]) >+ AC_CHECK_SIZEOF([void *], [], []) > ]) > > dnl Check for getopt_long >@@ -64,6 +114,7 @@ > NEON_WARNINGS > DAV_CHECK_DEBUG > DAV_CHECK_KERNEL >+DAV_CHECK_CODA_VICEFID > AC_SUBST(DAV_DEBUG) > AC_SUBST(KERNEL_SRC) > >diff -ur davfs2-0.2.2.orig/src/davfsd.c davfs2-0.2.2/src/davfsd.c >--- davfs2-0.2.2.orig/src/davfsd.c 2003-12-07 20:39:48.000000000 -0800 >+++ davfs2-0.2.2/src/davfsd.c 2004-08-16 00:20:34.000000000 -0700 >@@ -36,6 +36,8 @@ > #include <sys/fsuid.h> > > /* Linux Kernel Source */ >+/* avoid inclusion of kernel time.h, since it conflicts with userland time.h */ >+#define _LINUX_TIME_H > #include <linux/coda.h> > > /* Neon */ >@@ -120,13 +122,20 @@ > /* change uid/gid to match credentials given by kernel */ > static void setfscred(union inputArgs *in_buf) > { >+#if CODA_KERNEL_VERSION > 2 >+ DBG1(" (uid=%d)", in_buf->ih.uid); >+ >+ setfsuid(in_buf->ih.uid); >+ setfsgid(0); >+#else > DBG2(" (uid=%d,euid=%d,", > in_buf->ih.cred.cr_uid, in_buf->ih.cred.cr_euid); > DBG2(" suid=%d,fsuid=%d) ", > in_buf->ih.cred.cr_suid, in_buf->ih.cred.cr_fsuid); >- >+ > setfsuid(in_buf->ih.cred.cr_fsuid); > setfsgid(in_buf->ih.cred.cr_fsgid); >+#endif /* CODA_FS_OLD_API */ > } > > >@@ -138,7 +147,7 @@ > } > > /* Delete mnt table ans try to umount */ >-static void signal_handler(int signo) >+static void default_signal_handler(int signo) > { > DBG1("signal_handler(%d)\n", signo); > >@@ -166,11 +175,16 @@ > exit(EXIT_SUCCESS); > } > >+static void sigchld_signal_handler(int signo) >+{ >+ exit(1); >+} >+ > static void dav_set_signal() { >- signal(SIGTERM, signal_handler); >- signal(SIGHUP, signal_handler); >- signal(SIGINT, signal_handler); >- signal(SIGCHLD, SIG_IGN); >+ signal(SIGTERM, default_signal_handler); >+ signal(SIGHUP, default_signal_handler); >+ signal(SIGINT, default_signal_handler); >+ signal(SIGCHLD, sigchld_signal_handler); > /* signal(SIGPIPE, SIG_IGN); */ > } > >@@ -224,29 +238,49 @@ > ** file name maintenance (chache) > ** > */ >-static char *look_name(ViceFid id, int *is_dir) >+static char *look_name(DAVCodaFid *id, int *is_dir) > { > char *name; > >- if ((id.Volume != MY_VOL) || (id.Vnode != MY_VNODE)) { >- DBG3("Bad handle passed %lx/%lx/%lx\n", id.Volume, id.Vnode, >- id.Unique); >+ if ((id->Volume != MY_VOL) || (id->Vnode != MY_VNODE)) { >+#ifdef NEW_CODA_STRUCTURES >+ DBG3("Bad handle passed %lx/%lx/%lx\n", id->Volume, id->Vnode, >+ id->List); >+#else >+ DBG3("Bad handle passed %lx/%lx/%lx\n", id->Volume, id->Vnode, >+ id->Unique); >+#endif /* NEW_CODA_STRUCTURES */ > exit(EXIT_FAILURE); > } > if (PARANOIA) { > davfs_list *walk; > for (walk = davfs_list_root; walk; walk = walk->next) { >- if (walk->data == (void*) id.Unique) >+#ifdef NEW_CODA_STRUCTURES >+ if (walk->data == id->List) >+ break; >+#else >+ if (walk->data == (void*) id->Unique) > break; >+#endif /* NEW_CODA_STRUCTURES */ > } > if (!walk) { >- printf("Bad handle passed %lx/%lx/%lx\n", id.Volume, id.Vnode, >- id.Unique); >+#ifdef NEW_CODA_STRUCTURES >+ printf("Bad handle passed %lx/%lx/%lx\n", id->Volume, id->Vnode, >+ id->List); >+#else >+ printf("Bad handle passed %lx/%lx/%lx\n", id->Volume, id->Vnode, >+ id->Unique); >+#endif /* NEW_CODA_STRUCTURES */ > return NULL; > } > } /* paranoia */ >- name = ((struct v_list *) id.Unique)->real_name; >- *is_dir = ((struct v_list *) id.Unique)->is_dir; >+#ifdef NEW_CODA_STRUCTURES >+ name = id->List->real_name; >+ *is_dir = id->List->is_dir; >+#else >+ name = ((struct v_list *) id->Unique)->real_name; >+ *is_dir = ((struct v_list *) id->Unique)->is_dir; >+#endif /* NEW_CODA_STRUCTURES */ > > return name; > } >@@ -255,9 +289,8 @@ > * make a new file name and put it the list > * FIXME: should we check whether the name is unique?? > */ >-static ViceFid alloc_vfid(char *name, int is_dir) >+static void alloc_vfid(DAVCodaFid *res, char *name, int is_dir) > { >- ViceFid res; > struct v_list *h = ne_calloc(sizeof(*h)); > davfs_list *new_node = ne_calloc(sizeof(*new_node)); > new_node->data = h; >@@ -272,10 +305,18 @@ > h->is_dir = is_dir; > count++; > >- MK_FID(res, MY_VOL, MY_VNODE, (long) h); >+ res->Volume = MY_VOL; >+ res->Vnode = MY_VNODE; >+#ifdef NEW_CODA_STRUCTURES >+ res->List = h; >+#ifdef DAVCODAFID_INIT_RESERVED >+ res->Reserved = 0; >+#endif >+#else >+ res->Unique = (u_int32_t)h; >+#endif /* NEW_CODA_STRUCTURES */ > DBG3("New vfid created at %p (file <%s: %d>)\n", > h, h->real_name, h->is_dir); >- return res; > } > > >@@ -369,10 +410,14 @@ > > > /*********************local copy management ********************************/ >-static inline char *get_local_copy(ViceFid id, int flags) >+static inline char *get_local_copy(DAVCodaFid id, int flags) > { > int fd; >+#ifdef NEW_CODA_STRUCTURES >+ struct v_list *v = id.List; >+#else > struct v_list *v = (struct v_list *) id.Unique; >+#endif /* NEW_CODA_STRUCTURES */ > /* I would normally put an assert here, but look_name() was called already */ > /* truncated files do not need an ftp read first; this code cluster handles it */ > v->is_created = 0; >@@ -449,9 +494,13 @@ > > /* Get directory info to the file > * Save information for directory cache */ >-static char *get_dir_copy(ViceFid id) >+static char *get_dir_copy(DAVCodaFid id) > { >+#ifdef NEW_CODA_STRUCTURES >+ struct v_list *v = id.List; >+#else > struct v_list *v = (struct v_list *) id.Unique; >+#endif /* NEW_CODA_STRUCTURES */ > dav_prop_result *one_res; > dav_prop_result *result = dav_opendir(v->real_name); > char *cache; >@@ -533,10 +582,14 @@ > return v->local_name = cache; > } > >-static int unget_local_copy(ViceFid id) >+static int unget_local_copy(DAVCodaFid id) > { > int return_value = 0; >+#ifdef NEW_CODA_STRUCTURES >+ struct v_list *v = id.List; >+#else > struct v_list *v = (struct v_list *) id.Unique; >+#endif /* NEW_CODA_STRUCTURES */ > if (v->local_name) { > /* FIXME : Do we really need to check it? */ > if (v->has_changed) { >@@ -626,7 +679,7 @@ > /* > ** General Open function > */ >-static char *coda_open(char *name, ViceFid id, int flags, >+static char *coda_open(char *name, DAVCodaFid id, int flags, > union inputArgs *in_buf, union outputArgs *out_buf, int server_nolocks) > { > struct stat st; >@@ -771,10 +824,6 @@ > /* dav_kill_prev_mount */ > dav_kill_prev_mount(mopt.dev); > >- /* Wait till it's really die */ >- /* FIXME : Do we really need this? */ >- sleep(1); >- > /* Try to reopen */ > cfs = open(mopt.dev, O_RDWR, 0); > if (cfs == -1) { >@@ -803,16 +852,16 @@ > /* Let's fork for mount */ > if(!fork()) { > DBG0("Trying to mount!!"); >- if (dav_mount(cfs, &mopt)) { >- fprintf(stderr, "%s to %s mount error ", >- mopt.dev, mopt.mpoint); >- perror(" "); >+ if (dav_mount(cfs, &mopt) < 0) { >+ kill(getppid(), SIGCHLD); > return -1; > } > > /* Save info to mtab*/ >- if (dav_mount_save_mtab(&mopt)) >+ if (dav_mount_save_mtab(&mopt)) { >+ kill(getppid(), SIGCHLD); > perror("save mtab"); >+ } > > /* Destory for child */ > dav_mopt_destroy(&mopt); >@@ -891,7 +940,7 @@ > case CODA_ROOT: > CMD(root); > DBG0(": "); >- out_buf->coda_root.VFid = alloc_vfid("/", 1); >+ alloc_vfid((DAVCodaFid *)&out_buf->coda_root.VFid, "/", 1); > v_usage(out_buf->coda_root.VFid) = 1; > > /* Read option and connect*/ >@@ -956,7 +1005,7 @@ > BUILD_NAME(lookup); > DBG1("(stat: %s)", buf); > STAT(buf); /* fills in st */ >- out_buf->coda_lookup.VFid = alloc_vfid(buf,S_ISDIR(st.st_mode)); >+ alloc_vfid((DAVCodaFid *)&out_buf->coda_lookup.VFid, buf,S_ISDIR(st.st_mode)); > out_buf->coda_lookup.vtype = st2type(&st); > break; > >@@ -988,7 +1037,7 @@ > > if (! > (name = >- coda_open(name, in_buf->coda_open_by_fd.VFid, >+ coda_open(name,*(DAVCodaFid *)&in_buf->coda_open_by_fd.VFid, > in_buf->coda_open_by_fd.flags, in_buf, out_buf, server_nolocks))) > break; > out_buf->coda_open_by_fd.fd = toclose = open(name, O_RDWR); >@@ -1001,8 +1050,7 @@ > DUMP(open); > DBG1("flags:%#x ", in_buf->coda_open.flags); > GET_VFID_name(open); >- if (!coda_open >- (name, in_buf->coda_open.VFid, in_buf->coda_open.flags, in_buf, out_buf, server_nolocks)) >+ if (!coda_open(name, *(DAVCodaFid *)&in_buf->coda_open.VFid, in_buf->coda_open.flags, in_buf, out_buf, server_nolocks)) > break; > { > struct stat st; >@@ -1021,9 +1069,7 @@ > DBG1("flags:%#x ", in_buf->coda_open_by_path.flags); > GET_VFID_name(open_by_path); > >- if (!coda_open >- (name, in_buf->coda_open_by_path.VFid, >- in_buf->coda_open_by_path.flags, in_buf, out_buf, server_nolocks)) >+ if (!coda_open(name, *(DAVCodaFid *)&in_buf->coda_open_by_path.VFid, in_buf->coda_open_by_path.flags, in_buf, out_buf, server_nolocks)) > break; > > { >@@ -1043,7 +1089,7 @@ > DUMP(close); > GET_VFID_name(close); > DBG0("CLOSE"); >- if (unget_local_copy(in_buf->coda_close.VFid) < 0) { >+ if (unget_local_copy(*(DAVCodaFid *)&in_buf->coda_close.VFid) < 0) { > out_buf->oh.result = dav_get_errno(); > zap_file(in_buf); > } >@@ -1064,7 +1110,7 @@ > BUILD_NAME(create); > DBG1("(create_name: %s)", buf); > >- out_buf->coda_create.VFid = alloc_vfid(buf, 0); >+ alloc_vfid((DAVCodaFid *)&out_buf->coda_create.VFid, buf, 0); > v_created(out_buf->coda_create.VFid) = 1; > > /* get inherient */ >@@ -1079,7 +1125,7 @@ > BUILD_NAME(mkdir); > DBG1("(mkdir: %s)", buf); > if (dav_mkdir(buf, in_buf->coda_mkdir.attr.va_mode) == 0) { >- out_buf->coda_mkdir.VFid = alloc_vfid(buf, 1); >+ alloc_vfid((DAVCodaFid *)&out_buf->coda_mkdir.VFid, buf, 1); > > /* get inherient */ > out_buf->coda_mkdir.attr = in_buf->coda_mkdir.attr; >@@ -1126,10 +1172,10 @@ > out_buf->oh.result = ENOENT; > break; > } >- sprintf(buf, "%s/%s", look_name(in_buf->coda_rename.sourceFid, &is_dir_src), >+ sprintf(buf, "%s/%s", look_name((DAVCodaFid *)&in_buf->coda_rename.sourceFid, &is_dir_src), > name); > name = ((char *) in_buf) + in_buf->coda_rename.destname; >- sprintf(buf2, "%s/%s", look_name(in_buf->coda_rename.destFid, &is_dir), >+ sprintf(buf2, "%s/%s", look_name((DAVCodaFid *)&in_buf->coda_rename.destFid, &is_dir), > name); > DBG2("src name=%s:%d,", buf, is_dir_src); > DBG2("dest name %s:%d \n", buf2, is_dir); >diff -ur davfs2-0.2.2.orig/src/davfsd.h davfs2-0.2.2/src/davfsd.h >--- davfs2-0.2.2.orig/src/davfsd.h 2003-12-07 20:39:48.000000000 -0800 >+++ davfs2-0.2.2/src/davfsd.h 2004-08-15 22:59:01.000000000 -0700 >@@ -40,25 +40,79 @@ > # define FLUSH_TIME 60 > #endif > >+/* >+ * In the new coda.h, ViceFid is no longer defined by the reason >+ * the kernel needn't know what types of values are stored in the structure >+ * because it's solely an identifier to recognise a Coda cell. >+ * >+ * Therefore we need to define our own structure in the event davfs2 >+ * is compiled with newer versions of the linux kernel (>= 2.6.0) >+ * >+ * 2004-03-07 Moriyoshi Koizumi <moriyoshi@at.wakwak.com> >+ */ >+#ifdef NEW_CODA_STRUCTURES >+typedef struct _DAVCodaFid { >+ u_int32_t Volume; >+ u_int32_t Vnode; >+ struct v_list *List; /* this member may be 64bit wide */ >+#if SIZEOF_STRUCT_CODAFID > SIZE_OF_U_INT32_T * 2 + SIZEOF_VOID_P >+#define DAVCODAFID_INIT_RESERVED >+ u_int32_t Reserved; >+#endif >+} DAVCodaFid; >+ >+/* If the defined opaque structure is not large enough to contain >+ * DAVCodaFid, then bail out. Otherwise it will lead to serious crash after all. >+ */ >+#if SIZEOF_STRUCT_CODAFID < SIZEOF_U_INT32_T * 2 + SIZEOF_VOID_P >+#error "davfs2 cannot be built with this version of CODA." >+#endif >+ >+#else >+typedef ViceFid DAVCodaFid; >+#endif >+ > /* There is nothing magic about these constants. I just selected them > * so that kernel does not complain too loudly. */ > #define MY_VOL 0x01234567 > #define MY_VNODE 0xffffffff > #define MY_INODE 0x12348765 >-#define MK_FID(f,v,n,u) {f.Volume=v;f.Vnode=n;f.Unique=u;} > > #define SIZEOF_INBUF (sizeof(union inputArgs) + 1024 + CODA_MAXNAMLEN) > #define SIZEOF_OUTBUF (sizeof(union outputArgs) + 1024 + CODA_MAXNAMLEN) > > >-#define CMD(x) out_buf->oh.result = 0; size = sizeof(out_buf->coda_##x); DBG1( "%.10s",#x ); >-#define CMD_NOREP(x) out_buf->oh.result = 0; DBG1( "%.10s",#x ); >-#define STAT(x) if (!legal_name(x)) {out_buf->oh.result = ENOENT; break; } else if (dav_stat_cache(x, &st, prev_list_result, prev_base_dir)==-1 && dav_stat(x, &st, is_dir, 0) == -1) { out_buf->oh.result = dav_get_errno(); DBG1( "file '%s' probably does not exist.", (x) ); break; } >-#define DUMP(x) DBG1( "\tbase:%s\n\t", look_name(in_buf->coda_##x.VFid, &is_dir)); >-#define DUMP_NAME(x) DBG2( "\tbase:%s\tname:%s\n\t", look_name(in_buf->coda_##x.VFid, &is_dir), (char*)in_buf + in_buf->coda_##x.name); >-#define BUILD_NAME(x) name = ((char*) in_buf) + in_buf->coda_##x.name; sprintf( buf, "%s/%s", look_name(in_buf->coda_##x.VFid, &is_dir), name); >-#define GET_VFID_name(x) if (NULL==(name=look_name(in_buf->coda_##x.VFid, &is_dir))) {out_buf->oh.result = ENOENT; break;} >- >+#define CMD(x) do { \ >+ out_buf->oh.result = 0; \ >+ size = sizeof(out_buf->coda_##x); \ >+ DBG1( "%.10s\n",#x ); \ >+} while (0) >+#define CMD_NOREP(x) do { \ >+ out_buf->oh.result = 0; \ >+ DBG1( "%.10s",#x ); \ >+} while (0) >+#define STAT(x) { \ >+ if (!legal_name(x)) { \ >+ out_buf->oh.result = ENOENT; \ >+ break; \ >+ } else if (dav_stat_cache(x, &st, prev_list_result, prev_base_dir) == -1 && dav_stat(x, &st, is_dir, 0) == -1) { \ >+ out_buf->oh.result = dav_get_errno(); \ >+ DBG1( "file '%s' probably does not exist.", (x) ); \ >+ break; \ >+ } \ >+} >+#define DUMP(x) DBG1( "\tbase:%s\n\t", look_name((DAVCodaFid* )&in_buf->coda_##x.VFid, &is_dir)); >+#define DUMP_NAME(x) DBG2( "\tbase:%s\tname:%s\n\t", look_name((DAVCodaFid *)&in_buf->coda_##x.VFid, &is_dir), (char*)in_buf + in_buf->coda_##x.name); >+#define BUILD_NAME(x) do { \ >+ name = ((char*) in_buf) + in_buf->coda_##x.name; \ >+ snprintf((buf), sizeof(buf), "%s/%s", \ >+ look_name((DAVCodaFid *)&in_buf->coda_##x.VFid, &is_dir), name); \ >+} while (0) >+#define GET_VFID_name(x) \ >+ if (NULL == (name = look_name((DAVCodaFid *)&in_buf->coda_##x.VFid, &is_dir))) { \ >+ out_buf->oh.result = ENOENT; \ >+ break; \ >+ } > > /* our local object: NOTE: we try to do as little as possible > * and trust that vfs will handle caching for us */ >@@ -67,10 +121,10 @@ > char *real_name; > char *local_name; > short usage; >- char has_changed; // dirty bit >- char is_dir; >- char is_created; // marker for files which do not yet exist at the other end >- char is_trunc; // marker for files which are to be sent to the other end >+ unsigned char has_changed: 1; // dirty bit >+ unsigned char is_dir: 1; >+ unsigned char is_created: 1; // marker for files which do not yet exist at the other end >+ unsigned char is_trunc: 1; // marker for files which are to be sent to the other end > /* timestamp ?? */ > }; > >@@ -80,8 +134,13 @@ > struct davfs_list *next; > } davfs_list; > >+#ifdef NEW_CODA_STRUCTURES >+#define v_usage(x) ((DAVCodaFid *)&(x))->List->usage >+#define v_created(x) ((DAVCodaFid *)&(x))->List->is_created >+#else > #define v_usage(x) ((struct v_list*)x.Unique)->usage > #define v_created(x) ((struct v_list*)x.Unique)->is_created >+#endif /* NEW_CODA_STRUCTURES */ > > #endif > >diff -ur davfs2-0.2.2.orig/src/mount.c davfs2-0.2.2/src/mount.c >--- davfs2-0.2.2.orig/src/mount.c 2003-12-07 20:39:48.000000000 -0800 >+++ davfs2-0.2.2/src/mount.c 2004-08-16 00:20:50.000000000 -0700 >@@ -32,7 +32,9 @@ > #include <sys/mount.h> > #include <mntent.h> > >-/* Linux code head file */ >+/* Linux coda head file */ >+/* avoid inclusion of kernel time.h, since it conflicts with userland time.h */ >+#define _LINUX_TIME_H > #include <linux/coda.h> > > /* Neon */ >@@ -83,10 +85,10 @@ > "Arguments are wrong", > "Can not run davfsd", > "Can not mount the device file or the directory", >- "Unknown Error occured", >- >+ > /* Add here. Let the ment is match with dav_mount_error */ > >+ "Unknown Error occured", > NULL > }; > >@@ -109,8 +111,9 @@ > #if 0 > int muxfd = open(mopt->dev, O_RDWR, 0); > #endif >+ u_int coda_kernel_version_val; > struct coda_mount_data mountdata; >- >+ int retval; > mountdata.version = CODA_MOUNT_VERSION; > mountdata.fd = muxfd; > >@@ -118,8 +121,20 @@ > fprintf(stderr, "(%s)fd is -1 ", mopt->dev); > perror(" "); > } >- return mount("coda", mopt->mpoint, "coda", MS_MGC_VAL, >+ >+ ioctl(muxfd, CIOC_KERNEL_VERSION, &coda_kernel_version_val); >+ if (coda_kernel_version_val != CODA_KERNEL_VERSION) { >+ fprintf(stderr, "CODA kernel version mismatch (compiled for version %d, version %d available)\n", CODA_KERNEL_VERSION, coda_kernel_version_val); >+ return -1; >+ } >+ >+ retval = mount("coda", mopt->mpoint, "coda", MS_MGC_VAL, > (void *)&mountdata); >+ if (retval < 0) { >+ fprintf(stderr, "%s to %s mount error", mopt->dev, mopt->mpoint); >+ perror(" "); >+ } >+ return retval; > } > > /* Show how to use mount */ >diff -ur davfs2-0.2.2.orig/src/util.c davfs2-0.2.2/src/util.c >--- davfs2-0.2.2.orig/src/util.c 2003-12-07 20:39:48.000000000 -0800 >+++ davfs2-0.2.2/src/util.c 2004-08-15 22:59:01.000000000 -0700 >@@ -228,7 +228,6 @@ > printf("gid: %d\n", mopt->gid); > printf("mode: %o\n", mopt->mode); > printf("nolocks: %d\n", mopt->nolocks); >- printf("askauth: %d\n", mopt->askauth); > #endif > > /* mandatory */
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 62502
:
38670
|
38672
|
40360
| 42505